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.7\n"
10 "Report-Msgid-Bugs-To: libguestfs@redhat.com\n"
11 "POT-Creation-Date: 2010-09-02 20:33+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 "Haskell or C#). You can also use it from shell scripts or the command line."
114 #: ../src/guestfs.pod:49
116 "You don't need to be root to use libguestfs, although obviously you do need "
117 "enough permissions to access the disk images."
121 #: ../src/guestfs.pod:52
123 "Libguestfs is a large API because it can do many things. For a gentle "
124 "introduction, please read the L</API OVERVIEW> section next."
128 #: ../src/guestfs.pod:55
133 #: ../src/guestfs.pod:57
135 "This section provides a gentler overview of the libguestfs API. We also try "
136 "to group API calls together, where that may not be obvious from reading "
137 "about the individual calls in the main section of this manual."
141 #: ../src/guestfs.pod:62
146 #: ../src/guestfs.pod:64
148 "Before you can use libguestfs calls, you have to create a handle. Then you "
149 "must add at least one disk image to the handle, followed by launching the "
150 "handle, then performing whatever operations you want, and finally closing "
151 "the handle. By convention we use the single letter C<g> for the name of the "
152 "handle variable, although of course you can use any name you want."
156 #: ../src/guestfs.pod:71
157 msgid "The general structure of all libguestfs-using programs looks like this:"
161 #: ../src/guestfs.pod:74
164 " guestfs_h *g = guestfs_create ();\n"
169 #: ../src/guestfs.pod:76
172 " /* Call guestfs_add_drive additional times if there are\n"
173 " * multiple disk images.\n"
175 " guestfs_add_drive (g, \"guest.img\");\n"
180 #: ../src/guestfs.pod:81
183 " /* Most manipulation calls won't work until you've launched\n"
184 " * the handle 'g'. You have to do this _after_ adding drives\n"
185 " * and _before_ other commands.\n"
187 " guestfs_launch (g);\n"
192 #: ../src/guestfs.pod:87
195 " /* Now you can examine what partitions, LVs etc are available.\n"
197 " char **partitions = guestfs_list_partitions (g);\n"
198 " char **logvols = guestfs_lvs (g);\n"
203 #: ../src/guestfs.pod:92
206 " /* To access a filesystem in the image, you must mount it.\n"
208 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
213 #: ../src/guestfs.pod:96
216 " /* Now you can perform filesystem actions on the guest\n"
219 " guestfs_touch (g, \"/hello\");\n"
224 #: ../src/guestfs.pod:101
227 " /* You only need to call guestfs_sync if you have made\n"
228 " * changes to the guest image. (But if you've made changes\n"
229 " * then you *must* sync). See also: guestfs_umount and\n"
230 " * guestfs_umount_all calls.\n"
232 " guestfs_sync (g);\n"
237 #: ../src/guestfs.pod:108
240 " /* Close the handle 'g'. */\n"
241 " guestfs_close (g);\n"
246 #: ../src/guestfs.pod:111
248 "The code above doesn't include any error checking. In real code you should "
249 "check return values carefully for errors. In general all functions that "
250 "return integers return C<-1> on error, and all functions that return "
251 "pointers return C<NULL> on error. See section L</ERROR HANDLING> below for "
252 "how to handle errors, and consult the documentation for each function call "
253 "below to see precisely how they return error indications."
257 #: ../src/guestfs.pod:119
262 #: ../src/guestfs.pod:121
264 "The image filename (C<\"guest.img\"> in the example above) could be a disk "
265 "image from a virtual machine, a L<dd(1)> copy of a physical hard disk, an "
266 "actual block device, or simply an empty file of zeroes that you have created "
267 "through L<posix_fallocate(3)>. Libguestfs lets you do useful things to all "
272 #: ../src/guestfs.pod:127
274 "You can add a disk read-only using L</guestfs_add_drive_ro>, in which case "
275 "libguestfs won't modify the file."
279 #: ../src/guestfs.pod:130
281 "Be extremely cautious if the disk image is in use, eg. if it is being used "
282 "by a virtual machine. Adding it read-write will almost certainly cause disk "
283 "corruption, but adding it read-only is safe."
287 #: ../src/guestfs.pod:134
289 "You must add at least one disk image, and you may add multiple disk images. "
290 "In the API, the disk images are usually referred to as C</dev/sda> (for the "
291 "first one you added), C</dev/sdb> (for the second one you added), etc."
295 #: ../src/guestfs.pod:139
297 "Once L</guestfs_launch> has been called you cannot add any more images. You "
298 "can call L</guestfs_list_devices> to get a list of the device names, in the "
299 "order that you added them. See also L</BLOCK DEVICE NAMING> below."
303 #: ../src/guestfs.pod:144
308 #: ../src/guestfs.pod:146
310 "Before you can read or write files, create directories and so on in a disk "
311 "image that contains filesystems, you have to mount those filesystems using "
312 "L</guestfs_mount>. If you already know that a disk image contains (for "
313 "example) one partition with a filesystem on that partition, then you can "
318 #: ../src/guestfs.pod:152
321 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
326 #: ../src/guestfs.pod:154
328 "where C</dev/sda1> means literally the first partition (C<1>) of the first "
329 "disk image that we added (C</dev/sda>). If the disk contains Linux LVM2 "
330 "logical volumes you could refer to those instead (eg. C</dev/VG/LV>)."
334 #: ../src/guestfs.pod:158
336 "If you are given a disk image and you don't know what it contains then you "
337 "have to find out. Libguestfs can do that too: use "
338 "L</guestfs_list_partitions> and L</guestfs_lvs> to list possible partitions "
339 "and LVs, and either try mounting each to see what is mountable, or else "
340 "examine them with L</guestfs_vfs_type> or L</guestfs_file>. Libguestfs also "
341 "has a set of APIs for inspection of disk images (see L</INSPECTION> below). "
342 "But you might find it easier to look at higher level programs built on top "
343 "of libguestfs, in particular L<virt-inspector(1)>."
347 #: ../src/guestfs.pod:168
349 "To mount a disk image read-only, use L</guestfs_mount_ro>. There are "
350 "several other variations of the C<guestfs_mount_*> call."
354 #: ../src/guestfs.pod:171
355 msgid "FILESYSTEM ACCESS AND MODIFICATION"
359 #: ../src/guestfs.pod:173
361 "The majority of the libguestfs API consists of fairly low-level calls for "
362 "accessing and modifying the files, directories, symlinks etc on mounted "
363 "filesystems. There are over a hundred such calls which you can find listed "
364 "in detail below in this man page, and we don't even pretend to cover them "
365 "all in this overview."
369 #: ../src/guestfs.pod:179
371 "Specify filenames as full paths, starting with C<\"/\"> and including the "
376 #: ../src/guestfs.pod:182
378 "For example, if you mounted a filesystem at C<\"/\"> and you want to read "
379 "the file called C<\"etc/passwd\"> then you could do:"
383 #: ../src/guestfs.pod:185
386 " char *data = guestfs_cat (g, \"/etc/passwd\");\n"
391 #: ../src/guestfs.pod:187
393 "This would return C<data> as a newly allocated buffer containing the full "
394 "content of that file (with some conditions: see also L</DOWNLOADING> below), "
395 "or C<NULL> if there was an error."
399 #: ../src/guestfs.pod:191
401 "As another example, to create a top-level directory on that filesystem "
402 "called C<\"var\"> you would do:"
406 #: ../src/guestfs.pod:194
409 " guestfs_mkdir (g, \"/var\");\n"
414 #: ../src/guestfs.pod:196
415 msgid "To create a symlink you could do:"
419 #: ../src/guestfs.pod:198
422 " guestfs_ln_s (g, \"/etc/init.d/portmap\",\n"
423 " \"/etc/rc3.d/S30portmap\");\n"
428 #: ../src/guestfs.pod:201
430 "Libguestfs will reject attempts to use relative paths and there is no "
431 "concept of a current working directory."
435 #: ../src/guestfs.pod:204
437 "Libguestfs can return errors in many situations: for example if the "
438 "filesystem isn't writable, or if a file or directory that you requested "
439 "doesn't exist. If you are using the C API (documented here) you have to "
440 "check for those error conditions after each call. (Other language bindings "
441 "turn these errors into exceptions)."
445 #: ../src/guestfs.pod:210
447 "File writes are affected by the per-handle umask, set by calling "
448 "L</guestfs_umask> and defaulting to 022. See L</UMASK>."
452 #: ../src/guestfs.pod:213
457 #: ../src/guestfs.pod:215
459 "Libguestfs contains API calls to read, create and modify partition tables on "
464 #: ../src/guestfs.pod:218
466 "In the common case where you want to create a single partition covering the "
467 "whole disk, you should use the L</guestfs_part_disk> call:"
471 #: ../src/guestfs.pod:222
474 " const char *parttype = \"mbr\";\n"
475 " if (disk_is_larger_than_2TB)\n"
476 " parttype = \"gpt\";\n"
477 " guestfs_part_disk (g, \"/dev/sda\", parttype);\n"
482 #: ../src/guestfs.pod:227
484 "Obviously this effectively wipes anything that was on that disk image "
489 #: ../src/guestfs.pod:230
494 #: ../src/guestfs.pod:232
496 "Libguestfs provides access to a large part of the LVM2 API, such as "
497 "L</guestfs_lvcreate> and L</guestfs_vgremove>. It won't make much sense "
498 "unless you familiarize yourself with the concepts of physical volumes, "
499 "volume groups and logical volumes."
503 #: ../src/guestfs.pod:237
505 "This author strongly recommends reading the LVM HOWTO, online at "
506 "L<http://tldp.org/HOWTO/LVM-HOWTO/>."
510 #: ../src/guestfs.pod:240
515 #: ../src/guestfs.pod:242
517 "Use L</guestfs_cat> to download small, text only files. This call is "
518 "limited to files which are less than 2 MB and which cannot contain any ASCII "
519 "NUL (C<\\0>) characters. However it has a very simple to use API."
523 #: ../src/guestfs.pod:247
525 "L</guestfs_read_file> can be used to read files which contain arbitrary 8 "
526 "bit data, since it returns a (pointer, size) pair. However it is still "
527 "limited to \"small\" files, less than 2 MB."
531 #: ../src/guestfs.pod:251
533 "L</guestfs_download> can be used to download any file, with no limits on "
534 "content or size (even files larger than 4 GB)."
538 #: ../src/guestfs.pod:254
539 msgid "To download multiple files, see L</guestfs_tar_out> and L</guestfs_tgz_out>."
543 #: ../src/guestfs.pod:257
548 #: ../src/guestfs.pod:259
550 "It's often the case that you want to write a file or files to the disk "
555 #: ../src/guestfs.pod:262
557 "To write a small file with fixed content, use L</guestfs_write>. To create "
558 "a file of all zeroes, use L</guestfs_truncate_size> (sparse) or "
559 "L</guestfs_fallocate64> (with all disk blocks allocated). There are a "
560 "variety of other functions for creating test files, for example "
561 "L</guestfs_fill> and L</guestfs_fill_pattern>."
565 #: ../src/guestfs.pod:268
567 "To upload a single file, use L</guestfs_upload>. This call has no limits on "
568 "file content or size (even files larger than 4 GB)."
572 #: ../src/guestfs.pod:271
573 msgid "To upload multiple files, see L</guestfs_tar_in> and L</guestfs_tgz_in>."
577 #: ../src/guestfs.pod:273
579 "However the fastest way to upload I<large numbers of arbitrary files> is to "
580 "turn them into a squashfs or CD ISO (see L<mksquashfs(8)> and "
581 "L<mkisofs(8)>), then attach this using L</guestfs_add_drive_ro>. If you add "
582 "the drive in a predictable way (eg. adding it last after all other drives) "
583 "then you can get the device name from L</guestfs_list_devices> and mount it "
584 "directly using L</guestfs_mount_ro>. Note that squashfs images are "
585 "sometimes non-portable between kernel versions, and they don't support "
586 "labels or UUIDs. If you want to pre-build an image or you need to mount it "
587 "using a label or UUID, use an ISO image instead."
591 #: ../src/guestfs.pod:284
596 #: ../src/guestfs.pod:286
598 "There are various different commands for copying between files and devices "
599 "and in and out of the guest filesystem. These are summarised in the table "
604 #: ../src/guestfs.pod:292
605 msgid "B<file> to B<file>"
609 #: ../src/guestfs.pod:294
611 "Use L</guestfs_cp> to copy a single file, or L</guestfs_cp_a> to copy "
612 "directories recursively."
616 #: ../src/guestfs.pod:297
617 msgid "B<file or device> to B<file or device>"
621 #: ../src/guestfs.pod:299
623 "Use L</guestfs_dd> which efficiently uses L<dd(1)> to copy between files and "
624 "devices in the guest."
628 #: ../src/guestfs.pod:302
629 msgid "Example: duplicate the contents of an LV:"
633 #: ../src/guestfs.pod:304
636 " guestfs_dd (g, \"/dev/VG/Original\", \"/dev/VG/Copy\");\n"
641 #: ../src/guestfs.pod:306
643 "The destination (C</dev/VG/Copy>) must be at least as large as the source "
644 "(C</dev/VG/Original>). To copy less than the whole source device, use "
645 "L</guestfs_copy_size>."
649 #: ../src/guestfs.pod:310
650 msgid "B<file on the host> to B<file or device>"
654 #: ../src/guestfs.pod:312
655 msgid "Use L</guestfs_upload>. See L</UPLOADING> above."
659 #: ../src/guestfs.pod:314
660 msgid "B<file or device> to B<file on the host>"
664 #: ../src/guestfs.pod:316
665 msgid "Use L</guestfs_download>. See L</DOWNLOADING> above."
669 #: ../src/guestfs.pod:320
670 msgid "LISTING FILES"
674 #: ../src/guestfs.pod:322
676 "L</guestfs_ll> is just designed for humans to read (mainly when using the "
677 "L<guestfish(1)>-equivalent command C<ll>)."
681 #: ../src/guestfs.pod:325
683 "L</guestfs_ls> is a quick way to get a list of files in a directory from "
684 "programs, as a flat list of strings."
688 #: ../src/guestfs.pod:328
690 "L</guestfs_readdir> is a programmatic way to get a list of files in a "
691 "directory, plus additional information about each one. It is more "
692 "equivalent to using the L<readdir(3)> call on a local filesystem."
696 #: ../src/guestfs.pod:332
698 "L</guestfs_find> and L</guestfs_find0> can be used to recursively list "
703 #: ../src/guestfs.pod:335
704 msgid "RUNNING COMMANDS"
708 #: ../src/guestfs.pod:337
710 "Although libguestfs is a primarily an API for manipulating files inside "
711 "guest images, we also provide some limited facilities for running commands "
716 #: ../src/guestfs.pod:341
717 msgid "There are many limitations to this:"
721 #: ../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:1214 ../src/guestfs.pod:1219 ../src/guestfs.pod:1223 ../src/guestfs.pod:1325 ../src/guestfs.pod:1329 ../src/guestfs.pod:1333 ../src/guestfs.pod:1338 ../src/guestfs.pod:1346 ../src/guestfs.pod:1365 ../src/guestfs.pod:1373 ../src/guestfs.pod:1587 ../src/guestfs.pod:1593 ../src/guestfs.pod:1598 ../src/guestfs.pod:1604 ../src/guestfs.pod:1711 ../src/guestfs.pod:1715 ../src/guestfs.pod:1719 ../src/guestfs.pod:1723 ../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
726 #: ../src/guestfs.pod:347
728 "The kernel version that the command runs under will be different from what "
733 #: ../src/guestfs.pod:352
735 "If the command needs to communicate with daemons, then most likely they "
740 #: ../src/guestfs.pod:357
741 msgid "The command will be running in limited memory."
745 #: ../src/guestfs.pod:361
747 "The network may not be available unless you enable it (see "
748 "L</guestfs_set_network>)."
752 #: ../src/guestfs.pod:366
753 msgid "Only supports Linux guests (not Windows, BSD, etc)."
757 #: ../src/guestfs.pod:370
758 msgid "Architecture limitations (eg. won't work for a PPC guest on an X86 host)."
762 #: ../src/guestfs.pod:375
764 "For SELinux guests, you may need to enable SELinux and load policy first. "
765 "See L</SELINUX> in this manpage."
769 #: ../src/guestfs.pod:380
771 "The two main API calls to run commands are L</guestfs_command> and "
772 "L</guestfs_sh> (there are also variations)."
776 #: ../src/guestfs.pod:383
778 "The difference is that L</guestfs_sh> runs commands using the shell, so any "
779 "shell globs, redirections, etc will work."
783 #: ../src/guestfs.pod:386
784 msgid "CONFIGURATION FILES"
788 #: ../src/guestfs.pod:388
790 "To read and write configuration files in Linux guest filesystems, we "
791 "strongly recommend using Augeas. For example, Augeas understands how to "
792 "read and write, say, a Linux shadow password file or X.org configuration "
793 "file, and so avoids you having to write that code."
797 #: ../src/guestfs.pod:393
799 "The main Augeas calls are bound through the C<guestfs_aug_*> APIs. We don't "
800 "document Augeas itself here because there is excellent documentation on the "
801 "L<http://augeas.net/> website."
805 #: ../src/guestfs.pod:397
807 "If you don't want to use Augeas (you fool!) then try calling "
808 "L</guestfs_read_lines> to get the file as a list of lines which you can "
813 #: ../src/guestfs.pod:401
818 #: ../src/guestfs.pod:403
820 "We support SELinux guests. To ensure that labeling happens correctly in "
821 "SELinux guests, you need to enable SELinux and load the guest's policy:"
825 #: ../src/guestfs.pod:409
830 #: ../src/guestfs.pod:411
831 msgid "Before launching, do:"
835 #: ../src/guestfs.pod:413
838 " guestfs_set_selinux (g, 1);\n"
843 #: ../src/guestfs.pod:415
848 #: ../src/guestfs.pod:417
850 "After mounting the guest's filesystem(s), load the policy. This is best "
851 "done by running the L<load_policy(8)> command in the guest itself:"
855 #: ../src/guestfs.pod:421
858 " guestfs_sh (g, \"/usr/sbin/load_policy\");\n"
863 #: ../src/guestfs.pod:423
865 "(Older versions of C<load_policy> require you to specify the name of the "
870 #: ../src/guestfs.pod:426
875 #: ../src/guestfs.pod:428
877 "Optionally, set the security context for the API. The correct security "
878 "context to use can only be known by inspecting the guest. As an example:"
882 #: ../src/guestfs.pod:432
885 " guestfs_setcon (g, \"unconfined_u:unconfined_r:unconfined_t:s0\");\n"
890 #: ../src/guestfs.pod:436
891 msgid "This will work for running commands and editing existing files."
895 #: ../src/guestfs.pod:438
897 "When new files are created, you may need to label them explicitly, for "
898 "example by running the external command C<restorecon pathname>."
902 #: ../src/guestfs.pod:442
907 #: ../src/guestfs.pod:444
909 "Certain calls are affected by the current file mode creation mask (the "
910 "\"umask\"). In particular ones which create files or directories, such as "
911 "L</guestfs_touch>, L</guestfs_mknod> or L</guestfs_mkdir>. This affects "
912 "either the default mode that the file is created with or modifies the mode "
917 #: ../src/guestfs.pod:450
919 "The default umask is C<022>, so files are created with modes such as C<0644> "
920 "and directories with C<0755>."
924 #: ../src/guestfs.pod:453
926 "There are two ways to avoid being affected by umask. Either set umask to 0 "
927 "(call C<guestfs_umask (g, 0)> early after launching). Or call "
928 "L</guestfs_chmod> after creating each file or directory."
932 #: ../src/guestfs.pod:457
933 msgid "For more information about umask, see L<umask(2)>."
937 #: ../src/guestfs.pod:459 ../fish/guestfish.pod:559
938 msgid "ENCRYPTED DISKS"
942 #: ../src/guestfs.pod:461
944 "Libguestfs allows you to access Linux guests which have been encrypted using "
945 "whole disk encryption that conforms to the Linux Unified Key Setup (LUKS) "
946 "standard. This includes nearly all whole disk encryption systems used by "
947 "modern Linux guests."
951 #: ../src/guestfs.pod:467
953 "Use L</guestfs_vfs_type> to identify LUKS-encrypted block devices (it "
954 "returns the string C<crypto_LUKS>)."
958 #: ../src/guestfs.pod:470
960 "Then open these devices by calling L</guestfs_luks_open>. Obviously you "
961 "will require the passphrase!"
965 #: ../src/guestfs.pod:473
967 "Opening a LUKS device creates a new device mapper device called "
968 "C</dev/mapper/mapname> (where C<mapname> is the string you supply to "
969 "L</guestfs_luks_open>). Reads and writes to this mapper device are "
970 "decrypted from and encrypted to the underlying block device respectively."
974 #: ../src/guestfs.pod:479
976 "LVM volume groups on the device can be made visible by calling "
977 "L</guestfs_vgscan> followed by L</guestfs_vg_activate_all>. The logical "
978 "volume(s) can now be mounted in the usual way."
982 #: ../src/guestfs.pod:483
984 "Use the reverse process to close a LUKS device. Unmount any logical volumes "
985 "on it, deactivate the volume groups by caling C<guestfs_vg_activate (g, 0, "
986 "[\"/dev/VG\"])>. Then close the mapper device by calling "
987 "L</guestfs_luks_close> on the C</dev/mapper/mapname> device (I<not> the "
988 "underlying encrypted block device)."
992 #: ../src/guestfs.pod:490
997 #: ../src/guestfs.pod:492
999 "Libguestfs has APIs for inspecting an unknown disk image to find out if it "
1000 "contains operating systems. (These APIs used to be in a separate Perl-only "
1001 "library called L<Sys::Guestfs::Lib(3)> but since version 1.5.3 the most "
1002 "frequently used part of this library has been rewritten in C and moved into "
1007 #: ../src/guestfs.pod:498
1009 "Add all disks belonging to the unknown virtual machine and call "
1010 "L</guestfs_launch> in the usual way."
1014 #: ../src/guestfs.pod:501
1016 "Then call L</guestfs_inspect_os>. This function uses other libguestfs calls "
1017 "and certain heuristics, and returns a list of operating systems that were "
1018 "found. An empty list means none were found. A single element is the root "
1019 "filesystem of the operating system. For dual- or multi-boot guests, "
1020 "multiple roots can be returned, each one corresponding to a separate "
1021 "operating system. (Multi-boot virtual machines are extremely rare in the "
1022 "world of virtualization, but since this scenario can happen, we have built "
1023 "libguestfs to deal with it.)"
1027 #: ../src/guestfs.pod:510
1029 "For each root, you can then call various C<guestfs_inspect_get_*> functions "
1030 "to get additional details about that operating system. For example, call "
1031 "L</guestfs_inspect_get_type> to return the string C<windows> or C<linux> for "
1032 "Windows and Linux-based operating systems respectively."
1036 #: ../src/guestfs.pod:516
1038 "Un*x-like and Linux-based operating systems usually consist of several "
1039 "filesystems which are mounted at boot time (for example, a separate boot "
1040 "partition mounted on C</boot>). The inspection rules are able to detect how "
1041 "filesystems correspond to mount points. Call "
1042 "C<guestfs_inspect_get_mountpoints> to get this mapping. It might return a "
1043 "hash table like this example:"
1047 #: ../src/guestfs.pod:523
1050 " /boot => /dev/sda1\n"
1051 " / => /dev/vg_guest/lv_root\n"
1052 " /usr => /dev/vg_guest/lv_usr\n"
1057 #: ../src/guestfs.pod:527
1059 "The caller can then make calls to L</guestfs_mount_options> to mount the "
1060 "filesystems as suggested."
1064 #: ../src/guestfs.pod:530
1066 "Be careful to mount filesystems in the right order (eg. C</> before "
1067 "C</usr>). Sorting the keys of the hash by length, shortest first, should "
1072 #: ../src/guestfs.pod:534
1074 "Inspection currently only works for some common operating systems. "
1075 "Contributors are welcome to send patches for other operating systems that we "
1076 "currently cannot detect."
1080 #: ../src/guestfs.pod:538
1082 "Encrypted disks must be opened before inspection. See L</ENCRYPTED DISKS> "
1083 "for more details. The L</guestfs_inspect_os> function just ignores any "
1084 "encrypted devices."
1088 #: ../src/guestfs.pod:542
1090 "A note on the implementation: The call L</guestfs_inspect_os> performs "
1091 "inspection and caches the results in the guest handle. Subsequent calls to "
1092 "C<guestfs_inspect_get_*> return this cached information, but I<do not> "
1093 "re-read the disks. If you change the content of the guest disks, you can "
1094 "redo inspection by calling L</guestfs_inspect_os> again."
1098 #: ../src/guestfs.pod:549
1099 msgid "SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS"
1103 #: ../src/guestfs.pod:551
1105 "Libguestfs can mount NTFS partitions. It does this using the "
1106 "L<http://www.ntfs-3g.org/> driver."
1110 #: ../src/guestfs.pod:554
1112 "DOS and Windows still use drive letters, and the filesystems are always "
1113 "treated as case insensitive by Windows itself, and therefore you might find "
1114 "a Windows configuration file referring to a path like "
1115 "C<c:\\windows\\system32>. When the filesystem is mounted in libguestfs, "
1116 "that directory might be referred to as C</WINDOWS/System32>."
1120 #: ../src/guestfs.pod:560
1122 "Drive letter mappings are outside the scope of libguestfs. You have to use "
1123 "libguestfs to read the appropriate Windows Registry and configuration files, "
1124 "to determine yourself how drives are mapped (see also L<hivex(3)> and "
1125 "L<virt-inspector(1)>)."
1129 #: ../src/guestfs.pod:565
1131 "Replacing backslash characters with forward slash characters is also outside "
1132 "the scope of libguestfs, but something that you can easily do."
1136 #: ../src/guestfs.pod:568
1138 "Where we can help is in resolving the case insensitivity of paths. For "
1139 "this, call L</guestfs_case_sensitive_path>."
1143 #: ../src/guestfs.pod:571
1145 "Libguestfs also provides some help for decoding Windows Registry \"hive\" "
1146 "files, through the library C<hivex> which is part of the libguestfs project "
1147 "although ships as a separate tarball. You have to locate and download the "
1148 "hive file(s) yourself, and then pass them to C<hivex> functions. See also "
1149 "the programs L<hivexml(1)>, L<hivexsh(1)>, L<hivexregedit(1)> and "
1150 "L<virt-win-reg(1)> for more help on this issue."
1154 #: ../src/guestfs.pod:579
1155 msgid "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES"
1159 #: ../src/guestfs.pod:581
1161 "Although we don't want to discourage you from using the C API, we will "
1162 "mention here that the same API is also available in other languages."
1166 #: ../src/guestfs.pod:584
1168 "The API is broadly identical in all supported languages. This means that "
1169 "the C call C<guestfs_mount(g,path)> is C<$g-E<gt>mount($path)> in Perl, "
1170 "C<g.mount(path)> in Python, and C<Guestfs.mount g path> in OCaml. In other "
1171 "words, a straightforward, predictable isomorphism between each language."
1175 #: ../src/guestfs.pod:590
1177 "Error messages are automatically transformed into exceptions if the language "
1182 #: ../src/guestfs.pod:593
1184 "We don't try to \"object orientify\" parts of the API in OO languages, "
1185 "although contributors are welcome to write higher level APIs above what we "
1186 "provide in their favourite languages if they wish."
1190 #: ../src/guestfs.pod:599
1195 #: ../src/guestfs.pod:601
1197 "You can use the I<guestfs.h> header file from C++ programs. The C++ API is "
1198 "identical to the C API. C++ classes and exceptions are not used."
1202 #: ../src/guestfs.pod:605
1207 #: ../src/guestfs.pod:607
1209 "The C# bindings are highly experimental. Please read the warnings at the "
1210 "top of C<csharp/Libguestfs.cs>."
1214 #: ../src/guestfs.pod:610
1219 #: ../src/guestfs.pod:612
1221 "This is the only language binding that is working but incomplete. Only "
1222 "calls which return simple integers have been bound in Haskell, and we are "
1223 "looking for help to complete this binding."
1227 #: ../src/guestfs.pod:616
1232 #: ../src/guestfs.pod:618
1234 "Full documentation is contained in the Javadoc which is distributed with "
1239 #: ../src/guestfs.pod:621
1244 #: ../src/guestfs.pod:623
1245 msgid "For documentation see the file C<guestfs.mli>."
1249 #: ../src/guestfs.pod:625
1254 #: ../src/guestfs.pod:627
1255 msgid "For documentation see L<Sys::Guestfs(3)>."
1259 #: ../src/guestfs.pod:629
1264 #: ../src/guestfs.pod:631
1265 msgid "For documentation do:"
1269 #: ../src/guestfs.pod:633
1273 " >>> import guestfs\n"
1274 " >>> help (guestfs)\n"
1279 #: ../src/guestfs.pod:637
1284 #: ../src/guestfs.pod:639
1286 "Use the Guestfs module. There is no Ruby-specific documentation, but you "
1287 "can find examples written in Ruby in the libguestfs source."
1291 #: ../src/guestfs.pod:642
1292 msgid "B<shell scripts>"
1296 #: ../src/guestfs.pod:644
1297 msgid "For documentation see L<guestfish(1)>."
1301 #: ../src/guestfs.pod:648
1302 msgid "LIBGUESTFS GOTCHAS"
1306 #: ../src/guestfs.pod:650
1308 "L<http://en.wikipedia.org/wiki/Gotcha_(programming)>: \"A feature of a "
1309 "system [...] that works in the way it is documented but is counterintuitive "
1310 "and almost invites mistakes.\""
1314 #: ../src/guestfs.pod:654
1316 "Since we developed libguestfs and the associated tools, there are several "
1317 "things we would have designed differently, but are now stuck with for "
1318 "backwards compatibility or other reasons. If there is ever a libguestfs 2.0 "
1319 "release, you can expect these to change. Beware of them."
1323 #: ../src/guestfs.pod:662
1324 msgid "Autosync / forgetting to sync."
1328 #: ../src/guestfs.pod:664
1330 "When modifying a filesystem from C or another language, you B<must> unmount "
1331 "all filesystems and call L</guestfs_sync> explicitly before you close the "
1332 "libguestfs handle. You can also call:"
1336 #: ../src/guestfs.pod:668
1339 " guestfs_set_autosync (g, 1);\n"
1344 #: ../src/guestfs.pod:670
1346 "to have the unmount/sync done automatically for you when the handle 'g' is "
1347 "closed. (This feature is called \"autosync\", L</guestfs_set_autosync> "
1352 #: ../src/guestfs.pod:674
1354 "If you forget to do this, then it is entirely possible that your changes "
1355 "won't be written out, or will be partially written, or (very rarely) that "
1356 "you'll get disk corruption."
1360 #: ../src/guestfs.pod:678
1362 "Note that in L<guestfish(3)> autosync is the default. So quick and dirty "
1363 "guestfish scripts that forget to sync will work just fine, which can make "
1364 "this very puzzling if you are trying to debug a problem."
1368 #: ../src/guestfs.pod:682
1369 msgid "Mount option C<-o sync> should not be the default."
1373 #: ../src/guestfs.pod:684
1375 "If you use L</guestfs_mount>, then C<-o sync,noatime> are added implicitly. "
1376 "However C<-o sync> does not add any reliability benefit, but does have a "
1377 "very large performance impact."
1381 #: ../src/guestfs.pod:688
1383 "The work around is to use L</guestfs_mount_options> and set the mount "
1384 "options that you actually want to use."
1388 #: ../src/guestfs.pod:691
1389 msgid "Read-only should be the default."
1393 #: ../src/guestfs.pod:693
1395 "In L<guestfish(3)>, I<--ro> should be the default, and you should have to "
1396 "specify I<--rw> if you want to make changes to the image."
1400 #: ../src/guestfs.pod:696
1401 msgid "This would reduce the potential to corrupt live VM images."
1405 #: ../src/guestfs.pod:698
1407 "Note that many filesystems change the disk when you just mount and unmount, "
1408 "even if you didn't perform any writes. You need to use "
1409 "L</guestfs_add_drive_ro> to guarantee that the disk is not changed."
1413 #: ../src/guestfs.pod:702
1414 msgid "guestfish command line is hard to use."
1418 #: ../src/guestfs.pod:704
1420 "C<guestfish disk.img> doesn't do what people expect (open C<disk.img> for "
1421 "examination). It tries to run a guestfish command C<disk.img> which doesn't "
1422 "exist, so it fails. In earlier versions of guestfish the error message was "
1423 "also unintuitive, but we have corrected this since. Like the Bourne shell, "
1424 "we should have used C<guestfish -c command> to run commands."
1428 #: ../src/guestfs.pod:711
1429 msgid "guestfish megabyte modifiers don't work right on all commands"
1433 #: ../src/guestfs.pod:713
1435 "In recent guestfish you can use C<1M> to mean 1 megabyte (and similarly for "
1436 "other modifiers). What guestfish actually does is to multiply the number "
1437 "part by the modifier part and pass the result to the C API. However this "
1438 "doesn't work for a few APIs which aren't expecting bytes, but are already "
1439 "expecting some other unit (eg. megabytes)."
1443 #: ../src/guestfs.pod:720
1444 msgid "The most common is L</guestfs_lvcreate>. The guestfish command:"
1448 #: ../src/guestfs.pod:722
1451 " lvcreate LV VG 100M\n"
1456 #: ../src/guestfs.pod:724
1458 "does not do what you might expect. Instead because L</guestfs_lvcreate> is "
1459 "already expecting megabytes, this tries to create a 100 I<terabyte> (100 "
1460 "megabytes * megabytes) logical volume. The error message you get from this "
1461 "is also a little obscure."
1465 #: ../src/guestfs.pod:729
1467 "This could be fixed in the generator by specially marking parameters and "
1468 "return values which take bytes or other units."
1472 #: ../src/guestfs.pod:732
1473 msgid "Library should return errno with error messages."
1477 #: ../src/guestfs.pod:734
1479 "It would be a nice-to-have to be able to get the original value of 'errno' "
1480 "from inside the appliance along error paths (where set). Currently "
1481 "L<guestmount(1)> goes through hoops to try to reverse the error message "
1482 "string into an errno, see the function error() in fuse/guestmount.c."
1486 #: ../src/guestfs.pod:740
1488 "In libguestfs 1.5.4, the protocol was changed so that the Linux errno is "
1489 "sent back from the daemon."
1493 #: ../src/guestfs.pod:745
1494 msgid "PROTOCOL LIMITS"
1498 #: ../src/guestfs.pod:747
1500 "Internally libguestfs uses a message-based protocol to pass API calls and "
1501 "their responses to and from a small \"appliance\" (see L</INTERNALS> for "
1502 "plenty more detail about this). The maximum message size used by the "
1503 "protocol is slightly less than 4 MB. For some API calls you may need to be "
1504 "aware of this limit. The API calls which may be affected are individually "
1505 "documented, with a link back to this section of the documentation."
1509 #: ../src/guestfs.pod:755
1511 "A simple call such as L</guestfs_cat> returns its result (the file data) in "
1512 "a simple string. Because this string is at some point internally encoded as "
1513 "a message, the maximum size that it can return is slightly under 4 MB. If "
1514 "the requested file is larger than this then you will get an error."
1518 #: ../src/guestfs.pod:761
1520 "In order to transfer large files into and out of the guest filesystem, you "
1521 "need to use particular calls that support this. The sections L</UPLOADING> "
1522 "and L</DOWNLOADING> document how to do this."
1526 #: ../src/guestfs.pod:765
1528 "You might also consider mounting the disk image using our FUSE filesystem "
1529 "support (L<guestmount(1)>)."
1533 #: ../src/guestfs.pod:768
1534 msgid "KEYS AND PASSPHRASES"
1538 #: ../src/guestfs.pod:770
1540 "Certain libguestfs calls take a parameter that contains sensitive key "
1541 "material, passed in as a C string."
1545 #: ../src/guestfs.pod:773
1547 "In the future we would hope to change the libguestfs implementation so that "
1548 "keys are L<mlock(2)>-ed into physical RAM, and thus can never end up in "
1549 "swap. However this is I<not> done at the moment, because of the complexity "
1550 "of such an implementation."
1554 #: ../src/guestfs.pod:778
1556 "Therefore you should be aware that any key parameter you pass to libguestfs "
1557 "might end up being written out to the swap partition. If this is a concern, "
1558 "scrub the swap partition or don't use libguestfs on encrypted devices."
1562 #: ../src/guestfs.pod:783
1563 msgid "CONNECTION MANAGEMENT"
1567 #: ../src/guestfs.pod:785
1572 #: ../src/guestfs.pod:787
1574 "C<guestfs_h> is the opaque type representing a connection handle. Create a "
1575 "handle by calling L</guestfs_create>. Call L</guestfs_close> to free the "
1576 "handle and release all resources used."
1580 #: ../src/guestfs.pod:791
1582 "For information on using multiple handles and threads, see the section "
1583 "L</MULTIPLE HANDLES AND MULTIPLE THREADS> below."
1587 #: ../src/guestfs.pod:794
1588 msgid "guestfs_create"
1592 #: ../src/guestfs.pod:796
1595 " guestfs_h *guestfs_create (void);\n"
1600 #: ../src/guestfs.pod:798
1601 msgid "Create a connection handle."
1605 #: ../src/guestfs.pod:800
1606 msgid "You have to call L</guestfs_add_drive> on the handle at least once."
1610 #: ../src/guestfs.pod:802
1612 "This function returns a non-NULL pointer to a handle on success or NULL on "
1617 #: ../src/guestfs.pod:805
1618 msgid "After configuring the handle, you have to call L</guestfs_launch>."
1622 #: ../src/guestfs.pod:807
1624 "You may also want to configure error handling for the handle. See L</ERROR "
1625 "HANDLING> section below."
1629 #: ../src/guestfs.pod:810
1630 msgid "guestfs_close"
1634 #: ../src/guestfs.pod:812
1637 " void guestfs_close (guestfs_h *g);\n"
1642 #: ../src/guestfs.pod:814
1643 msgid "This closes the connection handle and frees up all resources used."
1647 #: ../src/guestfs.pod:816
1648 msgid "ERROR HANDLING"
1652 #: ../src/guestfs.pod:818
1654 "The convention in all functions that return C<int> is that they return C<-1> "
1655 "to indicate an error. You can get additional information on errors by "
1656 "calling L</guestfs_last_error> and/or by setting up an error handler with "
1657 "L</guestfs_set_error_handler>."
1661 #: ../src/guestfs.pod:823
1662 msgid "The default error handler prints the information string to C<stderr>."
1666 #: ../src/guestfs.pod:825
1668 "Out of memory errors are handled differently. The default action is to call "
1669 "L<abort(3)>. If this is undesirable, then you can set a handler using "
1670 "L</guestfs_set_out_of_memory_handler>."
1674 #: ../src/guestfs.pod:829
1675 msgid "guestfs_last_error"
1679 #: ../src/guestfs.pod:831
1682 " const char *guestfs_last_error (guestfs_h *g);\n"
1687 #: ../src/guestfs.pod:833
1689 "This returns the last error message that happened on C<g>. If there has not "
1690 "been an error since the handle was created, then this returns C<NULL>."
1694 #: ../src/guestfs.pod:837
1696 "The lifetime of the returned string is until the next error occurs, or "
1697 "L</guestfs_close> is called."
1701 #: ../src/guestfs.pod:840
1703 "The error string is not localized (ie. is always in English), because this "
1704 "makes searching for error messages in search engines give the largest number "
1709 #: ../src/guestfs.pod:844
1710 msgid "guestfs_set_error_handler"
1714 #: ../src/guestfs.pod:846
1717 " typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
1719 " const char *msg);\n"
1720 " void guestfs_set_error_handler (guestfs_h *g,\n"
1721 " guestfs_error_handler_cb cb,\n"
1727 #: ../src/guestfs.pod:853
1729 "The callback C<cb> will be called if there is an error. The parameters "
1730 "passed to the callback are an opaque data pointer and the error message "
1735 #: ../src/guestfs.pod:857
1737 "Note that the message string C<msg> is freed as soon as the callback "
1738 "function returns, so if you want to stash it somewhere you must make your "
1743 #: ../src/guestfs.pod:861
1744 msgid "The default handler prints messages on C<stderr>."
1748 #: ../src/guestfs.pod:863
1749 msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
1753 #: ../src/guestfs.pod:865
1754 msgid "guestfs_get_error_handler"
1758 #: ../src/guestfs.pod:867
1761 " guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
1762 " void **opaque_rtn);\n"
1767 #: ../src/guestfs.pod:870
1768 msgid "Returns the current error handler callback."
1772 #: ../src/guestfs.pod:872
1773 msgid "guestfs_set_out_of_memory_handler"
1777 #: ../src/guestfs.pod:874
1780 " typedef void (*guestfs_abort_cb) (void);\n"
1781 " int guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
1782 " guestfs_abort_cb);\n"
1787 #: ../src/guestfs.pod:878
1789 "The callback C<cb> will be called if there is an out of memory situation. "
1790 "I<Note this callback must not return>."
1794 #: ../src/guestfs.pod:881
1795 msgid "The default is to call L<abort(3)>."
1799 #: ../src/guestfs.pod:883
1800 msgid "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
1804 #: ../src/guestfs.pod:886
1805 msgid "guestfs_get_out_of_memory_handler"
1809 #: ../src/guestfs.pod:888
1812 " guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
1817 #: ../src/guestfs.pod:890
1818 msgid "This returns the current out of memory handler."
1822 #: ../src/guestfs.pod:892
1827 #: ../src/guestfs.pod:894
1829 "Libguestfs needs a kernel and initrd.img, which it finds by looking along an "
1834 #: ../src/guestfs.pod:897
1836 "By default it looks for these in the directory C<$libdir/guestfs> "
1837 "(eg. C</usr/local/lib/guestfs> or C</usr/lib64/guestfs>)."
1841 #: ../src/guestfs.pod:900
1843 "Use L</guestfs_set_path> or set the environment variable L</LIBGUESTFS_PATH> "
1844 "to change the directories that libguestfs will search in. The value is a "
1845 "colon-separated list of paths. The current directory is I<not> searched "
1846 "unless the path contains an empty element or C<.>. For example "
1847 "C<LIBGUESTFS_PATH=:/usr/lib/guestfs> would search the current directory and "
1848 "then C</usr/lib/guestfs>."
1852 #: ../src/guestfs.pod:907
1853 msgid "HIGH-LEVEL API ACTIONS"
1857 #: ../src/guestfs.pod:909
1858 msgid "ABI GUARANTEE"
1862 #: ../src/guestfs.pod:911
1864 "We guarantee the libguestfs ABI (binary interface), for public, high-level "
1865 "actions as outlined in this section. Although we will deprecate some "
1866 "actions, for example if they get replaced by newer calls, we will keep the "
1867 "old actions forever. This allows you the developer to program in confidence "
1868 "against the libguestfs API."
1872 #: ../src/guestfs.pod:917 ../fish/guestfish.pod:898
1877 #: ../src/guestfs.pod:919
1882 #: ../src/guestfs.pod:921
1887 #: ../src/guestfs.pod:923
1888 msgid "AVAILABILITY"
1892 #: ../src/guestfs.pod:925
1893 msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
1897 #: ../src/guestfs.pod:927
1899 "Using L</guestfs_available> you can test availability of the following "
1900 "groups of functions. This test queries the appliance to see if the "
1901 "appliance you are currently using supports the functionality."
1905 #: ../src/guestfs.pod:932
1906 msgid "@AVAILABILITY@"
1910 #: ../src/guestfs.pod:934
1911 msgid "GUESTFISH supported COMMAND"
1915 #: ../src/guestfs.pod:936
1917 "In L<guestfish(3)> there is a handy interactive command C<supported> which "
1918 "prints out the available groups and whether they are supported by this build "
1919 "of libguestfs. Note however that you have to do C<run> first."
1923 #: ../src/guestfs.pod:941
1924 msgid "SINGLE CALLS AT COMPILE TIME"
1928 #: ../src/guestfs.pod:943
1930 "If you need to test whether a single libguestfs function is available at "
1931 "compile time, we recommend using build tools such as autoconf or cmake. For "
1932 "example in autotools you could use:"
1936 #: ../src/guestfs.pod:948
1939 " AC_CHECK_LIB([guestfs],[guestfs_create])\n"
1940 " AC_CHECK_FUNCS([guestfs_dd])\n"
1945 #: ../src/guestfs.pod:951
1947 "which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
1952 #: ../src/guestfs.pod:954
1953 msgid "SINGLE CALLS AT RUN TIME"
1957 #: ../src/guestfs.pod:956
1959 "Testing at compile time doesn't guarantee that a function really exists in "
1960 "the library. The reason is that you might be dynamically linked against a "
1961 "previous I<libguestfs.so> (dynamic library) which doesn't have the call. "
1962 "This situation unfortunately results in a segmentation fault, which is a "
1963 "shortcoming of the C dynamic linking system itself."
1967 #: ../src/guestfs.pod:963
1969 "You can use L<dlopen(3)> to test if a function is available at run time, as "
1970 "in this example program (note that you still need the compile time check as "
1975 #: ../src/guestfs.pod:967
1978 " #include <config.h>\n"
1983 #: ../src/guestfs.pod:969
1986 " #include <stdio.h>\n"
1987 " #include <stdlib.h>\n"
1988 " #include <unistd.h>\n"
1989 " #include <dlfcn.h>\n"
1990 " #include <guestfs.h>\n"
1995 #: ../src/guestfs.pod:975
2000 " #ifdef HAVE_GUESTFS_DD\n"
2002 " int has_function;\n"
2007 #: ../src/guestfs.pod:981
2010 " /* Test if the function guestfs_dd is really available. */\n"
2011 " dl = dlopen (NULL, RTLD_LAZY);\n"
2013 " fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
2014 " exit (EXIT_FAILURE);\n"
2016 " has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
2022 #: ../src/guestfs.pod:990
2025 " if (!has_function)\n"
2026 " printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
2028 " printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
2029 " /* Now it's safe to call\n"
2030 " guestfs_dd (g, \"foo\", \"bar\");\n"
2034 " printf (\"guestfs_dd function was not found at compile time\\n\");\n"
2041 #: ../src/guestfs.pod:1003
2043 "You may think the above is an awful lot of hassle, and it is. There are "
2044 "other ways outside of the C linking system to ensure that this kind of "
2045 "incompatibility never arises, such as using package versioning:"
2049 #: ../src/guestfs.pod:1008
2052 " Requires: libguestfs >= 1.0.80\n"
2057 #: ../src/guestfs.pod:1010 ../src/guestfs.pod:1015
2062 #: ../src/guestfs.pod:1012
2064 "<!-- old anchor for the next section --> <a "
2065 "name=\"state_machine_and_low_level_event_api\"/>"
2069 #: ../src/guestfs.pod:1017
2070 msgid "ARCHITECTURE"
2074 #: ../src/guestfs.pod:1019
2076 "Internally, libguestfs is implemented by running an appliance (a special "
2077 "type of small virtual machine) using L<qemu(1)>. Qemu runs as a child "
2078 "process of the main program."
2082 #: ../src/guestfs.pod:1023
2085 " ___________________\n"
2087 " | main program |\n"
2089 " | | child process / appliance\n"
2090 " | | __________________________\n"
2092 " +-------------------+ RPC | +-----------------+ |\n"
2093 " | libguestfs <--------------------> guestfsd | |\n"
2094 " | | | +-----------------+ |\n"
2095 " \\___________________/ | | Linux kernel | |\n"
2096 " | +--^--------------+ |\n"
2097 " \\_________|________________/\n"
2103 " \\______________/\n"
2108 #: ../src/guestfs.pod:1043
2110 "The library, linked to the main program, creates the child process and hence "
2111 "the appliance in the L</guestfs_launch> function."
2115 #: ../src/guestfs.pod:1046
2117 "Inside the appliance is a Linux kernel and a complete stack of userspace "
2118 "tools (such as LVM and ext2 programs) and a small controlling daemon called "
2119 "L</guestfsd>. The library talks to L</guestfsd> using remote procedure "
2120 "calls (RPC). There is a mostly one-to-one correspondence between libguestfs "
2121 "API calls and RPC calls to the daemon. Lastly the disk image(s) are "
2122 "attached to the qemu process which translates device access by the "
2123 "appliance's Linux kernel into accesses to the image."
2127 #: ../src/guestfs.pod:1055
2129 "A common misunderstanding is that the appliance \"is\" the virtual machine. "
2130 "Although the disk image you are attached to might also be used by some "
2131 "virtual machine, libguestfs doesn't know or care about this. (But you will "
2132 "care if both libguestfs's qemu process and your virtual machine are trying "
2133 "to update the disk image at the same time, since these usually results in "
2134 "massive disk corruption)."
2138 #: ../src/guestfs.pod:1062
2139 msgid "STATE MACHINE"
2143 #: ../src/guestfs.pod:1064
2144 msgid "libguestfs uses a state machine to model the child process:"
2148 #: ../src/guestfs.pod:1066
2160 " / | \\ \\ guestfs_launch\n"
2161 " / | _\\__V______\n"
2163 " / | | LAUNCHING |\n"
2164 " / | \\___________/\n"
2166 " / | guestfs_launch\n"
2168 " ______ / __|____V\n"
2169 " / \\ ------> / \\\n"
2170 " | BUSY | | READY |\n"
2171 " \\______/ <------ \\________/\n"
2176 #: ../src/guestfs.pod:1088
2178 "The normal transitions are (1) CONFIG (when the handle is created, but there "
2179 "is no child process), (2) LAUNCHING (when the child process is booting up), "
2180 "(3) alternating between READY and BUSY as commands are issued to, and "
2181 "carried out by, the child process."
2185 #: ../src/guestfs.pod:1093
2187 "The guest may be killed by L</guestfs_kill_subprocess>, or may die "
2188 "asynchronously at any time (eg. due to some internal error), and that causes "
2189 "the state to transition back to CONFIG."
2193 #: ../src/guestfs.pod:1097
2195 "Configuration commands for qemu such as L</guestfs_add_drive> can only be "
2196 "issued when in the CONFIG state."
2200 #: ../src/guestfs.pod:1100
2202 "The high-level API offers two calls that go from CONFIG through LAUNCHING to "
2203 "READY. L</guestfs_launch> blocks until the child process is READY to accept "
2204 "commands (or until some failure or timeout). L</guestfs_launch> internally "
2205 "moves the state from CONFIG to LAUNCHING while it is running."
2209 #: ../src/guestfs.pod:1106
2211 "High-level API actions such as L</guestfs_mount> can only be issued when in "
2212 "the READY state. These high-level API calls block waiting for the command "
2213 "to be carried out (ie. the state to transition to BUSY and then back to "
2214 "READY). But using the low-level event API, you get non-blocking versions. "
2215 "(But you can still only carry out one operation per handle at a time - that "
2216 "is a limitation of the communications protocol we use)."
2220 #: ../src/guestfs.pod:1114
2222 "Finally, the child process sends asynchronous messages back to the main "
2223 "program, such as kernel log messages. Mostly these are ignored by the "
2224 "high-level API, but using the low-level event API you can register to "
2225 "receive these messages."
2229 #: ../src/guestfs.pod:1119
2230 msgid "SETTING CALLBACKS TO HANDLE EVENTS"
2234 #: ../src/guestfs.pod:1121
2236 "The child process generates events in some situations. Current events "
2237 "include: receiving a log message, the child process exits."
2241 #: ../src/guestfs.pod:1124
2243 "Use the C<guestfs_set_*_callback> functions to set a callback for different "
2248 #: ../src/guestfs.pod:1127
2250 "Only I<one callback of each type> can be registered for each handle. "
2251 "Calling C<guestfs_set_*_callback> again overwrites the previous callback of "
2252 "that type. Cancel all callbacks of this type by calling this function with "
2253 "C<cb> set to C<NULL>."
2257 #: ../src/guestfs.pod:1132
2258 msgid "guestfs_set_log_message_callback"
2262 #: ../src/guestfs.pod:1134
2265 " typedef void (*guestfs_log_message_cb) (guestfs_h *g, void *opaque,\n"
2266 " char *buf, int len);\n"
2267 " void guestfs_set_log_message_callback (guestfs_h *g,\n"
2268 " guestfs_log_message_cb cb,\n"
2274 #: ../src/guestfs.pod:1140
2276 "The callback function C<cb> will be called whenever qemu or the guest writes "
2277 "anything to the console."
2281 #: ../src/guestfs.pod:1143
2282 msgid "Use this function to capture kernel messages and similar."
2286 #: ../src/guestfs.pod:1145
2288 "Normally there is no log message handler, and log messages are just "
2293 #: ../src/guestfs.pod:1148
2294 msgid "guestfs_set_subprocess_quit_callback"
2298 #: ../src/guestfs.pod:1150
2301 " typedef void (*guestfs_subprocess_quit_cb) (guestfs_h *g, void *opaque);\n"
2302 " void guestfs_set_subprocess_quit_callback (guestfs_h *g,\n"
2303 " guestfs_subprocess_quit_cb cb,\n"
2309 #: ../src/guestfs.pod:1155
2311 "The callback function C<cb> will be called when the child process quits, "
2312 "either asynchronously or if killed by L</guestfs_kill_subprocess>. (This "
2313 "corresponds to a transition from any state to the CONFIG state)."
2317 #: ../src/guestfs.pod:1160
2318 msgid "guestfs_set_launch_done_callback"
2322 #: ../src/guestfs.pod:1162
2325 " typedef void (*guestfs_launch_done_cb) (guestfs_h *g, void *opaque);\n"
2326 " void guestfs_set_launch_done_callback (guestfs_h *g,\n"
2327 " guestfs_launch_done_cb cb,\n"
2333 #: ../src/guestfs.pod:1167
2335 "The callback function C<cb> will be called when the child process becomes "
2336 "ready first time after it has been launched. (This corresponds to a "
2337 "transition from LAUNCHING to the READY state)."
2341 #: ../src/guestfs.pod:1171
2342 msgid "guestfs_set_close_callback"
2346 #: ../src/guestfs.pod:1173
2349 " typedef void (*guestfs_close_cb) (guestfs_h *g, void *opaque);\n"
2350 " void guestfs_set_close_callback (guestfs_h *g,\n"
2351 " guestfs_close_cb cb,\n"
2357 #: ../src/guestfs.pod:1178
2359 "The callback function C<cb> will be called while the handle is being closed "
2360 "(synchronously from L</guestfs_close>)."
2364 #: ../src/guestfs.pod:1181
2366 "Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
2367 "handles that are open when the program exits. This means that this callback "
2368 "might be called indirectly from L<exit(3)>, which can cause unexpected "
2369 "problems in higher-level languages (eg. if your HLL interpreter has already "
2370 "been cleaned up by the time this is called, and if your callback then jumps "
2371 "into some HLL function)."
2375 #: ../src/guestfs.pod:1189
2376 msgid "guestfs_set_progress_callback"
2380 #: ../src/guestfs.pod:1191
2383 " typedef void (*guestfs_progress_cb) (guestfs_h *g, void *opaque,\n"
2384 " int proc_nr, int serial,\n"
2385 " uint64_t position, uint64_t total);\n"
2386 " void guestfs_set_progress_callback (guestfs_h *g,\n"
2387 " guestfs_progress_cb cb,\n"
2393 #: ../src/guestfs.pod:1198
2395 "Some long-running operations can generate progress messages. If this "
2396 "callback is registered, then it will be called each time a progress message "
2397 "is generated (usually two seconds after the operation started, and three "
2398 "times per second thereafter until it completes, although the frequency may "
2399 "change in future versions)."
2403 #: ../src/guestfs.pod:1204
2405 "The callback receives two numbers: C<position> and C<total>. The units of "
2406 "C<total> are not defined, although for some operations C<total> may relate "
2407 "in some way to the amount of data to be transferred (eg. in bytes or "
2408 "megabytes), and C<position> may be the portion which has been transferred."
2412 #: ../src/guestfs.pod:1210
2413 msgid "The only defined and stable parts of the API are:"
2417 #: ../src/guestfs.pod:1216
2419 "The callback can display to the user some type of progress bar or indicator "
2420 "which shows the ratio of C<position>:C<total>."
2424 #: ../src/guestfs.pod:1221
2425 msgid "0 E<lt>= C<position> E<lt>= C<total>"
2429 #: ../src/guestfs.pod:1225
2431 "If any progress notification is sent during a call, then a final progress "
2432 "notification is always sent when C<position> = C<total>."
2436 #: ../src/guestfs.pod:1228
2438 "This is to simplify caller code, so callers can easily set the progress "
2439 "indicator to \"100%\" at the end of the operation, without requiring special "
2440 "code to detect this case."
2444 #: ../src/guestfs.pod:1234
2446 "The callback also receives the procedure number and serial number of the "
2447 "call. These are only useful for debugging protocol issues, and the callback "
2448 "can normally ignore them. The callback may want to print these numbers in "
2449 "error messages or debugging messages."
2453 #: ../src/guestfs.pod:1239
2454 msgid "PRIVATE DATA AREA"
2458 #: ../src/guestfs.pod:1241
2460 "You can attach named pieces of private data to the libguestfs handle, and "
2461 "fetch them by name for the lifetime of the handle. This is called the "
2462 "private data area and is only available from the C API."
2466 #: ../src/guestfs.pod:1245
2467 msgid "To attach a named piece of data, use the following call:"
2471 #: ../src/guestfs.pod:1247
2474 " void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
2479 #: ../src/guestfs.pod:1249
2481 "C<key> is the name to associate with this data, and C<data> is an arbitrary "
2482 "pointer (which can be C<NULL>). Any previous item with the same name is "
2487 #: ../src/guestfs.pod:1253
2489 "You can use any C<key> you want, but names beginning with an underscore "
2490 "character are reserved for internal libguestfs purposes (for implementing "
2491 "language bindings). It is recommended to prefix the name with some unique "
2492 "string to avoid collisions with other users."
2496 #: ../src/guestfs.pod:1258
2497 msgid "To retrieve the pointer, use:"
2501 #: ../src/guestfs.pod:1260
2504 " void *guestfs_get_private (guestfs_h *g, const char *key);\n"
2509 #: ../src/guestfs.pod:1262
2511 "This function returns C<NULL> if either no data is found associated with "
2512 "C<key>, or if the user previously set the C<key>'s C<data> pointer to "
2517 #: ../src/guestfs.pod:1266
2519 "Libguestfs does not try to look at or interpret the C<data> pointer in any "
2520 "way. As far as libguestfs is concerned, it need not be a valid pointer at "
2521 "all. In particular, libguestfs does I<not> try to free the data when the "
2522 "handle is closed. If the data must be freed, then the caller must either "
2523 "free it before calling L</guestfs_close> or must set up a close callback to "
2524 "do it (see L</guestfs_set_close_callback>, and note that only one callback "
2525 "can be registered for a handle)."
2529 #: ../src/guestfs.pod:1274
2531 "The private data area is implemented using a hash table, and should be "
2532 "reasonably efficient for moderate numbers of keys."
2536 #: ../src/guestfs.pod:1277
2537 msgid "BLOCK DEVICE NAMING"
2541 #: ../src/guestfs.pod:1279
2543 "In the kernel there is now quite a profusion of schemata for naming block "
2544 "devices (in this context, by I<block device> I mean a physical or virtual "
2545 "hard drive). The original Linux IDE driver used names starting with "
2546 "C</dev/hd*>. SCSI devices have historically used a different naming scheme, "
2547 "C</dev/sd*>. When the Linux kernel I<libata> driver became a popular "
2548 "replacement for the old IDE driver (particularly for SATA devices) those "
2549 "devices also used the C</dev/sd*> scheme. Additionally we now have virtual "
2550 "machines with paravirtualized drivers. This has created several different "
2551 "naming systems, such as C</dev/vd*> for virtio disks and C</dev/xvd*> for "
2556 #: ../src/guestfs.pod:1291
2558 "As discussed above, libguestfs uses a qemu appliance running an embedded "
2559 "Linux kernel to access block devices. We can run a variety of appliances "
2560 "based on a variety of Linux kernels."
2564 #: ../src/guestfs.pod:1295
2566 "This causes a problem for libguestfs because many API calls use device or "
2567 "partition names. Working scripts and the recipe (example) scripts that we "
2568 "make available over the internet could fail if the naming scheme changes."
2572 #: ../src/guestfs.pod:1300
2574 "Therefore libguestfs defines C</dev/sd*> as the I<standard naming scheme>. "
2575 "Internally C</dev/sd*> names are translated, if necessary, to other names as "
2576 "required. For example, under RHEL 5 which uses the C</dev/hd*> scheme, any "
2577 "device parameter C</dev/sda2> is translated to C</dev/hda2> transparently."
2581 #: ../src/guestfs.pod:1306
2583 "Note that this I<only> applies to parameters. The L</guestfs_list_devices>, "
2584 "L</guestfs_list_partitions> and similar calls return the true names of the "
2585 "devices and partitions as known to the appliance."
2589 #: ../src/guestfs.pod:1311
2590 msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION"
2594 #: ../src/guestfs.pod:1313
2596 "Usually this translation is transparent. However in some (very rare) cases "
2597 "you may need to know the exact algorithm. Such cases include where you use "
2598 "L</guestfs_config> to add a mixture of virtio and IDE devices to the "
2599 "qemu-based appliance, so have a mixture of C</dev/sd*> and C</dev/vd*> "
2604 #: ../src/guestfs.pod:1319
2606 "The algorithm is applied only to I<parameters> which are known to be either "
2607 "device or partition names. Return values from functions such as "
2608 "L</guestfs_list_devices> are never changed."
2612 #: ../src/guestfs.pod:1327
2613 msgid "Is the string a parameter which is a device or partition name?"
2617 #: ../src/guestfs.pod:1331
2618 msgid "Does the string begin with C</dev/sd>?"
2622 #: ../src/guestfs.pod:1335
2624 "Does the named device exist? If so, we use that device. However if I<not> "
2625 "then we continue with this algorithm."
2629 #: ../src/guestfs.pod:1340
2630 msgid "Replace initial C</dev/sd> string with C</dev/hd>."
2634 #: ../src/guestfs.pod:1342
2635 msgid "For example, change C</dev/sda2> to C</dev/hda2>."
2639 #: ../src/guestfs.pod:1344
2640 msgid "If that named device exists, use it. If not, continue."
2644 #: ../src/guestfs.pod:1348
2645 msgid "Replace initial C</dev/sd> string with C</dev/vd>."
2649 #: ../src/guestfs.pod:1350
2650 msgid "If that named device exists, use it. If not, return an error."
2654 #: ../src/guestfs.pod:1354
2655 msgid "PORTABILITY CONCERNS"
2659 #: ../src/guestfs.pod:1356
2661 "Although the standard naming scheme and automatic translation is useful for "
2662 "simple programs and guestfish scripts, for larger programs it is best not to "
2663 "rely on this mechanism."
2667 #: ../src/guestfs.pod:1360
2669 "Where possible for maximum future portability programs using libguestfs "
2670 "should use these future-proof techniques:"
2674 #: ../src/guestfs.pod:1367
2676 "Use L</guestfs_list_devices> or L</guestfs_list_partitions> to list actual "
2677 "device names, and then use those names directly."
2681 #: ../src/guestfs.pod:1370
2682 msgid "Since those device names exist by definition, they will never be translated."
2686 #: ../src/guestfs.pod:1375
2688 "Use higher level ways to identify filesystems, such as LVM names, UUIDs and "
2689 "filesystem labels."
2693 #: ../src/guestfs.pod:1380
2698 #: ../src/guestfs.pod:1382
2699 msgid "COMMUNICATION PROTOCOL"
2703 #: ../src/guestfs.pod:1384
2705 "Don't rely on using this protocol directly. This section documents how it "
2706 "currently works, but it may change at any time."
2710 #: ../src/guestfs.pod:1387
2712 "The protocol used to talk between the library and the daemon running inside "
2713 "the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
2714 "1014, RFC 1832, RFC 4506)."
2718 #: ../src/guestfs.pod:1391
2720 "The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
2721 "this file is automatically generated)."
2725 #: ../src/guestfs.pod:1394
2727 "There are two broad cases, ordinary functions that don't have any C<FileIn> "
2728 "and C<FileOut> parameters, which are handled with very simple request/reply "
2729 "messages. Then there are functions that have any C<FileIn> or C<FileOut> "
2730 "parameters, which use the same request and reply messages, but they may also "
2731 "be followed by files sent using a chunked encoding."
2735 #: ../src/guestfs.pod:1401
2736 msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
2740 #: ../src/guestfs.pod:1403
2741 msgid "For ordinary functions, the request message is:"
2745 #: ../src/guestfs.pod:1405
2748 " total length (header + arguments,\n"
2749 " but not including the length word itself)\n"
2750 " struct guestfs_message_header (encoded as XDR)\n"
2751 " struct guestfs_<foo>_args (encoded as XDR)\n"
2756 #: ../src/guestfs.pod:1410
2758 "The total length field allows the daemon to allocate a fixed size buffer "
2759 "into which it slurps the rest of the message. As a result, the total length "
2760 "is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the "
2761 "effective size of any request is limited to somewhere under this size."
2765 #: ../src/guestfs.pod:1416
2767 "Note also that many functions don't take any arguments, in which case the "
2768 "C<guestfs_I<foo>_args> is completely omitted."
2772 #: ../src/guestfs.pod:1419
2774 "The header contains the procedure number (C<guestfs_proc>) which is how the "
2775 "receiver knows what type of args structure to expect, or none at all."
2779 #: ../src/guestfs.pod:1423
2780 msgid "The reply message for ordinary functions is:"
2784 #: ../src/guestfs.pod:1425
2787 " total length (header + ret,\n"
2788 " but not including the length word itself)\n"
2789 " struct guestfs_message_header (encoded as XDR)\n"
2790 " struct guestfs_<foo>_ret (encoded as XDR)\n"
2795 #: ../src/guestfs.pod:1430
2797 "As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
2798 "functions that return no formal return values."
2802 #: ../src/guestfs.pod:1433
2803 msgid "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
2807 #: ../src/guestfs.pod:1436
2809 "In the case of an error, a flag is set in the header, and the reply message "
2810 "is slightly changed:"
2814 #: ../src/guestfs.pod:1439
2817 " total length (header + error,\n"
2818 " but not including the length word itself)\n"
2819 " struct guestfs_message_header (encoded as XDR)\n"
2820 " struct guestfs_message_error (encoded as XDR)\n"
2825 #: ../src/guestfs.pod:1444
2827 "The C<guestfs_message_error> structure contains the error message as a "
2832 #: ../src/guestfs.pod:1447
2833 msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
2837 #: ../src/guestfs.pod:1449
2839 "A C<FileIn> parameter indicates that we transfer a file I<into> the guest. "
2840 "The normal request message is sent (see above). However this is followed by "
2841 "a sequence of file chunks."
2845 #: ../src/guestfs.pod:1453
2848 " total length (header + arguments,\n"
2849 " but not including the length word itself,\n"
2850 " and not including the chunks)\n"
2851 " struct guestfs_message_header (encoded as XDR)\n"
2852 " struct guestfs_<foo>_args (encoded as XDR)\n"
2853 " sequence of chunks for FileIn param #0\n"
2854 " sequence of chunks for FileIn param #1 etc.\n"
2859 #: ../src/guestfs.pod:1461
2860 msgid "The \"sequence of chunks\" is:"
2864 #: ../src/guestfs.pod:1463
2867 " length of chunk (not including length word itself)\n"
2868 " struct guestfs_chunk (encoded as XDR)\n"
2869 " length of chunk\n"
2870 " struct guestfs_chunk (encoded as XDR)\n"
2872 " length of chunk\n"
2873 " struct guestfs_chunk (with data.data_len == 0)\n"
2878 #: ../src/guestfs.pod:1471
2880 "The final chunk has the C<data_len> field set to zero. Additionally a flag "
2881 "is set in the final chunk to indicate either successful completion or early "
2886 #: ../src/guestfs.pod:1475
2888 "At time of writing there are no functions that have more than one FileIn "
2889 "parameter. However this is (theoretically) supported, by sending the "
2890 "sequence of chunks for each FileIn parameter one after another (from left to "
2895 #: ../src/guestfs.pod:1480
2897 "Both the library (sender) I<and> the daemon (receiver) may cancel the "
2898 "transfer. The library does this by sending a chunk with a special flag set "
2899 "to indicate cancellation. When the daemon sees this, it cancels the whole "
2900 "RPC, does I<not> send any reply, and goes back to reading the next request."
2904 #: ../src/guestfs.pod:1486
2906 "The daemon may also cancel. It does this by writing a special word "
2907 "C<GUESTFS_CANCEL_FLAG> to the socket. The library listens for this during "
2908 "the transfer, and if it gets it, it will cancel the transfer (it sends a "
2909 "cancel chunk). The special word is chosen so that even if cancellation "
2910 "happens right at the end of the transfer (after the library has finished "
2911 "writing and has started listening for the reply), the \"spurious\" cancel "
2912 "flag will not be confused with the reply message."
2916 #: ../src/guestfs.pod:1495
2918 "This protocol allows the transfer of arbitrary sized files (no 32 bit "
2919 "limit), and also files where the size is not known in advance (eg. from "
2920 "pipes or sockets). However the chunks are rather small "
2921 "(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need "
2922 "to keep much in memory."
2926 #: ../src/guestfs.pod:1501
2927 msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
2931 #: ../src/guestfs.pod:1503
2933 "The protocol for FileOut parameters is exactly the same as for FileIn "
2934 "parameters, but with the roles of daemon and library reversed."
2938 #: ../src/guestfs.pod:1506
2941 " total length (header + ret,\n"
2942 " but not including the length word itself,\n"
2943 " and not including the chunks)\n"
2944 " struct guestfs_message_header (encoded as XDR)\n"
2945 " struct guestfs_<foo>_ret (encoded as XDR)\n"
2946 " sequence of chunks for FileOut param #0\n"
2947 " sequence of chunks for FileOut param #1 etc.\n"
2952 #: ../src/guestfs.pod:1514
2953 msgid "INITIAL MESSAGE"
2957 #: ../src/guestfs.pod:1516
2959 "Because the underlying channel (QEmu -net channel) doesn't have any sort of "
2960 "connection control, when the daemon launches it sends an initial word "
2961 "(C<GUESTFS_LAUNCH_FLAG>) which indicates that the guest and daemon is "
2962 "alive. This is what L</guestfs_launch> waits for."
2966 #: ../src/guestfs.pod:1521
2967 msgid "MULTIPLE HANDLES AND MULTIPLE THREADS"
2971 #: ../src/guestfs.pod:1523
2973 "All high-level libguestfs actions are synchronous. If you want to use "
2974 "libguestfs asynchronously then you must create a thread."
2978 #: ../src/guestfs.pod:1526
2980 "Only use the handle from a single thread. Either use the handle exclusively "
2981 "from one thread, or provide your own mutex so that two threads cannot issue "
2982 "calls on the same handle at the same time."
2986 #: ../src/guestfs.pod:1530
2987 msgid "QEMU WRAPPERS"
2991 #: ../src/guestfs.pod:1532
2993 "If you want to compile your own qemu, run qemu from a non-standard location, "
2994 "or pass extra arguments to qemu, then you can write a shell-script wrapper "
2999 #: ../src/guestfs.pod:1536
3001 "There is one important rule to remember: you I<must C<exec qemu>> as the "
3002 "last command in the shell script (so that qemu replaces the shell and "
3003 "becomes the direct child of the libguestfs-using program). If you don't do "
3004 "this, then the qemu process won't be cleaned up correctly."
3008 #: ../src/guestfs.pod:1541
3010 "Here is an example of a wrapper, where I have built my own copy of qemu from "
3015 #: ../src/guestfs.pod:1544
3019 " qemudir=/home/rjones/d/qemu\n"
3020 " exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios "
3026 #: ../src/guestfs.pod:1548
3028 "Save this script as C</tmp/qemu.wrapper> (or wherever), C<chmod +x>, and "
3029 "then use it by setting the LIBGUESTFS_QEMU environment variable. For "
3034 #: ../src/guestfs.pod:1552
3037 " LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n"
3042 #: ../src/guestfs.pod:1554
3044 "Note that libguestfs also calls qemu with the -help and -version options in "
3045 "order to determine features."
3049 #: ../src/guestfs.pod:1557
3050 msgid "LIBGUESTFS VERSION NUMBERS"
3054 #: ../src/guestfs.pod:1559
3056 "Since April 2010, libguestfs has started to make separate development and "
3057 "stable releases, along with corresponding branches in our git repository. "
3058 "These separate releases can be identified by version number:"
3062 #: ../src/guestfs.pod:1564
3065 " even numbers for stable: 1.2.x, 1.4.x, ...\n"
3066 " .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
3072 " | `-------- sub-version\n"
3074 " `------ always '1' because we don't change the ABI\n"
3079 #: ../src/guestfs.pod:1575
3080 msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
3084 #: ../src/guestfs.pod:1577
3086 "As time passes we cherry pick fixes from the development branch and backport "
3087 "those into the stable branch, the effect being that the stable branch should "
3088 "get more stable and less buggy over time. So the stable releases are ideal "
3089 "for people who don't need new features but would just like the software to "
3094 #: ../src/guestfs.pod:1583
3095 msgid "Our criteria for backporting changes are:"
3099 #: ../src/guestfs.pod:1589
3101 "Documentation changes which don't affect any code are backported unless the "
3102 "documentation refers to a future feature which is not in stable."
3106 #: ../src/guestfs.pod:1595
3108 "Bug fixes which are not controversial, fix obvious problems, and have been "
3109 "well tested are backported."
3113 #: ../src/guestfs.pod:1600
3115 "Simple rearrangements of code which shouldn't affect how it works get "
3116 "backported. This is so that the code in the two branches doesn't get too "
3117 "far out of step, allowing us to backport future fixes more easily."
3121 #: ../src/guestfs.pod:1606
3123 "We I<don't> backport new features, new APIs, new tools etc, except in one "
3124 "exceptional case: the new feature is required in order to implement an "
3125 "important bug fix."
3129 #: ../src/guestfs.pod:1612
3131 "A new stable branch starts when we think the new features in development are "
3132 "substantial and compelling enough over the current stable branch to warrant "
3133 "it. When that happens we create new stable and development versions 1.N.0 "
3134 "and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so "
3135 "stable at this point, but by backporting fixes from development, that branch "
3136 "will stabilize over time."
3140 #: ../src/guestfs.pod:1620 ../fish/guestfish.pod:905 ../test-tool/libguestfs-test-tool.pod:104 ../tools/virt-edit.pl:312 ../tools/virt-rescue.pl:226
3141 msgid "ENVIRONMENT VARIABLES"
3145 #: ../src/guestfs.pod:1624 ../fish/guestfish.pod:925
3146 msgid "LIBGUESTFS_APPEND"
3150 #: ../src/guestfs.pod:1626 ../fish/guestfish.pod:927
3151 msgid "Pass additional options to the guest kernel."
3155 #: ../src/guestfs.pod:1628 ../fish/guestfish.pod:929
3156 msgid "LIBGUESTFS_DEBUG"
3160 #: ../src/guestfs.pod:1630
3162 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
3163 "effect as calling C<guestfs_set_verbose (g, 1)>."
3167 #: ../src/guestfs.pod:1633 ../fish/guestfish.pod:934
3168 msgid "LIBGUESTFS_MEMSIZE"
3172 #: ../src/guestfs.pod:1635 ../fish/guestfish.pod:936
3173 msgid "Set the memory allocated to the qemu process, in megabytes. For example:"
3177 #: ../src/guestfs.pod:1638 ../fish/guestfish.pod:939
3180 " LIBGUESTFS_MEMSIZE=700\n"
3185 #: ../src/guestfs.pod:1640 ../fish/guestfish.pod:941
3186 msgid "LIBGUESTFS_PATH"
3190 #: ../src/guestfs.pod:1642
3192 "Set the path that libguestfs uses to search for kernel and initrd.img. See "
3193 "the discussion of paths in section PATH above."
3197 #: ../src/guestfs.pod:1645 ../fish/guestfish.pod:946
3198 msgid "LIBGUESTFS_QEMU"
3202 #: ../src/guestfs.pod:1647 ../fish/guestfish.pod:948
3204 "Set the default qemu binary that libguestfs uses. If not set, then the qemu "
3205 "which was found at compile time by the configure script is used."
3209 #: ../src/guestfs.pod:1651
3210 msgid "See also L</QEMU WRAPPERS> above."
3214 #: ../src/guestfs.pod:1653 ../fish/guestfish.pod:952
3215 msgid "LIBGUESTFS_TRACE"
3219 #: ../src/guestfs.pod:1655
3221 "Set C<LIBGUESTFS_TRACE=1> to enable command traces. This has the same "
3222 "effect as calling C<guestfs_set_trace (g, 1)>."
3226 #: ../src/guestfs.pod:1658 ../fish/guestfish.pod:961
3231 #: ../src/guestfs.pod:1660 ../fish/guestfish.pod:963
3232 msgid "Location of temporary directory, defaults to C</tmp>."
3236 #: ../src/guestfs.pod:1662 ../fish/guestfish.pod:965
3238 "If libguestfs was compiled to use the supermin appliance then each handle "
3239 "will require rather a large amount of space in this directory for short "
3240 "periods of time (~ 80 MB). You can use C<$TMPDIR> to configure another "
3241 "directory to use in case C</tmp> is not large enough."
3245 #: ../src/guestfs.pod:1670 ../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
3250 #: ../src/guestfs.pod:1672
3252 "L<guestfish(1)>, L<guestmount(1)>, L<virt-cat(1)>, L<virt-df(1)>, "
3253 "L<virt-edit(1)>, L<virt-inspector(1)>, L<virt-list-filesystems(1)>, "
3254 "L<virt-list-partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, "
3255 "L<virt-rescue(1)>, L<virt-tar(1)>, L<virt-win-reg(1)>, L<qemu(1)>, "
3256 "L<febootstrap(1)>, L<hivex(3)>, L<http://libguestfs.org/>."
3260 #: ../src/guestfs.pod:1690
3262 "Tools with a similar purpose: L<fdisk(8)>, L<parted(8)>, L<kpartx(8)>, "
3263 "L<lvm(8)>, L<disktype(1)>."
3267 #: ../src/guestfs.pod:1697 ../tools/virt-make-fs.pl:541 ../tools/virt-win-reg.pl:476
3272 #: ../src/guestfs.pod:1699
3273 msgid "To get a list of bugs against libguestfs use this link:"
3277 #: ../src/guestfs.pod:1701
3278 msgid "L<https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools>"
3282 #: ../src/guestfs.pod:1703
3283 msgid "To report a new bug against libguestfs use this link:"
3287 #: ../src/guestfs.pod:1705
3288 msgid "L<https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools>"
3292 #: ../src/guestfs.pod:1707
3293 msgid "When reporting a bug, please check:"
3297 #: ../src/guestfs.pod:1713
3298 msgid "That the bug hasn't been reported already."
3302 #: ../src/guestfs.pod:1717
3303 msgid "That you are testing a recent version."
3307 #: ../src/guestfs.pod:1721
3308 msgid "Describe the bug accurately, and give a way to reproduce it."
3312 #: ../src/guestfs.pod:1725
3314 "Run libguestfs-test-tool and paste the B<complete, unedited> output into the "
3319 #: ../src/guestfs.pod:1730 ../fish/guestfish.pod:1039 ../test-tool/libguestfs-test-tool.pod:115 ../fuse/guestmount.pod:189 ../inspector/virt-inspector.pl:855
3324 #: ../src/guestfs.pod:1732 ../fish/guestfish.pod:1041 ../test-tool/libguestfs-test-tool.pod:117 ../fuse/guestmount.pod:191
3325 msgid "Richard W.M. Jones (C<rjones at redhat dot com>)"
3329 #: ../src/guestfs.pod:1734 ../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
3334 #: ../src/guestfs.pod:1736 ../fish/guestfish.pod:1045
3335 msgid "Copyright (C) 2009-2010 Red Hat Inc. L<http://libguestfs.org/>"
3339 #: ../src/guestfs.pod:1739
3341 "This library is free software; you can redistribute it and/or modify it "
3342 "under the terms of the GNU Lesser General Public License as published by the "
3343 "Free Software Foundation; either version 2 of the License, or (at your "
3344 "option) any later version."
3348 #: ../src/guestfs.pod:1744
3350 "This library is distributed in the hope that it will be useful, but WITHOUT "
3351 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
3352 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License "
3357 #: ../src/guestfs.pod:1749
3359 "You should have received a copy of the GNU Lesser General Public License "
3360 "along with this library; if not, write to the Free Software Foundation, "
3361 "Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"
3365 #: ../src/guestfs-actions.pod:1
3366 msgid "guestfs_add_cdrom"
3370 #: ../src/guestfs-actions.pod:3
3373 " int guestfs_add_cdrom (guestfs_h *g,\n"
3374 "\t\tconst char *filename);\n"
3379 #: ../src/guestfs-actions.pod:6 ../fish/guestfish-actions.pod:5
3380 msgid "This function adds a virtual CD-ROM disk image to the guest."
3384 #: ../src/guestfs-actions.pod:8 ../fish/guestfish-actions.pod:7
3385 msgid "This is equivalent to the qemu parameter C<-cdrom filename>."
3389 #: ../src/guestfs-actions.pod:10 ../src/guestfs-actions.pod:1488 ../fish/guestfish-actions.pod:9 ../fish/guestfish-actions.pod:1186
3394 #: ../src/guestfs-actions.pod:16
3396 "This call checks for the existence of C<filename>. This stops you from "
3397 "specifying other types of drive which are supported by qemu such as C<nbd:> "
3398 "and C<http:> URLs. To specify those, use the general C<guestfs_config> call "
3403 #: ../src/guestfs-actions.pod:23
3405 "If you just want to add an ISO file (often you use this as an efficient way "
3406 "to transfer large files into the guest), then you should probably use "
3407 "C<guestfs_add_drive_ro> instead."
3411 #: ../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
3412 msgid "This function returns 0 on success or -1 on error."
3416 #: ../src/guestfs-actions.pod:31
3417 msgid "guestfs_add_drive"
3421 #: ../src/guestfs-actions.pod:33
3424 " int guestfs_add_drive (guestfs_h *g,\n"
3425 "\t\tconst char *filename);\n"
3430 #: ../src/guestfs-actions.pod:36 ../fish/guestfish-actions.pod:32
3432 "This function adds a virtual machine disk image C<filename> to the guest. "
3433 "The first time you call this function, the disk appears as IDE disk 0 "
3434 "(C</dev/sda>) in the guest, the second time as C</dev/sdb>, and so on."
3438 #: ../src/guestfs-actions.pod:41 ../fish/guestfish-actions.pod:37
3440 "You don't necessarily need to be root when using libguestfs. However you "
3441 "obviously do need sufficient permissions to access the filename for whatever "
3442 "operations you want to perform (ie. read access if you just want to read the "
3443 "image or write access if you want to modify the image)."
3447 #: ../src/guestfs-actions.pod:47 ../fish/guestfish-actions.pod:43
3449 "This is equivalent to the qemu parameter C<-drive "
3450 "file=filename,cache=off,if=...>."
3454 #: ../src/guestfs-actions.pod:50 ../fish/guestfish-actions.pod:46
3456 "C<cache=off> is omitted in cases where it is not supported by the underlying "
3461 #: ../src/guestfs-actions.pod:53 ../src/guestfs-actions.pod:82
3463 "C<if=...> is set at compile time by the configuration option C<./configure "
3464 "--with-drive-if=...>. In the rare case where you might need to change this "
3465 "at run time, use C<guestfs_add_drive_with_if> or "
3466 "C<guestfs_add_drive_ro_with_if>."
3470 #: ../src/guestfs-actions.pod:58 ../src/guestfs-actions.pod:87
3472 "Note that this call checks for the existence of C<filename>. This stops you "
3473 "from specifying other types of drive which are supported by qemu such as "
3474 "C<nbd:> and C<http:> URLs. To specify those, use the general "
3475 "C<guestfs_config> call instead."
3479 #: ../src/guestfs-actions.pod:65
3480 msgid "guestfs_add_drive_ro"
3484 #: ../src/guestfs-actions.pod:67
3487 " int guestfs_add_drive_ro (guestfs_h *g,\n"
3488 "\t\tconst char *filename);\n"
3493 #: ../src/guestfs-actions.pod:70 ../fish/guestfish-actions.pod:63
3494 msgid "This adds a drive in snapshot mode, making it effectively read-only."
3498 #: ../src/guestfs-actions.pod:73 ../fish/guestfish-actions.pod:66
3500 "Note that writes to the device are allowed, and will be seen for the "
3501 "duration of the guestfs handle, but they are written to a temporary file "
3502 "which is discarded as soon as the guestfs handle is closed. We don't "
3503 "currently have any method to enable changes to be committed, although qemu "
3508 #: ../src/guestfs-actions.pod:79 ../fish/guestfish-actions.pod:72
3510 "This is equivalent to the qemu parameter C<-drive "
3511 "file=filename,snapshot=on,if=...>."
3515 #: ../src/guestfs-actions.pod:94
3516 msgid "guestfs_add_drive_ro_with_if"
3520 #: ../src/guestfs-actions.pod:96
3523 " int guestfs_add_drive_ro_with_if (guestfs_h *g,\n"
3524 "\t\tconst char *filename,\n"
3525 "\t\tconst char *iface);\n"
3530 #: ../src/guestfs-actions.pod:100
3532 "This is the same as C<guestfs_add_drive_ro> but it allows you to specify the "
3533 "QEMU interface emulation to use at run time."
3537 #: ../src/guestfs-actions.pod:105
3538 msgid "guestfs_add_drive_with_if"
3542 #: ../src/guestfs-actions.pod:107
3545 " int guestfs_add_drive_with_if (guestfs_h *g,\n"
3546 "\t\tconst char *filename,\n"
3547 "\t\tconst char *iface);\n"
3552 #: ../src/guestfs-actions.pod:111
3554 "This is the same as C<guestfs_add_drive> but it allows you to specify the "
3555 "QEMU interface emulation to use at run time."
3559 #: ../src/guestfs-actions.pod:116
3560 msgid "guestfs_aug_clear"
3564 #: ../src/guestfs-actions.pod:118
3567 " int guestfs_aug_clear (guestfs_h *g,\n"
3568 "\t\tconst char *augpath);\n"
3573 #: ../src/guestfs-actions.pod:121 ../fish/guestfish-actions.pod:103
3575 "Set the value associated with C<path> to C<NULL>. This is the same as the "
3576 "L<augtool(1)> C<clear> command."
3580 #: ../src/guestfs-actions.pod:126
3581 msgid "guestfs_aug_close"
3585 #: ../src/guestfs-actions.pod:128
3588 " int guestfs_aug_close (guestfs_h *g);\n"
3593 #: ../src/guestfs-actions.pod:130
3595 "Close the current Augeas handle and free up any resources used by it. After "
3596 "calling this, you have to call C<guestfs_aug_init> again before you can use "
3597 "any other Augeas functions."
3601 #: ../src/guestfs-actions.pod:137
3602 msgid "guestfs_aug_defnode"
3606 #: ../src/guestfs-actions.pod:139
3609 " struct guestfs_int_bool *guestfs_aug_defnode (guestfs_h *g,\n"
3610 "\t\tconst char *name,\n"
3611 "\t\tconst char *expr,\n"
3612 "\t\tconst char *val);\n"
3617 #: ../src/guestfs-actions.pod:144 ../fish/guestfish-actions.pod:119
3618 msgid "Defines a variable C<name> whose value is the result of evaluating C<expr>."
3622 #: ../src/guestfs-actions.pod:147
3624 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
3625 "calling C<guestfs_aug_set> C<expr>, C<value>. C<name> will be the nodeset "
3626 "containing that single node."
3630 #: ../src/guestfs-actions.pod:151 ../fish/guestfish-actions.pod:126
3632 "On success this returns a pair containing the number of nodes in the "
3633 "nodeset, and a boolean flag if a node was created."
3637 #: ../src/guestfs-actions.pod:155
3639 "This function returns a C<struct guestfs_int_bool *>, or NULL if there was "
3640 "an error. I<The caller must call C<guestfs_free_int_bool> after use>."
3644 #: ../src/guestfs-actions.pod:159
3645 msgid "guestfs_aug_defvar"
3649 #: ../src/guestfs-actions.pod:161
3652 " int guestfs_aug_defvar (guestfs_h *g,\n"
3653 "\t\tconst char *name,\n"
3654 "\t\tconst char *expr);\n"
3659 #: ../src/guestfs-actions.pod:165 ../fish/guestfish-actions.pod:134
3661 "Defines an Augeas variable C<name> whose value is the result of evaluating "
3662 "C<expr>. If C<expr> is NULL, then C<name> is undefined."
3666 #: ../src/guestfs-actions.pod:169 ../fish/guestfish-actions.pod:138
3668 "On success this returns the number of nodes in C<expr>, or C<0> if C<expr> "
3669 "evaluates to something which is not a nodeset."
3673 #: ../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
3674 msgid "On error this function returns -1."
3678 #: ../src/guestfs-actions.pod:174
3679 msgid "guestfs_aug_get"
3683 #: ../src/guestfs-actions.pod:176
3686 " char *guestfs_aug_get (guestfs_h *g,\n"
3687 "\t\tconst char *augpath);\n"
3692 #: ../src/guestfs-actions.pod:179 ../fish/guestfish-actions.pod:145
3694 "Look up the value associated with C<path>. If C<path> matches exactly one "
3695 "node, the C<value> is returned."
3699 #: ../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
3701 "This function returns a string, or NULL on error. I<The caller must free "
3702 "the returned string after use>."
3706 #: ../src/guestfs-actions.pod:185
3707 msgid "guestfs_aug_init"
3711 #: ../src/guestfs-actions.pod:187
3714 " int guestfs_aug_init (guestfs_h *g,\n"
3715 "\t\tconst char *root,\n"
3721 #: ../src/guestfs-actions.pod:191 ../fish/guestfish-actions.pod:152
3723 "Create a new Augeas handle for editing configuration files. If there was "
3724 "any previous Augeas handle associated with this guestfs session, then it is "
3729 #: ../src/guestfs-actions.pod:195
3730 msgid "You must call this before using any other C<guestfs_aug_*> commands."
3734 #: ../src/guestfs-actions.pod:198 ../fish/guestfish-actions.pod:159
3735 msgid "C<root> is the filesystem root. C<root> must not be NULL, use C</> instead."
3739 #: ../src/guestfs-actions.pod:201 ../fish/guestfish-actions.pod:162
3741 "The flags are the same as the flags defined in E<lt>augeas.hE<gt>, the "
3742 "logical I<or> of the following integers:"
3746 #: ../src/guestfs-actions.pod:207 ../fish/guestfish-actions.pod:168
3747 msgid "C<AUG_SAVE_BACKUP> = 1"
3751 #: ../src/guestfs-actions.pod:209 ../fish/guestfish-actions.pod:170
3752 msgid "Keep the original file with a C<.augsave> extension."
3756 #: ../src/guestfs-actions.pod:211 ../fish/guestfish-actions.pod:172
3757 msgid "C<AUG_SAVE_NEWFILE> = 2"
3761 #: ../src/guestfs-actions.pod:213 ../fish/guestfish-actions.pod:174
3763 "Save changes into a file with extension C<.augnew>, and do not overwrite "
3764 "original. Overrides C<AUG_SAVE_BACKUP>."
3768 #: ../src/guestfs-actions.pod:216 ../fish/guestfish-actions.pod:177
3769 msgid "C<AUG_TYPE_CHECK> = 4"
3773 #: ../src/guestfs-actions.pod:218 ../fish/guestfish-actions.pod:179
3774 msgid "Typecheck lenses (can be expensive)."
3778 #: ../src/guestfs-actions.pod:220 ../fish/guestfish-actions.pod:181
3779 msgid "C<AUG_NO_STDINC> = 8"
3783 #: ../src/guestfs-actions.pod:222 ../fish/guestfish-actions.pod:183
3784 msgid "Do not use standard load path for modules."
3788 #: ../src/guestfs-actions.pod:224 ../fish/guestfish-actions.pod:185
3789 msgid "C<AUG_SAVE_NOOP> = 16"
3793 #: ../src/guestfs-actions.pod:226 ../fish/guestfish-actions.pod:187
3794 msgid "Make save a no-op, just record what would have been changed."
3798 #: ../src/guestfs-actions.pod:228 ../fish/guestfish-actions.pod:189
3799 msgid "C<AUG_NO_LOAD> = 32"
3803 #: ../src/guestfs-actions.pod:230
3804 msgid "Do not load the tree in C<guestfs_aug_init>."
3808 #: ../src/guestfs-actions.pod:234
3809 msgid "To close the handle, you can call C<guestfs_aug_close>."
3813 #: ../src/guestfs-actions.pod:236 ../fish/guestfish-actions.pod:197
3814 msgid "To find out more about Augeas, see L<http://augeas.net/>."
3818 #: ../src/guestfs-actions.pod:240
3819 msgid "guestfs_aug_insert"
3823 #: ../src/guestfs-actions.pod:242
3826 " int guestfs_aug_insert (guestfs_h *g,\n"
3827 "\t\tconst char *augpath,\n"
3828 "\t\tconst char *label,\n"
3829 "\t\tint before);\n"
3834 #: ../src/guestfs-actions.pod:247 ../fish/guestfish-actions.pod:203
3836 "Create a new sibling C<label> for C<path>, inserting it into the tree before "
3837 "or after C<path> (depending on the boolean flag C<before>)."
3841 #: ../src/guestfs-actions.pod:251 ../fish/guestfish-actions.pod:207
3843 "C<path> must match exactly one existing node in the tree, and C<label> must "
3844 "be a label, ie. not contain C</>, C<*> or end with a bracketed index C<[N]>."
3848 #: ../src/guestfs-actions.pod:257
3849 msgid "guestfs_aug_load"
3853 #: ../src/guestfs-actions.pod:259
3856 " int guestfs_aug_load (guestfs_h *g);\n"
3861 #: ../src/guestfs-actions.pod:261 ../fish/guestfish-actions.pod:215
3862 msgid "Load files into the tree."
3866 #: ../src/guestfs-actions.pod:263 ../fish/guestfish-actions.pod:217
3867 msgid "See C<aug_load> in the Augeas documentation for the full gory details."
3871 #: ../src/guestfs-actions.pod:268
3872 msgid "guestfs_aug_ls"
3876 #: ../src/guestfs-actions.pod:270
3879 " char **guestfs_aug_ls (guestfs_h *g,\n"
3880 "\t\tconst char *augpath);\n"
3885 #: ../src/guestfs-actions.pod:273
3887 "This is just a shortcut for listing C<guestfs_aug_match> C<path/*> and "
3888 "sorting the resulting nodes into alphabetical order."
3892 #: ../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
3894 "This function returns a NULL-terminated array of strings (like "
3895 "L<environ(3)>), or NULL if there was an error. I<The caller must free the "
3896 "strings and the array after use>."
3900 #: ../src/guestfs-actions.pod:280
3901 msgid "guestfs_aug_match"
3905 #: ../src/guestfs-actions.pod:282
3908 " char **guestfs_aug_match (guestfs_h *g,\n"
3909 "\t\tconst char *augpath);\n"
3914 #: ../src/guestfs-actions.pod:285 ../fish/guestfish-actions.pod:231
3916 "Returns a list of paths which match the path expression C<path>. The "
3917 "returned paths are sufficiently qualified so that they match exactly one "
3918 "node in the current tree."
3922 #: ../src/guestfs-actions.pod:293
3923 msgid "guestfs_aug_mv"
3927 #: ../src/guestfs-actions.pod:295
3930 " int guestfs_aug_mv (guestfs_h *g,\n"
3931 "\t\tconst char *src,\n"
3932 "\t\tconst char *dest);\n"
3937 #: ../src/guestfs-actions.pod:299 ../fish/guestfish-actions.pod:239
3939 "Move the node C<src> to C<dest>. C<src> must match exactly one node. "
3940 "C<dest> is overwritten if it exists."
3944 #: ../src/guestfs-actions.pod:304
3945 msgid "guestfs_aug_rm"
3949 #: ../src/guestfs-actions.pod:306
3952 " int guestfs_aug_rm (guestfs_h *g,\n"
3953 "\t\tconst char *augpath);\n"
3958 #: ../src/guestfs-actions.pod:309 ../fish/guestfish-actions.pod:246
3959 msgid "Remove C<path> and all of its children."
3963 #: ../src/guestfs-actions.pod:311 ../fish/guestfish-actions.pod:248
3964 msgid "On success this returns the number of entries which were removed."
3968 #: ../src/guestfs-actions.pod:315
3969 msgid "guestfs_aug_save"
3973 #: ../src/guestfs-actions.pod:317
3976 " int guestfs_aug_save (guestfs_h *g);\n"
3981 #: ../src/guestfs-actions.pod:319 ../fish/guestfish-actions.pod:254
3982 msgid "This writes all pending changes to disk."
3986 #: ../src/guestfs-actions.pod:321
3988 "The flags which were passed to C<guestfs_aug_init> affect exactly how files "
3993 #: ../src/guestfs-actions.pod:326
3994 msgid "guestfs_aug_set"
3998 #: ../src/guestfs-actions.pod:328
4001 " int guestfs_aug_set (guestfs_h *g,\n"
4002 "\t\tconst char *augpath,\n"
4003 "\t\tconst char *val);\n"
4008 #: ../src/guestfs-actions.pod:332 ../fish/guestfish-actions.pod:263
4009 msgid "Set the value associated with C<path> to C<val>."
4013 #: ../src/guestfs-actions.pod:334
4015 "In the Augeas API, it is possible to clear a node by setting the value to "
4016 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
4017 "this call. Instead you must use the C<guestfs_aug_clear> call."
4021 #: ../src/guestfs-actions.pod:341
4022 msgid "guestfs_available"
4026 #: ../src/guestfs-actions.pod:343
4029 " int guestfs_available (guestfs_h *g,\n"
4030 "\t\tchar *const *groups);\n"
4035 #: ../src/guestfs-actions.pod:346 ../fish/guestfish-actions.pod:274
4037 "This command is used to check the availability of some groups of "
4038 "functionality in the appliance, which not all builds of the libguestfs "
4039 "appliance will be able to provide."
4043 #: ../src/guestfs-actions.pod:350
4045 "The libguestfs groups, and the functions that those groups correspond to, "
4046 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
4047 "runtime by calling C<guestfs_available_all_groups>."
4051 #: ../src/guestfs-actions.pod:355 ../fish/guestfish-actions.pod:283
4053 "The argument C<groups> is a list of group names, eg: C<[\"inotify\", "
4054 "\"augeas\"]> would check for the availability of the Linux inotify functions "
4055 "and Augeas (configuration file editing) functions."
4059 #: ../src/guestfs-actions.pod:360 ../fish/guestfish-actions.pod:288
4060 msgid "The command returns no error if I<all> requested groups are available."
4064 #: ../src/guestfs-actions.pod:362 ../fish/guestfish-actions.pod:290
4066 "It fails with an error if one or more of the requested groups is unavailable "
4071 #: ../src/guestfs-actions.pod:365 ../fish/guestfish-actions.pod:293
4073 "If an unknown group name is included in the list of groups then an error is "
4078 #: ../src/guestfs-actions.pod:368 ../fish/guestfish-actions.pod:296
4083 #: ../src/guestfs-actions.pod:374
4084 msgid "You must call C<guestfs_launch> before calling this function."
4088 #: ../src/guestfs-actions.pod:376 ../fish/guestfish-actions.pod:304
4090 "The reason is because we don't know what groups are supported by the "
4091 "appliance/daemon until it is running and can be queried."
4095 #: ../src/guestfs-actions.pod:382 ../fish/guestfish-actions.pod:310
4097 "If a group of functions is available, this does not necessarily mean that "
4098 "they will work. You still have to check for errors when calling individual "
4099 "API functions even if they are available."
4103 #: ../src/guestfs-actions.pod:389 ../fish/guestfish-actions.pod:317
4105 "It is usually the job of distro packagers to build complete functionality "
4106 "into the libguestfs appliance. Upstream libguestfs, if built from source "
4107 "with all requirements satisfied, will support everything."
4111 #: ../src/guestfs-actions.pod:396
4113 "This call was added in version C<1.0.80>. In previous versions of "
4114 "libguestfs all you could do would be to speculatively execute a command to "
4115 "find out if the daemon implemented it. See also C<guestfs_version>."
4119 #: ../src/guestfs-actions.pod:405
4120 msgid "guestfs_available_all_groups"
4124 #: ../src/guestfs-actions.pod:407
4127 " char **guestfs_available_all_groups (guestfs_h *g);\n"
4132 #: ../src/guestfs-actions.pod:409
4134 "This command returns a list of all optional groups that this daemon knows "
4135 "about. Note this returns both supported and unsupported groups. To find "
4136 "out which ones the daemon can actually support you have to call "
4137 "C<guestfs_available> on each member of the returned list."
4141 #: ../src/guestfs-actions.pod:415
4142 msgid "See also C<guestfs_available> and L<guestfs(3)/AVAILABILITY>."
4146 #: ../src/guestfs-actions.pod:421
4147 msgid "guestfs_base64_in"
4151 #: ../src/guestfs-actions.pod:423
4154 " int guestfs_base64_in (guestfs_h *g,\n"
4155 "\t\tconst char *base64file,\n"
4156 "\t\tconst char *filename);\n"
4161 #: ../src/guestfs-actions.pod:427 ../fish/guestfish-actions.pod:347
4162 msgid "This command uploads base64-encoded data from C<base64file> to C<filename>."
4166 #: ../src/guestfs-actions.pod:432
4167 msgid "guestfs_base64_out"
4171 #: ../src/guestfs-actions.pod:434
4174 " int guestfs_base64_out (guestfs_h *g,\n"
4175 "\t\tconst char *filename,\n"
4176 "\t\tconst char *base64file);\n"
4181 #: ../src/guestfs-actions.pod:438 ../fish/guestfish-actions.pod:356
4183 "This command downloads the contents of C<filename>, writing it out to local "
4184 "file C<base64file> encoded as base64."
4188 #: ../src/guestfs-actions.pod:443
4189 msgid "guestfs_blockdev_flushbufs"
4193 #: ../src/guestfs-actions.pod:445
4196 " int guestfs_blockdev_flushbufs (guestfs_h *g,\n"
4197 "\t\tconst char *device);\n"
4202 #: ../src/guestfs-actions.pod:448 ../fish/guestfish-actions.pod:365
4203 msgid "This tells the kernel to flush internal buffers associated with C<device>."
4207 #: ../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
4208 msgid "This uses the L<blockdev(8)> command."
4212 #: ../src/guestfs-actions.pod:455
4213 msgid "guestfs_blockdev_getbsz"
4217 #: ../src/guestfs-actions.pod:457
4220 " int guestfs_blockdev_getbsz (guestfs_h *g,\n"
4221 "\t\tconst char *device);\n"
4226 #: ../src/guestfs-actions.pod:460 ../fish/guestfish-actions.pod:374
4227 msgid "This returns the block size of a device."
4231 #: ../src/guestfs-actions.pod:462 ../src/guestfs-actions.pod:544 ../fish/guestfish-actions.pod:376 ../fish/guestfish-actions.pod:439
4233 "(Note this is different from both I<size in blocks> and I<filesystem block "
4238 #: ../src/guestfs-actions.pod:469
4239 msgid "guestfs_blockdev_getro"
4243 #: ../src/guestfs-actions.pod:471
4246 " int guestfs_blockdev_getro (guestfs_h *g,\n"
4247 "\t\tconst char *device);\n"
4252 #: ../src/guestfs-actions.pod:474 ../fish/guestfish-actions.pod:385
4254 "Returns a boolean indicating if the block device is read-only (true if "
4255 "read-only, false if not)."
4259 #: ../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
4260 msgid "This function returns a C truth value on success or -1 on error."
4264 #: ../src/guestfs-actions.pod:481
4265 msgid "guestfs_blockdev_getsize64"
4269 #: ../src/guestfs-actions.pod:483
4272 " int64_t guestfs_blockdev_getsize64 (guestfs_h *g,\n"
4273 "\t\tconst char *device);\n"
4278 #: ../src/guestfs-actions.pod:486 ../fish/guestfish-actions.pod:394
4279 msgid "This returns the size of the device in bytes."
4283 #: ../src/guestfs-actions.pod:488
4284 msgid "See also C<guestfs_blockdev_getsz>."
4288 #: ../src/guestfs-actions.pod:494
4289 msgid "guestfs_blockdev_getss"
4293 #: ../src/guestfs-actions.pod:496
4296 " int guestfs_blockdev_getss (guestfs_h *g,\n"
4297 "\t\tconst char *device);\n"
4302 #: ../src/guestfs-actions.pod:499 ../fish/guestfish-actions.pod:404
4304 "This returns the size of sectors on a block device. Usually 512, but can be "
4305 "larger for modern devices."
4309 #: ../src/guestfs-actions.pod:502
4311 "(Note, this is not the size in sectors, use C<guestfs_blockdev_getsz> for "
4316 #: ../src/guestfs-actions.pod:509
4317 msgid "guestfs_blockdev_getsz"
4321 #: ../src/guestfs-actions.pod:511
4324 " int64_t guestfs_blockdev_getsz (guestfs_h *g,\n"
4325 "\t\tconst char *device);\n"
4330 #: ../src/guestfs-actions.pod:514 ../fish/guestfish-actions.pod:416
4332 "This returns the size of the device in units of 512-byte sectors (even if "
4333 "the sectorsize isn't 512 bytes ... weird)."
4337 #: ../src/guestfs-actions.pod:517
4339 "See also C<guestfs_blockdev_getss> for the real sector size of the device, "
4340 "and C<guestfs_blockdev_getsize64> for the more useful I<size in bytes>."
4344 #: ../src/guestfs-actions.pod:525
4345 msgid "guestfs_blockdev_rereadpt"
4349 #: ../src/guestfs-actions.pod:527
4352 " int guestfs_blockdev_rereadpt (guestfs_h *g,\n"
4353 "\t\tconst char *device);\n"
4358 #: ../src/guestfs-actions.pod:530 ../fish/guestfish-actions.pod:429
4359 msgid "Reread the partition table on C<device>."
4363 #: ../src/guestfs-actions.pod:536
4364 msgid "guestfs_blockdev_setbsz"
4368 #: ../src/guestfs-actions.pod:538
4371 " int guestfs_blockdev_setbsz (guestfs_h *g,\n"
4372 "\t\tconst char *device,\n"
4373 "\t\tint blocksize);\n"
4378 #: ../src/guestfs-actions.pod:542 ../fish/guestfish-actions.pod:437
4379 msgid "This sets the block size of a device."
4383 #: ../src/guestfs-actions.pod:551
4384 msgid "guestfs_blockdev_setro"
4388 #: ../src/guestfs-actions.pod:553
4391 " int guestfs_blockdev_setro (guestfs_h *g,\n"
4392 "\t\tconst char *device);\n"
4397 #: ../src/guestfs-actions.pod:556 ../fish/guestfish-actions.pod:448
4398 msgid "Sets the block device named C<device> to read-only."
4402 #: ../src/guestfs-actions.pod:562
4403 msgid "guestfs_blockdev_setrw"
4407 #: ../src/guestfs-actions.pod:564
4410 " int guestfs_blockdev_setrw (guestfs_h *g,\n"
4411 "\t\tconst char *device);\n"
4416 #: ../src/guestfs-actions.pod:567 ../fish/guestfish-actions.pod:456
4417 msgid "Sets the block device named C<device> to read-write."
4421 #: ../src/guestfs-actions.pod:573
4422 msgid "guestfs_case_sensitive_path"
4426 #: ../src/guestfs-actions.pod:575
4429 " char *guestfs_case_sensitive_path (guestfs_h *g,\n"
4430 "\t\tconst char *path);\n"
4435 #: ../src/guestfs-actions.pod:578 ../fish/guestfish-actions.pod:464
4437 "This can be used to resolve case insensitive paths on a filesystem which is "
4438 "case sensitive. The use case is to resolve paths which you have read from "
4439 "Windows configuration files or the Windows Registry, to the true path."
4443 #: ../src/guestfs-actions.pod:583 ../fish/guestfish-actions.pod:469
4445 "The command handles a peculiarity of the Linux ntfs-3g filesystem driver "
4446 "(and probably others), which is that although the underlying filesystem is "
4447 "case-insensitive, the driver exports the filesystem to Linux as "
4452 #: ../src/guestfs-actions.pod:588 ../fish/guestfish-actions.pod:474
4454 "One consequence of this is that special directories such as C<c:\\windows> "
4455 "may appear as C</WINDOWS> or C</windows> (or other things) depending on the "
4456 "precise details of how they were created. In Windows itself this would not "
4461 #: ../src/guestfs-actions.pod:594 ../fish/guestfish-actions.pod:480
4463 "Bug or feature? You decide: "
4464 "L<http://www.tuxera.com/community/ntfs-3g-faq/#posixfilenames1>"
4468 #: ../src/guestfs-actions.pod:597 ../fish/guestfish-actions.pod:483
4470 "This function resolves the true case of each element in the path and returns "
4471 "the case-sensitive path."
4475 #: ../src/guestfs-actions.pod:600
4477 "Thus C<guestfs_case_sensitive_path> (\"/Windows/System32\") might return "
4478 "C<\"/WINDOWS/system32\"> (the exact return value would depend on details of "
4479 "how the directories were originally created under Windows)."
4483 #: ../src/guestfs-actions.pod:605 ../fish/guestfish-actions.pod:491
4484 msgid "I<Note>: This function does not handle drive names, backslashes etc."
4488 #: ../src/guestfs-actions.pod:608
4489 msgid "See also C<guestfs_realpath>."
4493 #: ../src/guestfs-actions.pod:613
4498 #: ../src/guestfs-actions.pod:615
4501 " char *guestfs_cat (guestfs_h *g,\n"
4502 "\t\tconst char *path);\n"
4507 #: ../src/guestfs-actions.pod:618 ../src/guestfs-actions.pod:3824 ../fish/guestfish-actions.pod:500 ../fish/guestfish-actions.pod:2944
4508 msgid "Return the contents of the file named C<path>."
4512 #: ../src/guestfs-actions.pod:620
4514 "Note that this function cannot correctly handle binary files (specifically, "
4515 "files containing C<\\0> character which is treated as end of string). For "
4516 "those you need to use the C<guestfs_read_file> or C<guestfs_download> "
4517 "functions which have a more complex interface."
4521 #: ../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
4523 "Because of the message protocol, there is a transfer limit of somewhere "
4524 "between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
4528 #: ../src/guestfs-actions.pod:631
4529 msgid "guestfs_checksum"
4533 #: ../src/guestfs-actions.pod:633
4536 " char *guestfs_checksum (guestfs_h *g,\n"
4537 "\t\tconst char *csumtype,\n"
4538 "\t\tconst char *path);\n"
4543 #: ../src/guestfs-actions.pod:637 ../fish/guestfish-actions.pod:514
4544 msgid "This call computes the MD5, SHAx or CRC checksum of the file named C<path>."
4548 #: ../src/guestfs-actions.pod:640 ../fish/guestfish-actions.pod:517
4550 "The type of checksum to compute is given by the C<csumtype> parameter which "
4551 "must have one of the following values:"
4555 #: ../src/guestfs-actions.pod:645 ../fish/guestfish-actions.pod:522
4560 #: ../src/guestfs-actions.pod:647 ../fish/guestfish-actions.pod:524
4562 "Compute the cyclic redundancy check (CRC) specified by POSIX for the "
4567 #: ../src/guestfs-actions.pod:650 ../fish/guestfish-actions.pod:527
4572 #: ../src/guestfs-actions.pod:652 ../fish/guestfish-actions.pod:529
4573 msgid "Compute the MD5 hash (using the C<md5sum> program)."
4577 #: ../src/guestfs-actions.pod:654 ../fish/guestfish-actions.pod:531
4582 #: ../src/guestfs-actions.pod:656 ../fish/guestfish-actions.pod:533
4583 msgid "Compute the SHA1 hash (using the C<sha1sum> program)."
4587 #: ../src/guestfs-actions.pod:658 ../fish/guestfish-actions.pod:535
4592 #: ../src/guestfs-actions.pod:660 ../fish/guestfish-actions.pod:537
4593 msgid "Compute the SHA224 hash (using the C<sha224sum> program)."
4597 #: ../src/guestfs-actions.pod:662 ../fish/guestfish-actions.pod:539
4602 #: ../src/guestfs-actions.pod:664 ../fish/guestfish-actions.pod:541
4603 msgid "Compute the SHA256 hash (using the C<sha256sum> program)."
4607 #: ../src/guestfs-actions.pod:666 ../fish/guestfish-actions.pod:543
4612 #: ../src/guestfs-actions.pod:668 ../fish/guestfish-actions.pod:545
4613 msgid "Compute the SHA384 hash (using the C<sha384sum> program)."
4617 #: ../src/guestfs-actions.pod:670 ../fish/guestfish-actions.pod:547
4622 #: ../src/guestfs-actions.pod:672 ../fish/guestfish-actions.pod:549
4623 msgid "Compute the SHA512 hash (using the C<sha512sum> program)."
4627 #: ../src/guestfs-actions.pod:676 ../fish/guestfish-actions.pod:553
4628 msgid "The checksum is returned as a printable string."
4632 #: ../src/guestfs-actions.pod:678
4633 msgid "To get the checksum for a device, use C<guestfs_checksum_device>."
4637 #: ../src/guestfs-actions.pod:680
4638 msgid "To get the checksums for many files, use C<guestfs_checksums_out>."
4642 #: ../src/guestfs-actions.pod:685
4643 msgid "guestfs_checksum_device"
4647 #: ../src/guestfs-actions.pod:687
4650 " char *guestfs_checksum_device (guestfs_h *g,\n"
4651 "\t\tconst char *csumtype,\n"
4652 "\t\tconst char *device);\n"
4657 #: ../src/guestfs-actions.pod:691
4659 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
4660 "device named C<device>. For the types of checksums supported see the "
4661 "C<guestfs_checksum> command."
4665 #: ../src/guestfs-actions.pod:698
4666 msgid "guestfs_checksums_out"
4670 #: ../src/guestfs-actions.pod:700
4673 " int guestfs_checksums_out (guestfs_h *g,\n"
4674 "\t\tconst char *csumtype,\n"
4675 "\t\tconst char *directory,\n"
4676 "\t\tconst char *sumsfile);\n"
4681 #: ../src/guestfs-actions.pod:705 ../fish/guestfish-actions.pod:571
4683 "This command computes the checksums of all regular files in C<directory> and "
4684 "then emits a list of those checksums to the local output file C<sumsfile>."
4688 #: ../src/guestfs-actions.pod:709 ../fish/guestfish-actions.pod:575
4690 "This can be used for verifying the integrity of a virtual machine. However "
4691 "to be properly secure you should pay attention to the output of the checksum "
4692 "command (it uses the ones from GNU coreutils). In particular when the "
4693 "filename is not printable, coreutils uses a special backslash syntax. For "
4694 "more information, see the GNU coreutils info file."
4698 #: ../src/guestfs-actions.pod:719
4699 msgid "guestfs_chmod"
4703 #: ../src/guestfs-actions.pod:721
4706 " int guestfs_chmod (guestfs_h *g,\n"
4708 "\t\tconst char *path);\n"
4713 #: ../src/guestfs-actions.pod:725 ../fish/guestfish-actions.pod:589
4715 "Change the mode (permissions) of C<path> to C<mode>. Only numeric modes are "
4720 #: ../src/guestfs-actions.pod:728 ../fish/guestfish-actions.pod:592
4722 "I<Note>: When using this command from guestfish, C<mode> by default would be "
4723 "decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not "
4728 #: ../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
4729 msgid "The mode actually set is affected by the umask."
4733 #: ../src/guestfs-actions.pod:736
4734 msgid "guestfs_chown"
4738 #: ../src/guestfs-actions.pod:738
4741 " int guestfs_chown (guestfs_h *g,\n"
4744 "\t\tconst char *path);\n"
4749 #: ../src/guestfs-actions.pod:743 ../fish/guestfish-actions.pod:602
4750 msgid "Change the file owner to C<owner> and group to C<group>."
4754 #: ../src/guestfs-actions.pod:745 ../src/guestfs-actions.pod:2374 ../fish/guestfish-actions.pod:604 ../fish/guestfish-actions.pod:1890
4756 "Only numeric uid and gid are supported. If you want to use names, you will "
4757 "need to locate and parse the password file yourself (Augeas support makes "
4758 "this relatively easy)."
4762 #: ../src/guestfs-actions.pod:751
4763 msgid "guestfs_command"
4767 #: ../src/guestfs-actions.pod:753
4770 " char *guestfs_command (guestfs_h *g,\n"
4771 "\t\tchar *const *arguments);\n"
4776 #: ../src/guestfs-actions.pod:756 ../fish/guestfish-actions.pod:612
4778 "This call runs a command from the guest filesystem. The filesystem must be "
4779 "mounted, and must contain a compatible operating system (ie. something "
4780 "Linux, with the same or compatible processor architecture)."
4784 #: ../src/guestfs-actions.pod:761
4786 "The single parameter is an argv-style list of arguments. The first element "
4787 "is the name of the program to run. Subsequent elements are parameters. The "
4788 "list must be non-empty (ie. must contain a program name). Note that the "
4789 "command runs directly, and is I<not> invoked via the shell (see "
4794 #: ../src/guestfs-actions.pod:768 ../fish/guestfish-actions.pod:624
4795 msgid "The return value is anything printed to I<stdout> by the command."
4799 #: ../src/guestfs-actions.pod:771 ../fish/guestfish-actions.pod:627
4801 "If the command returns a non-zero exit status, then this function returns an "
4802 "error message. The error message string is the content of I<stderr> from "
4807 #: ../src/guestfs-actions.pod:775 ../fish/guestfish-actions.pod:631
4809 "The C<$PATH> environment variable will contain at least C</usr/bin> and "
4810 "C</bin>. If you require a program from another location, you should provide "
4811 "the full path in the first parameter."
4815 #: ../src/guestfs-actions.pod:780 ../fish/guestfish-actions.pod:636
4817 "Shared libraries and data files required by the program must be available on "
4818 "filesystems which are mounted in the correct places. It is the caller's "
4819 "responsibility to ensure all filesystems that are needed are mounted at the "
4824 #: ../src/guestfs-actions.pod:792
4825 msgid "guestfs_command_lines"
4829 #: ../src/guestfs-actions.pod:794
4832 " char **guestfs_command_lines (guestfs_h *g,\n"
4833 "\t\tchar *const *arguments);\n"
4838 #: ../src/guestfs-actions.pod:797
4840 "This is the same as C<guestfs_command>, but splits the result into a list of "
4845 #: ../src/guestfs-actions.pod:800
4846 msgid "See also: C<guestfs_sh_lines>"
4850 #: ../src/guestfs-actions.pod:809
4851 msgid "guestfs_config"
4855 #: ../src/guestfs-actions.pod:811
4858 " int guestfs_config (guestfs_h *g,\n"
4859 "\t\tconst char *qemuparam,\n"
4860 "\t\tconst char *qemuvalue);\n"
4865 #: ../src/guestfs-actions.pod:815 ../fish/guestfish-actions.pod:661
4867 "This can be used to add arbitrary qemu command line parameters of the form "
4868 "C<-param value>. Actually it's not quite arbitrary - we prevent you from "
4869 "setting some parameters which would interfere with parameters that we use."
4873 #: ../src/guestfs-actions.pod:820 ../fish/guestfish-actions.pod:666
4874 msgid "The first character of C<param> string must be a C<-> (dash)."
4878 #: ../src/guestfs-actions.pod:822 ../fish/guestfish-actions.pod:668
4879 msgid "C<value> can be NULL."
4883 #: ../src/guestfs-actions.pod:826
4884 msgid "guestfs_copy_size"
4888 #: ../src/guestfs-actions.pod:828
4891 " int guestfs_copy_size (guestfs_h *g,\n"
4892 "\t\tconst char *src,\n"
4893 "\t\tconst char *dest,\n"
4894 "\t\tint64_t size);\n"
4899 #: ../src/guestfs-actions.pod:833 ../fish/guestfish-actions.pod:674
4901 "This command copies exactly C<size> bytes from one source device or file "
4902 "C<src> to another destination device or file C<dest>."
4906 #: ../src/guestfs-actions.pod:836 ../fish/guestfish-actions.pod:677
4908 "Note this will fail if the source is too short or if the destination is not "
4913 #: ../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
4915 "This long-running command can generate progress notification messages so "
4916 "that the caller can display a progress bar or indicator. To receive these "
4917 "messages, the caller must register a progress callback. See "
4918 "L<guestfs(3)/guestfs_set_progress_callback>."
4922 #: ../src/guestfs-actions.pod:846
4927 #: ../src/guestfs-actions.pod:848
4930 " int guestfs_cp (guestfs_h *g,\n"
4931 "\t\tconst char *src,\n"
4932 "\t\tconst char *dest);\n"
4937 #: ../src/guestfs-actions.pod:852 ../fish/guestfish-actions.pod:684
4939 "This copies a file from C<src> to C<dest> where C<dest> is either a "
4940 "destination filename or destination directory."
4944 #: ../src/guestfs-actions.pod:857
4945 msgid "guestfs_cp_a"
4949 #: ../src/guestfs-actions.pod:859
4952 " int guestfs_cp_a (guestfs_h *g,\n"
4953 "\t\tconst char *src,\n"
4954 "\t\tconst char *dest);\n"
4959 #: ../src/guestfs-actions.pod:863 ../fish/guestfish-actions.pod:691
4961 "This copies a file or directory from C<src> to C<dest> recursively using the "
4966 #: ../src/guestfs-actions.pod:868
4971 #: ../src/guestfs-actions.pod:870
4974 " int guestfs_dd (guestfs_h *g,\n"
4975 "\t\tconst char *src,\n"
4976 "\t\tconst char *dest);\n"
4981 #: ../src/guestfs-actions.pod:874 ../fish/guestfish-actions.pod:698
4983 "This command copies from one source device or file C<src> to another "
4984 "destination device or file C<dest>. Normally you would use this to copy to "
4985 "or from a device or partition, for example to duplicate a filesystem."
4989 #: ../src/guestfs-actions.pod:879
4991 "If the destination is a device, it must be as large or larger than the "
4992 "source file or device, otherwise the copy will fail. This command cannot do "
4993 "partial copies (see C<guestfs_copy_size>)."
4997 #: ../src/guestfs-actions.pod:885
4998 msgid "guestfs_debug"
5002 #: ../src/guestfs-actions.pod:887
5005 " char *guestfs_debug (guestfs_h *g,\n"
5006 "\t\tconst char *subcmd,\n"
5007 "\t\tchar *const *extraargs);\n"
5012 #: ../src/guestfs-actions.pod:891
5014 "The C<guestfs_debug> command exposes some internals of C<guestfsd> (the "
5015 "guestfs daemon) that runs inside the qemu subprocess."
5019 #: ../src/guestfs-actions.pod:895 ../fish/guestfish-actions.pod:715
5021 "There is no comprehensive help for this command. You have to look at the "
5022 "file C<daemon/debug.c> in the libguestfs source to find out what you can do."
5026 #: ../src/guestfs-actions.pod:902
5027 msgid "guestfs_debug_upload"
5031 #: ../src/guestfs-actions.pod:904
5034 " int guestfs_debug_upload (guestfs_h *g,\n"
5035 "\t\tconst char *filename,\n"
5036 "\t\tconst char *tmpname,\n"
5042 #: ../src/guestfs-actions.pod:909
5044 "The C<guestfs_debug_upload> command uploads a file to the libguestfs "
5049 #: ../src/guestfs-actions.pod:912 ../fish/guestfish-actions.pod:726
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 it is for."
5056 #: ../src/guestfs-actions.pod:918
5061 #: ../src/guestfs-actions.pod:920
5064 " char *guestfs_df (guestfs_h *g);\n"
5069 #: ../src/guestfs-actions.pod:922 ../fish/guestfish-actions.pod:736
5070 msgid "This command runs the C<df> command to report disk space used."
5074 #: ../src/guestfs-actions.pod:924 ../src/guestfs-actions.pod:938 ../fish/guestfish-actions.pod:738 ../fish/guestfish-actions.pod:749
5076 "This command is mostly useful for interactive sessions. It is I<not> "
5077 "intended that you try to parse the output string. Use C<statvfs> from "
5082 #: ../src/guestfs-actions.pod:931
5083 msgid "guestfs_df_h"
5087 #: ../src/guestfs-actions.pod:933
5090 " char *guestfs_df_h (guestfs_h *g);\n"
5095 #: ../src/guestfs-actions.pod:935 ../fish/guestfish-actions.pod:746
5097 "This command runs the C<df -h> command to report disk space used in "
5098 "human-readable format."
5102 #: ../src/guestfs-actions.pod:945
5103 msgid "guestfs_dmesg"
5107 #: ../src/guestfs-actions.pod:947
5110 " char *guestfs_dmesg (guestfs_h *g);\n"
5115 #: ../src/guestfs-actions.pod:949 ../fish/guestfish-actions.pod:757
5117 "This returns the kernel messages (C<dmesg> output) from the guest kernel. "
5118 "This is sometimes useful for extended debugging of problems."
5122 #: ../src/guestfs-actions.pod:953
5124 "Another way to get the same information is to enable verbose messages with "
5125 "C<guestfs_set_verbose> or by setting the environment variable "
5126 "C<LIBGUESTFS_DEBUG=1> before running the program."
5130 #: ../src/guestfs-actions.pod:961
5131 msgid "guestfs_download"
5135 #: ../src/guestfs-actions.pod:963
5138 " int guestfs_download (guestfs_h *g,\n"
5139 "\t\tconst char *remotefilename,\n"
5140 "\t\tconst char *filename);\n"
5145 #: ../src/guestfs-actions.pod:967 ../fish/guestfish-actions.pod:770
5147 "Download file C<remotefilename> and save it as C<filename> on the local "
5152 #: ../src/guestfs-actions.pod:970 ../src/guestfs-actions.pod:4924 ../fish/guestfish-actions.pod:773 ../fish/guestfish-actions.pod:3798
5153 msgid "C<filename> can also be a named pipe."
5157 #: ../src/guestfs-actions.pod:972
5158 msgid "See also C<guestfs_upload>, C<guestfs_cat>."
5162 #: ../src/guestfs-actions.pod:981
5163 msgid "guestfs_drop_caches"
5167 #: ../src/guestfs-actions.pod:983
5170 " int guestfs_drop_caches (guestfs_h *g,\n"
5171 "\t\tint whattodrop);\n"
5176 #: ../src/guestfs-actions.pod:986 ../fish/guestfish-actions.pod:783
5178 "This instructs the guest kernel to drop its page cache, and/or dentries and "
5179 "inode caches. The parameter C<whattodrop> tells the kernel what precisely "
5180 "to drop, see L<http://linux-mm.org/Drop_Caches>"
5184 #: ../src/guestfs-actions.pod:991 ../fish/guestfish-actions.pod:788
5185 msgid "Setting C<whattodrop> to 3 should drop everything."
5189 #: ../src/guestfs-actions.pod:993 ../fish/guestfish-actions.pod:790
5191 "This automatically calls L<sync(2)> before the operation, so that the "
5192 "maximum guest memory is freed."
5196 #: ../src/guestfs-actions.pod:998
5201 #: ../src/guestfs-actions.pod:1000
5204 " int64_t guestfs_du (guestfs_h *g,\n"
5205 "\t\tconst char *path);\n"
5210 #: ../src/guestfs-actions.pod:1003 ../fish/guestfish-actions.pod:797
5212 "This command runs the C<du -s> command to estimate file space usage for "
5217 #: ../src/guestfs-actions.pod:1006 ../fish/guestfish-actions.pod:800
5219 "C<path> can be a file or a directory. If C<path> is a directory then the "
5220 "estimate includes the contents of the directory and all subdirectories "
5225 #: ../src/guestfs-actions.pod:1010 ../fish/guestfish-actions.pod:804
5226 msgid "The result is the estimated size in I<kilobytes> (ie. units of 1024 bytes)."
5230 #: ../src/guestfs-actions.pod:1015
5231 msgid "guestfs_e2fsck_f"
5235 #: ../src/guestfs-actions.pod:1017
5238 " int guestfs_e2fsck_f (guestfs_h *g,\n"
5239 "\t\tconst char *device);\n"
5244 #: ../src/guestfs-actions.pod:1020 ../fish/guestfish-actions.pod:811
5246 "This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3 filesystem checker "
5247 "on C<device>, noninteractively (C<-p>), even if the filesystem appears to be "
5252 #: ../src/guestfs-actions.pod:1024
5254 "This command is only needed because of C<guestfs_resize2fs> (q.v.). "
5255 "Normally you should use C<guestfs_fsck>."
5259 #: ../src/guestfs-actions.pod:1029
5260 msgid "guestfs_echo_daemon"
5264 #: ../src/guestfs-actions.pod:1031
5267 " char *guestfs_echo_daemon (guestfs_h *g,\n"
5268 "\t\tchar *const *words);\n"
5273 #: ../src/guestfs-actions.pod:1034 ../fish/guestfish-actions.pod:822
5275 "This command concatenates the list of C<words> passed with single spaces "
5276 "between them and returns the resulting string."
5280 #: ../src/guestfs-actions.pod:1037 ../fish/guestfish-actions.pod:825
5281 msgid "You can use this command to test the connection through to the daemon."
5285 #: ../src/guestfs-actions.pod:1039
5286 msgid "See also C<guestfs_ping_daemon>."
5290 #: ../src/guestfs-actions.pod:1044
5291 msgid "guestfs_egrep"
5295 #: ../src/guestfs-actions.pod:1046
5298 " char **guestfs_egrep (guestfs_h *g,\n"
5299 "\t\tconst char *regex,\n"
5300 "\t\tconst char *path);\n"
5305 #: ../src/guestfs-actions.pod:1050 ../fish/guestfish-actions.pod:833
5306 msgid "This calls the external C<egrep> program and returns the matching lines."
5310 #: ../src/guestfs-actions.pod:1060
5311 msgid "guestfs_egrepi"
5315 #: ../src/guestfs-actions.pod:1062
5318 " char **guestfs_egrepi (guestfs_h *g,\n"
5319 "\t\tconst char *regex,\n"
5320 "\t\tconst char *path);\n"
5325 #: ../src/guestfs-actions.pod:1066 ../fish/guestfish-actions.pod:843
5326 msgid "This calls the external C<egrep -i> program and returns the matching lines."
5330 #: ../src/guestfs-actions.pod:1076
5331 msgid "guestfs_equal"
5335 #: ../src/guestfs-actions.pod:1078
5338 " int guestfs_equal (guestfs_h *g,\n"
5339 "\t\tconst char *file1,\n"
5340 "\t\tconst char *file2);\n"
5345 #: ../src/guestfs-actions.pod:1082 ../fish/guestfish-actions.pod:853
5347 "This compares the two files C<file1> and C<file2> and returns true if their "
5348 "content is exactly equal, or false otherwise."
5352 #: ../src/guestfs-actions.pod:1085 ../fish/guestfish-actions.pod:856
5353 msgid "The external L<cmp(1)> program is used for the comparison."
5357 #: ../src/guestfs-actions.pod:1089
5358 msgid "guestfs_exists"
5362 #: ../src/guestfs-actions.pod:1091
5365 " int guestfs_exists (guestfs_h *g,\n"
5366 "\t\tconst char *path);\n"
5371 #: ../src/guestfs-actions.pod:1094 ../fish/guestfish-actions.pod:862
5373 "This returns C<true> if and only if there is a file, directory (or anything) "
5374 "with the given C<path> name."
5378 #: ../src/guestfs-actions.pod:1097
5379 msgid "See also C<guestfs_is_file>, C<guestfs_is_dir>, C<guestfs_stat>."
5383 #: ../src/guestfs-actions.pod:1101
5384 msgid "guestfs_fallocate"
5388 #: ../src/guestfs-actions.pod:1103
5391 " int guestfs_fallocate (guestfs_h *g,\n"
5392 "\t\tconst char *path,\n"
5398 #: ../src/guestfs-actions.pod:1107 ../src/guestfs-actions.pod:1130 ../fish/guestfish-actions.pod:871 ../fish/guestfish-actions.pod:890
5400 "This command preallocates a file (containing zero bytes) named C<path> of "
5401 "size C<len> bytes. If the file exists already, it is overwritten."
5405 #: ../src/guestfs-actions.pod:1111 ../fish/guestfish-actions.pod:875
5407 "Do not confuse this with the guestfish-specific C<alloc> command which "
5408 "allocates a file in the host and attaches it as a device."
5412 #: ../src/guestfs-actions.pod:1117 ../fish/guestfish-actions.pod:879
5414 "This function is deprecated. In new code, use the C<fallocate64> call "
5419 #: ../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
5421 "Deprecated functions will not be removed from the API, but the fact that "
5422 "they are deprecated indicates that there are problems with correct use of "
5427 #: ../src/guestfs-actions.pod:1124
5428 msgid "guestfs_fallocate64"
5432 #: ../src/guestfs-actions.pod:1126
5435 " int guestfs_fallocate64 (guestfs_h *g,\n"
5436 "\t\tconst char *path,\n"
5437 "\t\tint64_t len);\n"
5442 #: ../src/guestfs-actions.pod:1134
5444 "Note that this call allocates disk blocks for the file. To create a sparse "
5445 "file use C<guestfs_truncate_size> instead."
5449 #: ../src/guestfs-actions.pod:1137
5451 "The deprecated call C<guestfs_fallocate> does the same, but owing to an "
5452 "oversight it only allowed 30 bit lengths to be specified, effectively "
5453 "limiting the maximum size of files created through that call to 1GB."
5457 #: ../src/guestfs-actions.pod:1142 ../fish/guestfish-actions.pod:902
5459 "Do not confuse this with the guestfish-specific C<alloc> and C<sparse> "
5460 "commands which create a file in the host and attach it as a device."
5464 #: ../src/guestfs-actions.pod:1148
5465 msgid "guestfs_fgrep"
5469 #: ../src/guestfs-actions.pod:1150
5472 " char **guestfs_fgrep (guestfs_h *g,\n"
5473 "\t\tconst char *pattern,\n"
5474 "\t\tconst char *path);\n"
5479 #: ../src/guestfs-actions.pod:1154 ../fish/guestfish-actions.pod:910
5480 msgid "This calls the external C<fgrep> program and returns the matching lines."
5484 #: ../src/guestfs-actions.pod:1164
5485 msgid "guestfs_fgrepi"
5489 #: ../src/guestfs-actions.pod:1166
5492 " char **guestfs_fgrepi (guestfs_h *g,\n"
5493 "\t\tconst char *pattern,\n"
5494 "\t\tconst char *path);\n"
5499 #: ../src/guestfs-actions.pod:1170 ../fish/guestfish-actions.pod:920
5500 msgid "This calls the external C<fgrep -i> program and returns the matching lines."
5504 #: ../src/guestfs-actions.pod:1180
5505 msgid "guestfs_file"
5509 #: ../src/guestfs-actions.pod:1182
5512 " char *guestfs_file (guestfs_h *g,\n"
5513 "\t\tconst char *path);\n"
5518 #: ../src/guestfs-actions.pod:1185 ../fish/guestfish-actions.pod:930
5520 "This call uses the standard L<file(1)> command to determine the type or "
5521 "contents of the file."
5525 #: ../src/guestfs-actions.pod:1188 ../fish/guestfish-actions.pod:933
5527 "This call will also transparently look inside various types of compressed "
5532 #: ../src/guestfs-actions.pod:1191 ../fish/guestfish-actions.pod:936
5534 "The exact command which runs is C<file -zb path>. Note in particular that "
5535 "the filename is not prepended to the output (the C<-b> option)."
5539 #: ../src/guestfs-actions.pod:1195
5541 "This command can also be used on C</dev/> devices (and partitions, LV "
5542 "names). You can for example use this to determine if a device contains a "
5543 "filesystem, although it's usually better to use C<guestfs_vfs_type>."
5547 #: ../src/guestfs-actions.pod:1200 ../fish/guestfish-actions.pod:945
5549 "If the C<path> does not begin with C</dev/> then this command only works for "
5550 "the content of regular files. For other file types (directory, symbolic "
5551 "link etc) it will just return the string C<directory> etc."
5555 #: ../src/guestfs-actions.pod:1208
5556 msgid "guestfs_file_architecture"
5560 #: ../src/guestfs-actions.pod:1210
5563 " char *guestfs_file_architecture (guestfs_h *g,\n"
5564 "\t\tconst char *filename);\n"
5569 #: ../src/guestfs-actions.pod:1213 ../fish/guestfish-actions.pod:954
5571 "This detects the architecture of the binary C<filename>, and returns it if "
5576 #: ../src/guestfs-actions.pod:1216 ../fish/guestfish-actions.pod:957
5577 msgid "Currently defined architectures are:"
5581 #: ../src/guestfs-actions.pod:1220 ../fish/guestfish-actions.pod:961
5586 #: ../src/guestfs-actions.pod:1222 ../fish/guestfish-actions.pod:963
5588 "This string is returned for all 32 bit i386, i486, i586, i686 binaries "
5589 "irrespective of the precise processor requirements of the binary."
5593 #: ../src/guestfs-actions.pod:1225 ../fish/guestfish-actions.pod:966
5598 #: ../src/guestfs-actions.pod:1227 ../fish/guestfish-actions.pod:968
5599 msgid "64 bit x86-64."
5603 #: ../src/guestfs-actions.pod:1229 ../fish/guestfish-actions.pod:970
5608 #: ../src/guestfs-actions.pod:1231 ../fish/guestfish-actions.pod:972
5609 msgid "32 bit SPARC."
5613 #: ../src/guestfs-actions.pod:1233 ../fish/guestfish-actions.pod:974
5618 #: ../src/guestfs-actions.pod:1235 ../fish/guestfish-actions.pod:976
5619 msgid "64 bit SPARC V9 and above."
5623 #: ../src/guestfs-actions.pod:1237 ../fish/guestfish-actions.pod:978
5628 #: ../src/guestfs-actions.pod:1239 ../fish/guestfish-actions.pod:980
5629 msgid "Intel Itanium."
5633 #: ../src/guestfs-actions.pod:1241 ../fish/guestfish-actions.pod:982
5638 #: ../src/guestfs-actions.pod:1243 ../fish/guestfish-actions.pod:984
5639 msgid "32 bit Power PC."
5643 #: ../src/guestfs-actions.pod:1245 ../fish/guestfish-actions.pod:986
5648 #: ../src/guestfs-actions.pod:1247 ../fish/guestfish-actions.pod:988
5649 msgid "64 bit Power PC."
5653 #: ../src/guestfs-actions.pod:1251 ../fish/guestfish-actions.pod:992
5654 msgid "Libguestfs may return other architecture strings in future."
5658 #: ../src/guestfs-actions.pod:1253 ../fish/guestfish-actions.pod:994
5659 msgid "The function works on at least the following types of files:"
5663 #: ../src/guestfs-actions.pod:1259 ../fish/guestfish-actions.pod:1000
5664 msgid "many types of Un*x and Linux binary"
5668 #: ../src/guestfs-actions.pod:1263 ../fish/guestfish-actions.pod:1004
5669 msgid "many types of Un*x and Linux shared library"
5673 #: ../src/guestfs-actions.pod:1267 ../fish/guestfish-actions.pod:1008
5674 msgid "Windows Win32 and Win64 binaries"
5678 #: ../src/guestfs-actions.pod:1271 ../fish/guestfish-actions.pod:1012
5679 msgid "Windows Win32 and Win64 DLLs"
5683 #: ../src/guestfs-actions.pod:1273 ../fish/guestfish-actions.pod:1014
5684 msgid "Win32 binaries and DLLs return C<i386>."
5688 #: ../src/guestfs-actions.pod:1275 ../fish/guestfish-actions.pod:1016
5689 msgid "Win64 binaries and DLLs return C<x86_64>."
5693 #: ../src/guestfs-actions.pod:1279 ../fish/guestfish-actions.pod:1020
5694 msgid "Linux kernel modules"
5698 #: ../src/guestfs-actions.pod:1283 ../fish/guestfish-actions.pod:1024
5699 msgid "Linux new-style initrd images"
5703 #: ../src/guestfs-actions.pod:1287 ../fish/guestfish-actions.pod:1028
5704 msgid "some non-x86 Linux vmlinuz kernels"
5708 #: ../src/guestfs-actions.pod:1291 ../fish/guestfish-actions.pod:1032
5709 msgid "What it can't do currently:"
5713 #: ../src/guestfs-actions.pod:1297 ../fish/guestfish-actions.pod:1038
5714 msgid "static libraries (libfoo.a)"
5718 #: ../src/guestfs-actions.pod:1301 ../fish/guestfish-actions.pod:1042
5719 msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)"
5723 #: ../src/guestfs-actions.pod:1305 ../fish/guestfish-actions.pod:1046
5724 msgid "x86 Linux vmlinuz kernels"
5728 #: ../src/guestfs-actions.pod:1307 ../fish/guestfish-actions.pod:1048
5730 "x86 vmlinuz images (bzImage format) consist of a mix of 16-, 32- and "
5731 "compressed code, and are horribly hard to unpack. If you want to find the "
5732 "architecture of a kernel, use the architecture of the associated initrd or "
5733 "kernel module(s) instead."
5737 #: ../src/guestfs-actions.pod:1317
5738 msgid "guestfs_filesize"
5742 #: ../src/guestfs-actions.pod:1319
5745 " int64_t guestfs_filesize (guestfs_h *g,\n"
5746 "\t\tconst char *file);\n"
5751 #: ../src/guestfs-actions.pod:1322 ../fish/guestfish-actions.pod:1059
5752 msgid "This command returns the size of C<file> in bytes."
5756 #: ../src/guestfs-actions.pod:1324
5758 "To get other stats about a file, use C<guestfs_stat>, C<guestfs_lstat>, "
5759 "C<guestfs_is_dir>, C<guestfs_is_file> etc. To get the size of block "
5760 "devices, use C<guestfs_blockdev_getsize64>."
5764 #: ../src/guestfs-actions.pod:1330
5765 msgid "guestfs_fill"
5769 #: ../src/guestfs-actions.pod:1332
5772 " int guestfs_fill (guestfs_h *g,\n"
5775 "\t\tconst char *path);\n"
5780 #: ../src/guestfs-actions.pod:1337 ../fish/guestfish-actions.pod:1069
5782 "This command creates a new file called C<path>. The initial content of the "
5783 "file is C<len> octets of C<c>, where C<c> must be a number in the range "
5788 #: ../src/guestfs-actions.pod:1341
5790 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
5791 "C<guestfs_truncate_size>. To create a file with a pattern of repeating "
5792 "bytes use C<guestfs_fill_pattern>."
5796 #: ../src/guestfs-actions.pod:1353
5797 msgid "guestfs_fill_pattern"
5801 #: ../src/guestfs-actions.pod:1355
5804 " int guestfs_fill_pattern (guestfs_h *g,\n"
5805 "\t\tconst char *pattern,\n"
5807 "\t\tconst char *path);\n"
5812 #: ../src/guestfs-actions.pod:1360
5814 "This function is like C<guestfs_fill> except that it creates a new file of "
5815 "length C<len> containing the repeating pattern of bytes in C<pattern>. The "
5816 "pattern is truncated if necessary to ensure the length of the file is "
5817 "exactly C<len> bytes."
5821 #: ../src/guestfs-actions.pod:1372
5822 msgid "guestfs_find"
5826 #: ../src/guestfs-actions.pod:1374
5829 " char **guestfs_find (guestfs_h *g,\n"
5830 "\t\tconst char *directory);\n"
5835 #: ../src/guestfs-actions.pod:1377 ../fish/guestfish-actions.pod:1091
5837 "This command lists out all files and directories, recursively, starting at "
5838 "C<directory>. It is essentially equivalent to running the shell command "
5839 "C<find directory -print> but some post-processing happens on the output, "
5844 #: ../src/guestfs-actions.pod:1382 ../fish/guestfish-actions.pod:1096
5846 "This returns a list of strings I<without any prefix>. Thus if the directory "
5851 #: ../src/guestfs-actions.pod:1385 ../fish/guestfish-actions.pod:1099
5861 #: ../src/guestfs-actions.pod:1389
5862 msgid "then the returned list from C<guestfs_find> C</tmp> would be 4 elements:"
5866 #: ../src/guestfs-actions.pod:1392 ../fish/guestfish-actions.pod:1106
5877 #: ../src/guestfs-actions.pod:1397 ../fish/guestfish-actions.pod:1111
5878 msgid "If C<directory> is not a directory, then this command returns an error."
5882 #: ../src/guestfs-actions.pod:1400 ../fish/guestfish-actions.pod:1114
5883 msgid "The returned list is sorted."
5887 #: ../src/guestfs-actions.pod:1402
5888 msgid "See also C<guestfs_find0>."
5892 #: ../src/guestfs-actions.pod:1411
5893 msgid "guestfs_find0"
5897 #: ../src/guestfs-actions.pod:1413
5900 " int guestfs_find0 (guestfs_h *g,\n"
5901 "\t\tconst char *directory,\n"
5902 "\t\tconst char *files);\n"
5907 #: ../src/guestfs-actions.pod:1417 ../fish/guestfish-actions.pod:1125
5909 "This command lists out all files and directories, recursively, starting at "
5910 "C<directory>, placing the resulting list in the external file called "
5915 #: ../src/guestfs-actions.pod:1421
5917 "This command works the same way as C<guestfs_find> with the following "
5922 #: ../src/guestfs-actions.pod:1428 ../fish/guestfish-actions.pod:1136
5923 msgid "The resulting list is written to an external file."
5927 #: ../src/guestfs-actions.pod:1432 ../fish/guestfish-actions.pod:1140
5929 "Items (filenames) in the result are separated by C<\\0> characters. See "
5930 "L<find(1)> option I<-print0>."
5934 #: ../src/guestfs-actions.pod:1437 ../fish/guestfish-actions.pod:1145
5935 msgid "This command is not limited in the number of names that it can return."
5939 #: ../src/guestfs-actions.pod:1442 ../fish/guestfish-actions.pod:1150
5940 msgid "The result list is not sorted."
5944 #: ../src/guestfs-actions.pod:1448
5945 msgid "guestfs_findfs_label"
5949 #: ../src/guestfs-actions.pod:1450
5952 " char *guestfs_findfs_label (guestfs_h *g,\n"
5953 "\t\tconst char *label);\n"
5958 #: ../src/guestfs-actions.pod:1453 ../fish/guestfish-actions.pod:1160
5960 "This command searches the filesystems and returns the one which has the "
5961 "given label. An error is returned if no such filesystem can be found."
5965 #: ../src/guestfs-actions.pod:1457
5966 msgid "To find the label of a filesystem, use C<guestfs_vfs_label>."
5970 #: ../src/guestfs-actions.pod:1462
5971 msgid "guestfs_findfs_uuid"
5975 #: ../src/guestfs-actions.pod:1464
5978 " char *guestfs_findfs_uuid (guestfs_h *g,\n"
5979 "\t\tconst char *uuid);\n"
5984 #: ../src/guestfs-actions.pod:1467 ../fish/guestfish-actions.pod:1170
5986 "This command searches the filesystems and returns the one which has the "
5987 "given UUID. An error is returned if no such filesystem can be found."
5991 #: ../src/guestfs-actions.pod:1471
5992 msgid "To find the UUID of a filesystem, use C<guestfs_vfs_uuid>."
5996 #: ../src/guestfs-actions.pod:1476
5997 msgid "guestfs_fsck"
6001 #: ../src/guestfs-actions.pod:1478
6004 " int guestfs_fsck (guestfs_h *g,\n"
6005 "\t\tconst char *fstype,\n"
6006 "\t\tconst char *device);\n"
6011 #: ../src/guestfs-actions.pod:1482 ../fish/guestfish-actions.pod:1180
6013 "This runs the filesystem checker (fsck) on C<device> which should have "
6014 "filesystem type C<fstype>."
6018 #: ../src/guestfs-actions.pod:1485 ../fish/guestfish-actions.pod:1183
6020 "The returned integer is the status. See L<fsck(8)> for the list of status "
6021 "codes from C<fsck>."
6025 #: ../src/guestfs-actions.pod:1494 ../fish/guestfish-actions.pod:1192
6026 msgid "Multiple status codes can be summed together."
6030 #: ../src/guestfs-actions.pod:1498 ../fish/guestfish-actions.pod:1196
6032 "A non-zero return code can mean \"success\", for example if errors have been "
6033 "corrected on the filesystem."
6037 #: ../src/guestfs-actions.pod:1503 ../fish/guestfish-actions.pod:1201
6038 msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)."
6042 #: ../src/guestfs-actions.pod:1508 ../fish/guestfish-actions.pod:1206
6043 msgid "This command is entirely equivalent to running C<fsck -a -t fstype device>."
6047 #: ../src/guestfs-actions.pod:1512
6048 msgid "guestfs_get_append"
6052 #: ../src/guestfs-actions.pod:1514
6055 " const char *guestfs_get_append (guestfs_h *g);\n"
6060 #: ../src/guestfs-actions.pod:1516 ../fish/guestfish-actions.pod:1212
6062 "Return the additional kernel options which are added to the guest kernel "
6067 #: ../src/guestfs-actions.pod:1519 ../fish/guestfish-actions.pod:1215
6068 msgid "If C<NULL> then no options are added."
6072 #: ../src/guestfs-actions.pod:1521
6074 "This function returns a string which may be NULL. There is no way to return "
6075 "an error from this function. The string is owned by the guest handle and "
6076 "must I<not> be freed."
6080 #: ../src/guestfs-actions.pod:1525
6081 msgid "guestfs_get_autosync"
6085 #: ../src/guestfs-actions.pod:1527
6088 " int guestfs_get_autosync (guestfs_h *g);\n"
6093 #: ../src/guestfs-actions.pod:1529 ../fish/guestfish-actions.pod:1221
6094 msgid "Get the autosync flag."
6098 #: ../src/guestfs-actions.pod:1533
6099 msgid "guestfs_get_direct"
6103 #: ../src/guestfs-actions.pod:1535
6106 " int guestfs_get_direct (guestfs_h *g);\n"
6111 #: ../src/guestfs-actions.pod:1537 ../fish/guestfish-actions.pod:1227
6112 msgid "Return the direct appliance mode flag."
6116 #: ../src/guestfs-actions.pod:1541
6117 msgid "guestfs_get_e2label"
6121 #: ../src/guestfs-actions.pod:1543
6124 " char *guestfs_get_e2label (guestfs_h *g,\n"
6125 "\t\tconst char *device);\n"
6130 #: ../src/guestfs-actions.pod:1546 ../fish/guestfish-actions.pod:1233
6131 msgid "This returns the ext2/3/4 filesystem label of the filesystem on C<device>."
6135 #: ../src/guestfs-actions.pod:1552 ../fish/guestfish-actions.pod:1236
6137 "This function is deprecated. In new code, use the C<vfs_label> call "
6142 #: ../src/guestfs-actions.pod:1559
6143 msgid "guestfs_get_e2uuid"
6147 #: ../src/guestfs-actions.pod:1561
6150 " char *guestfs_get_e2uuid (guestfs_h *g,\n"
6151 "\t\tconst char *device);\n"
6156 #: ../src/guestfs-actions.pod:1564 ../fish/guestfish-actions.pod:1247
6157 msgid "This returns the ext2/3/4 filesystem UUID of the filesystem on C<device>."
6161 #: ../src/guestfs-actions.pod:1570 ../fish/guestfish-actions.pod:1250
6162 msgid "This function is deprecated. In new code, use the C<vfs_uuid> call instead."
6166 #: ../src/guestfs-actions.pod:1577
6167 msgid "guestfs_get_memsize"
6171 #: ../src/guestfs-actions.pod:1579
6174 " int guestfs_get_memsize (guestfs_h *g);\n"
6179 #: ../src/guestfs-actions.pod:1581 ../fish/guestfish-actions.pod:1261
6180 msgid "This gets the memory size in megabytes allocated to the qemu subprocess."
6184 #: ../src/guestfs-actions.pod:1584
6186 "If C<guestfs_set_memsize> was not called on this handle, and if "
6187 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
6188 "value for memsize."
6192 #: ../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
6193 msgid "For more information on the architecture of libguestfs, see L<guestfs(3)>."
6197 #: ../src/guestfs-actions.pod:1593
6198 msgid "guestfs_get_network"
6202 #: ../src/guestfs-actions.pod:1595
6205 " int guestfs_get_network (guestfs_h *g);\n"
6210 #: ../src/guestfs-actions.pod:1597 ../fish/guestfish-actions.pod:1275
6211 msgid "This returns the enable network flag."
6215 #: ../src/guestfs-actions.pod:1601
6216 msgid "guestfs_get_path"
6220 #: ../src/guestfs-actions.pod:1603
6223 " const char *guestfs_get_path (guestfs_h *g);\n"
6228 #: ../src/guestfs-actions.pod:1605 ../fish/guestfish-actions.pod:1281
6229 msgid "Return the current search path."
6233 #: ../src/guestfs-actions.pod:1607 ../fish/guestfish-actions.pod:1283
6235 "This is always non-NULL. If it wasn't set already, then this will return "
6240 #: ../src/guestfs-actions.pod:1610 ../src/guestfs-actions.pod:1633
6242 "This function returns a string, or NULL on error. The string is owned by "
6243 "the guest handle and must I<not> be freed."
6247 #: ../src/guestfs-actions.pod:1613
6248 msgid "guestfs_get_pid"
6252 #: ../src/guestfs-actions.pod:1615
6255 " int guestfs_get_pid (guestfs_h *g);\n"
6260 #: ../src/guestfs-actions.pod:1617 ../fish/guestfish-actions.pod:1290
6262 "Return the process ID of the qemu subprocess. If there is no qemu "
6263 "subprocess, then this will return an error."
6267 #: ../src/guestfs-actions.pod:1620 ../fish/guestfish-actions.pod:1293
6268 msgid "This is an internal call used for debugging and testing."
6272 #: ../src/guestfs-actions.pod:1624
6273 msgid "guestfs_get_qemu"
6277 #: ../src/guestfs-actions.pod:1626
6280 " const char *guestfs_get_qemu (guestfs_h *g);\n"
6285 #: ../src/guestfs-actions.pod:1628 ../fish/guestfish-actions.pod:1299
6286 msgid "Return the current qemu binary."
6290 #: ../src/guestfs-actions.pod:1630 ../fish/guestfish-actions.pod:1301
6292 "This is always non-NULL. If it wasn't set already, then this will return "
6293 "the default qemu binary name."
6297 #: ../src/guestfs-actions.pod:1636
6298 msgid "guestfs_get_recovery_proc"
6302 #: ../src/guestfs-actions.pod:1638
6305 " int guestfs_get_recovery_proc (guestfs_h *g);\n"
6310 #: ../src/guestfs-actions.pod:1640 ../fish/guestfish-actions.pod:1308
6311 msgid "Return the recovery process enabled flag."
6315 #: ../src/guestfs-actions.pod:1644
6316 msgid "guestfs_get_selinux"
6320 #: ../src/guestfs-actions.pod:1646
6323 " int guestfs_get_selinux (guestfs_h *g);\n"
6328 #: ../src/guestfs-actions.pod:1648
6330 "This returns the current setting of the selinux flag which is passed to the "
6331 "appliance at boot time. See C<guestfs_set_selinux>."
6335 #: ../src/guestfs-actions.pod:1656
6336 msgid "guestfs_get_state"
6340 #: ../src/guestfs-actions.pod:1658
6343 " int guestfs_get_state (guestfs_h *g);\n"
6348 #: ../src/guestfs-actions.pod:1660 ../fish/guestfish-actions.pod:1324
6350 "This returns the current state as an opaque integer. This is only useful "
6351 "for printing debug and internal error messages."
6355 #: ../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
6356 msgid "For more information on states, see L<guestfs(3)>."
6360 #: ../src/guestfs-actions.pod:1667
6361 msgid "guestfs_get_trace"
6365 #: ../src/guestfs-actions.pod:1669
6368 " int guestfs_get_trace (guestfs_h *g);\n"
6373 #: ../src/guestfs-actions.pod:1671 ../fish/guestfish-actions.pod:1333
6374 msgid "Return the command trace flag."
6378 #: ../src/guestfs-actions.pod:1675
6379 msgid "guestfs_get_umask"
6383 #: ../src/guestfs-actions.pod:1677
6386 " int guestfs_get_umask (guestfs_h *g);\n"
6391 #: ../src/guestfs-actions.pod:1679
6393 "Return the current umask. By default the umask is C<022> unless it has been "
6394 "set by calling C<guestfs_umask>."
6398 #: ../src/guestfs-actions.pod:1684
6399 msgid "guestfs_get_verbose"
6403 #: ../src/guestfs-actions.pod:1686
6406 " int guestfs_get_verbose (guestfs_h *g);\n"
6411 #: ../src/guestfs-actions.pod:1688 ../fish/guestfish-actions.pod:1346
6412 msgid "This returns the verbose messages flag."
6416 #: ../src/guestfs-actions.pod:1692
6417 msgid "guestfs_getcon"
6421 #: ../src/guestfs-actions.pod:1694
6424 " char *guestfs_getcon (guestfs_h *g);\n"
6429 #: ../src/guestfs-actions.pod:1696 ../fish/guestfish-actions.pod:1352
6430 msgid "This gets the SELinux security context of the daemon."
6434 #: ../src/guestfs-actions.pod:1698
6435 msgid "See the documentation about SELINUX in L<guestfs(3)>, and C<guestfs_setcon>"
6439 #: ../src/guestfs-actions.pod:1704
6440 msgid "guestfs_getxattrs"
6444 #: ../src/guestfs-actions.pod:1706
6447 " struct guestfs_xattr_list *guestfs_getxattrs (guestfs_h *g,\n"
6448 "\t\tconst char *path);\n"
6453 #: ../src/guestfs-actions.pod:1709 ../fish/guestfish-actions.pod:1361
6454 msgid "This call lists the extended attributes of the file or directory C<path>."
6458 #: ../src/guestfs-actions.pod:1712 ../fish/guestfish-actions.pod:1364
6460 "At the system call level, this is a combination of the L<listxattr(2)> and "
6461 "L<getxattr(2)> calls."
6465 #: ../src/guestfs-actions.pod:1715
6466 msgid "See also: C<guestfs_lgetxattrs>, L<attr(5)>."
6470 #: ../src/guestfs-actions.pod:1717 ../src/guestfs-actions.pod:2389 ../src/guestfs-actions.pod:2884
6472 "This function returns a C<struct guestfs_xattr_list *> (see "
6473 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
6474 "must call C<guestfs_free_xattr_list> after use>."
6478 #: ../src/guestfs-actions.pod:1722
6479 msgid "guestfs_glob_expand"
6483 #: ../src/guestfs-actions.pod:1724
6486 " char **guestfs_glob_expand (guestfs_h *g,\n"
6487 "\t\tconst char *pattern);\n"
6492 #: ../src/guestfs-actions.pod:1727 ../fish/guestfish-actions.pod:1373
6494 "This command searches for all the pathnames matching C<pattern> according to "
6495 "the wildcard expansion rules used by the shell."
6499 #: ../src/guestfs-actions.pod:1731 ../fish/guestfish-actions.pod:1377
6500 msgid "If no paths match, then this returns an empty list (note: not an error)."
6504 #: ../src/guestfs-actions.pod:1734 ../fish/guestfish-actions.pod:1380
6506 "It is just a wrapper around the C L<glob(3)> function with flags "
6507 "C<GLOB_MARK|GLOB_BRACE>. See that manual page for more details."
6511 #: ../src/guestfs-actions.pod:1742
6512 msgid "guestfs_grep"
6516 #: ../src/guestfs-actions.pod:1744
6519 " char **guestfs_grep (guestfs_h *g,\n"
6520 "\t\tconst char *regex,\n"
6521 "\t\tconst char *path);\n"
6526 #: ../src/guestfs-actions.pod:1748 ../fish/guestfish-actions.pod:1388
6527 msgid "This calls the external C<grep> program and returns the matching lines."
6531 #: ../src/guestfs-actions.pod:1758
6532 msgid "guestfs_grepi"
6536 #: ../src/guestfs-actions.pod:1760
6539 " char **guestfs_grepi (guestfs_h *g,\n"
6540 "\t\tconst char *regex,\n"
6541 "\t\tconst char *path);\n"
6546 #: ../src/guestfs-actions.pod:1764 ../fish/guestfish-actions.pod:1398
6547 msgid "This calls the external C<grep -i> program and returns the matching lines."
6551 #: ../src/guestfs-actions.pod:1774
6552 msgid "guestfs_grub_install"
6556 #: ../src/guestfs-actions.pod:1776
6559 " int guestfs_grub_install (guestfs_h *g,\n"
6560 "\t\tconst char *root,\n"
6561 "\t\tconst char *device);\n"
6566 #: ../src/guestfs-actions.pod:1780 ../fish/guestfish-actions.pod:1408
6568 "This command installs GRUB (the Grand Unified Bootloader) on C<device>, with "
6569 "the root directory being C<root>."
6573 #: ../src/guestfs-actions.pod:1783 ../fish/guestfish-actions.pod:1411
6575 "Note: If grub-install reports the error \"No suitable drive was found in the "
6576 "generated device map.\" it may be that you need to create a "
6577 "C</boot/grub/device.map> file first that contains the mapping between grub "
6578 "device names and Linux device names. It is usually sufficient to create a "
6583 #: ../src/guestfs-actions.pod:1790 ../fish/guestfish-actions.pod:1418
6591 #: ../src/guestfs-actions.pod:1792 ../fish/guestfish-actions.pod:1420
6592 msgid "replacing C</dev/vda> with the name of the installation device."
6596 #: ../src/guestfs-actions.pod:1796
6597 msgid "guestfs_head"
6601 #: ../src/guestfs-actions.pod:1798
6604 " char **guestfs_head (guestfs_h *g,\n"
6605 "\t\tconst char *path);\n"
6610 #: ../src/guestfs-actions.pod:1801 ../fish/guestfish-actions.pod:1426
6612 "This command returns up to the first 10 lines of a file as a list of "
6617 #: ../src/guestfs-actions.pod:1811
6618 msgid "guestfs_head_n"
6622 #: ../src/guestfs-actions.pod:1813
6625 " char **guestfs_head_n (guestfs_h *g,\n"
6626 "\t\tint nrlines,\n"
6627 "\t\tconst char *path);\n"
6632 #: ../src/guestfs-actions.pod:1817 ../fish/guestfish-actions.pod:1436
6634 "If the parameter C<nrlines> is a positive number, this returns the first "
6635 "C<nrlines> lines of the file C<path>."
6639 #: ../src/guestfs-actions.pod:1820 ../fish/guestfish-actions.pod:1439
6641 "If the parameter C<nrlines> is a negative number, this returns lines from "
6642 "the file C<path>, excluding the last C<nrlines> lines."
6646 #: ../src/guestfs-actions.pod:1823 ../src/guestfs-actions.pod:4725 ../fish/guestfish-actions.pod:1442 ../fish/guestfish-actions.pod:3642
6647 msgid "If the parameter C<nrlines> is zero, this returns an empty list."
6651 #: ../src/guestfs-actions.pod:1832
6652 msgid "guestfs_hexdump"
6656 #: ../src/guestfs-actions.pod:1834
6659 " char *guestfs_hexdump (guestfs_h *g,\n"
6660 "\t\tconst char *path);\n"
6665 #: ../src/guestfs-actions.pod:1837 ../fish/guestfish-actions.pod:1451
6667 "This runs C<hexdump -C> on the given C<path>. The result is the "
6668 "human-readable, canonical hex dump of the file."
6672 #: ../src/guestfs-actions.pod:1846
6673 msgid "guestfs_initrd_cat"
6677 #: ../src/guestfs-actions.pod:1848
6680 " char *guestfs_initrd_cat (guestfs_h *g,\n"
6681 "\t\tconst char *initrdpath,\n"
6682 "\t\tconst char *filename,\n"
6683 "\t\tsize_t *size_r);\n"
6688 #: ../src/guestfs-actions.pod:1853 ../fish/guestfish-actions.pod:1461
6690 "This command unpacks the file C<filename> from the initrd file called "
6691 "C<initrdpath>. The filename must be given I<without> the initial C</> "
6696 #: ../src/guestfs-actions.pod:1857 ../fish/guestfish-actions.pod:1465
6698 "For example, in guestfish you could use the following command to examine the "
6699 "boot script (usually called C</init>) contained in a Linux initrd or "
6704 #: ../src/guestfs-actions.pod:1861 ../fish/guestfish-actions.pod:1469
6707 " initrd-cat /boot/initrd-<version>.img init\n"
6712 #: ../src/guestfs-actions.pod:1863
6713 msgid "See also C<guestfs_initrd_list>."
6717 #: ../src/guestfs-actions.pod:1865 ../src/guestfs-actions.pod:3683 ../src/guestfs-actions.pod:3812
6719 "This function returns a buffer, or NULL on error. The size of the returned "
6720 "buffer is written to C<*size_r>. I<The caller must free the returned buffer "
6725 #: ../src/guestfs-actions.pod:1872
6726 msgid "guestfs_initrd_list"
6730 #: ../src/guestfs-actions.pod:1874
6733 " char **guestfs_initrd_list (guestfs_h *g,\n"
6734 "\t\tconst char *path);\n"
6739 #: ../src/guestfs-actions.pod:1877 ../fish/guestfish-actions.pod:1480
6740 msgid "This command lists out files contained in an initrd."
6744 #: ../src/guestfs-actions.pod:1879 ../fish/guestfish-actions.pod:1482
6746 "The files are listed without any initial C</> character. The files are "
6747 "listed in the order they appear (not necessarily alphabetical). Directory "
6748 "names are listed as separate items."
6752 #: ../src/guestfs-actions.pod:1883 ../fish/guestfish-actions.pod:1486
6754 "Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as "
6755 "initrd. We I<only> support the newer initramfs format (compressed cpio "
6760 #: ../src/guestfs-actions.pod:1891
6761 msgid "guestfs_inotify_add_watch"
6765 #: ../src/guestfs-actions.pod:1893
6768 " int64_t guestfs_inotify_add_watch (guestfs_h *g,\n"
6769 "\t\tconst char *path,\n"
6775 #: ../src/guestfs-actions.pod:1897 ../fish/guestfish-actions.pod:1494
6776 msgid "Watch C<path> for the events listed in C<mask>."
6780 #: ../src/guestfs-actions.pod:1899 ../fish/guestfish-actions.pod:1496
6782 "Note that if C<path> is a directory then events within that directory are "
6783 "watched, but this does I<not> happen recursively (in subdirectories)."
6787 #: ../src/guestfs-actions.pod:1903 ../fish/guestfish-actions.pod:1500
6789 "Note for non-C or non-Linux callers: the inotify events are defined by the "
6790 "Linux kernel ABI and are listed in C</usr/include/sys/inotify.h>."
6794 #: ../src/guestfs-actions.pod:1909
6795 msgid "guestfs_inotify_close"
6799 #: ../src/guestfs-actions.pod:1911
6802 " int guestfs_inotify_close (guestfs_h *g);\n"
6807 #: ../src/guestfs-actions.pod:1913 ../fish/guestfish-actions.pod:1508
6809 "This closes the inotify handle which was previously opened by inotify_init. "
6810 "It removes all watches, throws away any pending events, and deallocates all "
6815 #: ../src/guestfs-actions.pod:1919
6816 msgid "guestfs_inotify_files"
6820 #: ../src/guestfs-actions.pod:1921
6823 " char **guestfs_inotify_files (guestfs_h *g);\n"
6828 #: ../src/guestfs-actions.pod:1923
6830 "This function is a helpful wrapper around C<guestfs_inotify_read> which just "
6831 "returns a list of pathnames of objects that were touched. The returned "
6832 "pathnames are sorted and deduplicated."
6836 #: ../src/guestfs-actions.pod:1931
6837 msgid "guestfs_inotify_init"
6841 #: ../src/guestfs-actions.pod:1933
6844 " int guestfs_inotify_init (guestfs_h *g,\n"
6845 "\t\tint maxevents);\n"
6850 #: ../src/guestfs-actions.pod:1936 ../fish/guestfish-actions.pod:1524
6852 "This command creates a new inotify handle. The inotify subsystem can be "
6853 "used to notify events which happen to objects in the guest filesystem."
6857 #: ../src/guestfs-actions.pod:1940
6859 "C<maxevents> is the maximum number of events which will be queued up between "
6860 "calls to C<guestfs_inotify_read> or C<guestfs_inotify_files>. If this is "
6861 "passed as C<0>, then the kernel (or previously set) default is used. For "
6862 "Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel "
6863 "throws away events, but records the fact that it threw them away by setting "
6864 "a flag C<IN_Q_OVERFLOW> in the returned structure list (see "
6865 "C<guestfs_inotify_read>)."
6869 #: ../src/guestfs-actions.pod:1950
6871 "Before any events are generated, you have to add some watches to the "
6872 "internal watch list. See: C<guestfs_inotify_add_watch>, "
6873 "C<guestfs_inotify_rm_watch> and C<guestfs_inotify_watch_all>."
6877 #: ../src/guestfs-actions.pod:1956
6879 "Queued up events should be read periodically by calling "
6880 "C<guestfs_inotify_read> (or C<guestfs_inotify_files> which is just a helpful "
6881 "wrapper around C<guestfs_inotify_read>). If you don't read the events out "
6882 "often enough then you risk the internal queue overflowing."
6886 #: ../src/guestfs-actions.pod:1963
6888 "The handle should be closed after use by calling C<guestfs_inotify_close>. "
6889 "This also removes any watches automatically."
6893 #: ../src/guestfs-actions.pod:1967 ../fish/guestfish-actions.pod:1555
6895 "See also L<inotify(7)> for an overview of the inotify interface as exposed "
6896 "by the Linux kernel, which is roughly what we expose via libguestfs. Note "
6897 "that there is one global inotify handle per libguestfs instance."
6901 #: ../src/guestfs-actions.pod:1974
6902 msgid "guestfs_inotify_read"
6906 #: ../src/guestfs-actions.pod:1976
6909 " struct guestfs_inotify_event_list *guestfs_inotify_read (guestfs_h *g);\n"
6914 #: ../src/guestfs-actions.pod:1978 ../fish/guestfish-actions.pod:1564
6916 "Return the complete queue of events that have happened since the previous "
6921 #: ../src/guestfs-actions.pod:1981 ../fish/guestfish-actions.pod:1567
6922 msgid "If no events have happened, this returns an empty list."
6926 #: ../src/guestfs-actions.pod:1983 ../fish/guestfish-actions.pod:1569
6928 "I<Note>: In order to make sure that all events have been read, you must call "
6929 "this function repeatedly until it returns an empty list. The reason is that "
6930 "the call will read events up to the maximum appliance-to-host message size "
6931 "and leave remaining events in the queue."
6935 #: ../src/guestfs-actions.pod:1989
6937 "This function returns a C<struct guestfs_inotify_event_list *> (see "
6938 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
6939 "must call C<guestfs_free_inotify_event_list> after use>."
6943 #: ../src/guestfs-actions.pod:1994
6944 msgid "guestfs_inotify_rm_watch"
6948 #: ../src/guestfs-actions.pod:1996
6951 " int guestfs_inotify_rm_watch (guestfs_h *g,\n"
6957 #: ../src/guestfs-actions.pod:1999
6959 "Remove a previously defined inotify watch. See "
6960 "C<guestfs_inotify_add_watch>."
6964 #: ../src/guestfs-actions.pod:2004
6965 msgid "guestfs_inspect_get_arch"
6969 #: ../src/guestfs-actions.pod:2006
6972 " char *guestfs_inspect_get_arch (guestfs_h *g,\n"
6973 "\t\tconst char *root);\n"
6978 #: ../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
6980 "This function should only be called with a root device string as returned by "
6981 "C<guestfs_inspect_os>."
6985 #: ../src/guestfs-actions.pod:2012
6987 "This returns the architecture of the inspected operating system. The "
6988 "possible return values are listed under C<guestfs_file_architecture>."
6992 #: ../src/guestfs-actions.pod:2016 ../fish/guestfish-actions.pod:1593
6994 "If the architecture could not be determined, then the string C<unknown> is "
6999 #: ../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
7000 msgid "Please read L<guestfs(3)/INSPECTION> for more details."
7004 #: ../src/guestfs-actions.pod:2024
7005 msgid "guestfs_inspect_get_distro"
7009 #: ../src/guestfs-actions.pod:2026
7012 " char *guestfs_inspect_get_distro (guestfs_h *g,\n"
7013 "\t\tconst char *root);\n"
7018 #: ../src/guestfs-actions.pod:2032 ../fish/guestfish-actions.pod:1605
7019 msgid "This returns the distro (distribution) of the inspected operating system."
7023 #: ../src/guestfs-actions.pod:2035 ../fish/guestfish-actions.pod:1608
7024 msgid "Currently defined distros are:"
7028 #: ../src/guestfs-actions.pod:2039 ../fish/guestfish-actions.pod:1612
7033 #: ../src/guestfs-actions.pod:2041 ../fish/guestfish-actions.pod:1614
7034 msgid "Debian or a Debian-derived distro such as Ubuntu."
7038 #: ../src/guestfs-actions.pod:2043 ../fish/guestfish-actions.pod:1616
7043 #: ../src/guestfs-actions.pod:2045 ../fish/guestfish-actions.pod:1618
7048 #: ../src/guestfs-actions.pod:2047 ../fish/guestfish-actions.pod:1620
7049 msgid "\"redhat-based\""
7053 #: ../src/guestfs-actions.pod:2049 ../fish/guestfish-actions.pod:1622
7054 msgid "Some Red Hat-derived distro."
7058 #: ../src/guestfs-actions.pod:2051 ../fish/guestfish-actions.pod:1624
7063 #: ../src/guestfs-actions.pod:2053 ../fish/guestfish-actions.pod:1626
7064 msgid "Red Hat Enterprise Linux and some derivatives."
7068 #: ../src/guestfs-actions.pod:2055 ../src/guestfs-actions.pod:2207 ../fish/guestfish-actions.pod:1628 ../fish/guestfish-actions.pod:1754
7073 #: ../src/guestfs-actions.pod:2057 ../fish/guestfish-actions.pod:1630
7075 "Windows does not have distributions. This string is returned if the OS type "
7080 #: ../src/guestfs-actions.pod:2060 ../src/guestfs-actions.pod:2211 ../fish/guestfish-actions.pod:1633 ../fish/guestfish-actions.pod:1758
7085 #: ../src/guestfs-actions.pod:2062 ../fish/guestfish-actions.pod:1635
7086 msgid "The distro could not be determined."
7090 #: ../src/guestfs-actions.pod:2066 ../src/guestfs-actions.pod:2217 ../fish/guestfish-actions.pod:1639 ../fish/guestfish-actions.pod:1764
7092 "Future versions of libguestfs may return other strings here. The caller "
7093 "should be prepared to handle any string."
7097 #: ../src/guestfs-actions.pod:2074
7098 msgid "guestfs_inspect_get_filesystems"
7102 #: ../src/guestfs-actions.pod:2076
7105 " char **guestfs_inspect_get_filesystems (guestfs_h *g,\n"
7106 "\t\tconst char *root);\n"
7111 #: ../src/guestfs-actions.pod:2082 ../fish/guestfish-actions.pod:1651
7113 "This returns a list of all the filesystems that we think are associated with "
7114 "this operating system. This includes the root filesystem, other ordinary "
7115 "filesystems, and non-mounted devices like swap partitions."
7119 #: ../src/guestfs-actions.pod:2087 ../fish/guestfish-actions.pod:1656
7121 "In the case of a multi-boot virtual machine, it is possible for a filesystem "
7122 "to be shared between operating systems."
7126 #: ../src/guestfs-actions.pod:2090
7128 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
7129 "C<guestfs_inspect_get_mountpoints>."
7133 #: ../src/guestfs-actions.pod:2097
7134 msgid "guestfs_inspect_get_major_version"
7138 #: ../src/guestfs-actions.pod:2099
7141 " int guestfs_inspect_get_major_version (guestfs_h *g,\n"
7142 "\t\tconst char *root);\n"
7147 #: ../src/guestfs-actions.pod:2105 ../fish/guestfish-actions.pod:1669
7148 msgid "This returns the major version number of the inspected operating system."
7152 #: ../src/guestfs-actions.pod:2108 ../fish/guestfish-actions.pod:1672
7154 "Windows uses a consistent versioning scheme which is I<not> reflected in the "
7155 "popular public names used by the operating system. Notably the operating "
7156 "system known as \"Windows 7\" is really version 6.1 (ie. major = 6, minor = "
7157 "1). You can find out the real versions corresponding to releases of Windows "
7158 "by consulting Wikipedia or MSDN."
7162 #: ../src/guestfs-actions.pod:2115 ../src/guestfs-actions.pod:2132 ../fish/guestfish-actions.pod:1679 ../fish/guestfish-actions.pod:1693
7163 msgid "If the version could not be determined, then C<0> is returned."
7167 #: ../src/guestfs-actions.pod:2121
7168 msgid "guestfs_inspect_get_minor_version"
7172 #: ../src/guestfs-actions.pod:2123
7175 " int guestfs_inspect_get_minor_version (guestfs_h *g,\n"
7176 "\t\tconst char *root);\n"
7181 #: ../src/guestfs-actions.pod:2129 ../fish/guestfish-actions.pod:1690
7182 msgid "This returns the minor version number of the inspected operating system."
7186 #: ../src/guestfs-actions.pod:2134
7188 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
7189 "C<guestfs_inspect_get_major_version>."
7193 #: ../src/guestfs-actions.pod:2139
7194 msgid "guestfs_inspect_get_mountpoints"
7198 #: ../src/guestfs-actions.pod:2141
7201 " char **guestfs_inspect_get_mountpoints (guestfs_h *g,\n"
7202 "\t\tconst char *root);\n"
7207 #: ../src/guestfs-actions.pod:2147 ../fish/guestfish-actions.pod:1705
7209 "This returns a hash of where we think the filesystems associated with this "
7210 "operating system should be mounted. Callers should note that this is at "
7211 "best an educated guess made by reading configuration files such as "
7216 #: ../src/guestfs-actions.pod:2152 ../fish/guestfish-actions.pod:1710
7218 "Each element in the returned hashtable has a key which is the path of the "
7219 "mountpoint (eg. C</boot>) and a value which is the filesystem that would be "
7220 "mounted there (eg. C</dev/sda1>)."
7224 #: ../src/guestfs-actions.pod:2157 ../fish/guestfish-actions.pod:1715
7225 msgid "Non-mounted devices such as swap devices are I<not> returned in this list."
7229 #: ../src/guestfs-actions.pod:2160
7231 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
7232 "C<guestfs_inspect_get_filesystems>."
7236 #: ../src/guestfs-actions.pod:2163 ../src/guestfs-actions.pod:3320 ../src/guestfs-actions.pod:4842
7238 "This function returns a NULL-terminated array of strings, or NULL if there "
7239 "was an error. The array of strings will always have length C<2n+1>, where "
7240 "C<n> keys and values alternate, followed by the trailing NULL entry. I<The "
7241 "caller must free the strings and the array after use>."
7245 #: ../src/guestfs-actions.pod:2169
7246 msgid "guestfs_inspect_get_product_name"
7250 #: ../src/guestfs-actions.pod:2171
7253 " char *guestfs_inspect_get_product_name (guestfs_h *g,\n"
7254 "\t\tconst char *root);\n"
7259 #: ../src/guestfs-actions.pod:2177 ../fish/guestfish-actions.pod:1728
7261 "This returns the product name of the inspected operating system. The "
7262 "product name is generally some freeform string which can be displayed to the "
7263 "user, but should not be parsed by programs."
7267 #: ../src/guestfs-actions.pod:2182 ../fish/guestfish-actions.pod:1733
7269 "If the product name could not be determined, then the string C<unknown> is "
7274 #: ../src/guestfs-actions.pod:2190
7275 msgid "guestfs_inspect_get_type"
7279 #: ../src/guestfs-actions.pod:2192
7282 " char *guestfs_inspect_get_type (guestfs_h *g,\n"
7283 "\t\tconst char *root);\n"
7288 #: ../src/guestfs-actions.pod:2198 ../fish/guestfish-actions.pod:1745
7290 "This returns the type of the inspected operating system. Currently defined "
7295 #: ../src/guestfs-actions.pod:2203 ../fish/guestfish-actions.pod:1750
7300 #: ../src/guestfs-actions.pod:2205 ../fish/guestfish-actions.pod:1752
7301 msgid "Any Linux-based operating system."
7305 #: ../src/guestfs-actions.pod:2209 ../fish/guestfish-actions.pod:1756
7306 msgid "Any Microsoft Windows operating system."
7310 #: ../src/guestfs-actions.pod:2213 ../fish/guestfish-actions.pod:1760
7311 msgid "The operating system type could not be determined."
7315 #: ../src/guestfs-actions.pod:2225
7316 msgid "guestfs_inspect_os"
7320 #: ../src/guestfs-actions.pod:2227
7323 " char **guestfs_inspect_os (guestfs_h *g);\n"
7328 #: ../src/guestfs-actions.pod:2229 ../fish/guestfish-actions.pod:1773
7330 "This function uses other libguestfs functions and certain heuristics to "
7331 "inspect the disk(s) (usually disks belonging to a virtual machine), looking "
7332 "for operating systems."
7336 #: ../src/guestfs-actions.pod:2233 ../fish/guestfish-actions.pod:1777
7337 msgid "The list returned is empty if no operating systems were found."
7341 #: ../src/guestfs-actions.pod:2235 ../fish/guestfish-actions.pod:1779
7343 "If one operating system was found, then this returns a list with a single "
7344 "element, which is the name of the root filesystem of this operating system. "
7345 "It is also possible for this function to return a list containing more than "
7346 "one element, indicating a dual-boot or multi-boot virtual machine, with each "
7347 "element being the root filesystem of one of the operating systems."
7351 #: ../src/guestfs-actions.pod:2242
7353 "You can pass the root string(s) returned to other C<guestfs_inspect_get_*> "
7354 "functions in order to query further information about each operating system, "
7355 "such as the name and version."
7359 #: ../src/guestfs-actions.pod:2247
7361 "This function uses other libguestfs features such as C<guestfs_mount_ro> and "
7362 "C<guestfs_umount_all> in order to mount and unmount filesystems and look at "
7363 "the contents. This should be called with no disks currently mounted. The "
7364 "function may also use Augeas, so any existing Augeas handle will be closed."
7368 #: ../src/guestfs-actions.pod:2253 ../fish/guestfish-actions.pod:1797
7370 "This function cannot decrypt encrypted disks. The caller must do that first "
7371 "(supplying the necessary keys) if the disk is encrypted."
7375 #: ../src/guestfs-actions.pod:2263
7376 msgid "guestfs_is_busy"
7380 #: ../src/guestfs-actions.pod:2265
7383 " int guestfs_is_busy (guestfs_h *g);\n"
7388 #: ../src/guestfs-actions.pod:2267 ../fish/guestfish-actions.pod:1807
7390 "This returns true iff this handle is busy processing a command (in the "
7395 #: ../src/guestfs-actions.pod:2274
7396 msgid "guestfs_is_config"
7400 #: ../src/guestfs-actions.pod:2276
7403 " int guestfs_is_config (guestfs_h *g);\n"
7408 #: ../src/guestfs-actions.pod:2278 ../fish/guestfish-actions.pod:1816
7410 "This returns true iff this handle is being configured (in the C<CONFIG> "
7415 #: ../src/guestfs-actions.pod:2285
7416 msgid "guestfs_is_dir"
7420 #: ../src/guestfs-actions.pod:2287
7423 " int guestfs_is_dir (guestfs_h *g,\n"
7424 "\t\tconst char *path);\n"
7429 #: ../src/guestfs-actions.pod:2290 ../fish/guestfish-actions.pod:1825
7431 "This returns C<true> if and only if there is a directory with the given "
7432 "C<path> name. Note that it returns false for other objects like files."
7436 #: ../src/guestfs-actions.pod:2294 ../src/guestfs-actions.pod:2307
7437 msgid "See also C<guestfs_stat>."
7441 #: ../src/guestfs-actions.pod:2298
7442 msgid "guestfs_is_file"
7446 #: ../src/guestfs-actions.pod:2300
7449 " int guestfs_is_file (guestfs_h *g,\n"
7450 "\t\tconst char *path);\n"
7455 #: ../src/guestfs-actions.pod:2303 ../fish/guestfish-actions.pod:1835
7457 "This returns C<true> if and only if there is a file with the given C<path> "
7458 "name. Note that it returns false for other objects like directories."
7462 #: ../src/guestfs-actions.pod:2311
7463 msgid "guestfs_is_launching"
7467 #: ../src/guestfs-actions.pod:2313
7470 " int guestfs_is_launching (guestfs_h *g);\n"
7475 #: ../src/guestfs-actions.pod:2315 ../fish/guestfish-actions.pod:1845
7477 "This returns true iff this handle is launching the subprocess (in the "
7478 "C<LAUNCHING> state)."
7482 #: ../src/guestfs-actions.pod:2322
7483 msgid "guestfs_is_lv"
7487 #: ../src/guestfs-actions.pod:2324
7490 " int guestfs_is_lv (guestfs_h *g,\n"
7491 "\t\tconst char *device);\n"
7496 #: ../src/guestfs-actions.pod:2327 ../fish/guestfish-actions.pod:1854
7498 "This command tests whether C<device> is a logical volume, and returns true "
7499 "iff this is the case."
7503 #: ../src/guestfs-actions.pod:2332
7504 msgid "guestfs_is_ready"
7508 #: ../src/guestfs-actions.pod:2334
7511 " int guestfs_is_ready (guestfs_h *g);\n"
7516 #: ../src/guestfs-actions.pod:2336 ../fish/guestfish-actions.pod:1861
7518 "This returns true iff this handle is ready to accept commands (in the "
7523 #: ../src/guestfs-actions.pod:2343
7524 msgid "guestfs_kill_subprocess"
7528 #: ../src/guestfs-actions.pod:2345
7531 " int guestfs_kill_subprocess (guestfs_h *g);\n"
7536 #: ../src/guestfs-actions.pod:2347 ../fish/guestfish-actions.pod:1870
7537 msgid "This kills the qemu subprocess. You should never need to call this."
7541 #: ../src/guestfs-actions.pod:2351
7542 msgid "guestfs_launch"
7546 #: ../src/guestfs-actions.pod:2353
7549 " int guestfs_launch (guestfs_h *g);\n"
7554 #: ../src/guestfs-actions.pod:2355 ../fish/guestfish-actions.pod:1876
7556 "Internally libguestfs is implemented by running a virtual machine using "
7561 #: ../src/guestfs-actions.pod:2358 ../fish/guestfish-actions.pod:1879
7563 "You should call this after configuring the handle (eg. adding drives) but "
7564 "before performing any actions."
7568 #: ../src/guestfs-actions.pod:2363
7569 msgid "guestfs_lchown"
7573 #: ../src/guestfs-actions.pod:2365
7576 " int guestfs_lchown (guestfs_h *g,\n"
7579 "\t\tconst char *path);\n"
7584 #: ../src/guestfs-actions.pod:2370
7586 "Change the file owner to C<owner> and group to C<group>. This is like "
7587 "C<guestfs_chown> but if C<path> is a symlink then the link itself is "
7588 "changed, not the target."
7592 #: ../src/guestfs-actions.pod:2380
7593 msgid "guestfs_lgetxattrs"
7597 #: ../src/guestfs-actions.pod:2382
7600 " struct guestfs_xattr_list *guestfs_lgetxattrs (guestfs_h *g,\n"
7601 "\t\tconst char *path);\n"
7606 #: ../src/guestfs-actions.pod:2385
7608 "This is the same as C<guestfs_getxattrs>, but if C<path> is a symbolic link, "
7609 "then it returns the extended attributes of the link itself."
7613 #: ../src/guestfs-actions.pod:2394
7614 msgid "guestfs_list_devices"
7618 #: ../src/guestfs-actions.pod:2396
7621 " char **guestfs_list_devices (guestfs_h *g);\n"
7626 #: ../src/guestfs-actions.pod:2398 ../fish/guestfish-actions.pod:1906
7627 msgid "List all the block devices."
7631 #: ../src/guestfs-actions.pod:2400 ../fish/guestfish-actions.pod:1908
7632 msgid "The full block device names are returned, eg. C</dev/sda>"
7636 #: ../src/guestfs-actions.pod:2406
7637 msgid "guestfs_list_partitions"
7641 #: ../src/guestfs-actions.pod:2408
7644 " char **guestfs_list_partitions (guestfs_h *g);\n"
7649 #: ../src/guestfs-actions.pod:2410 ../fish/guestfish-actions.pod:1914
7650 msgid "List all the partitions detected on all block devices."
7654 #: ../src/guestfs-actions.pod:2412 ../fish/guestfish-actions.pod:1916
7655 msgid "The full partition device names are returned, eg. C</dev/sda1>"
7659 #: ../src/guestfs-actions.pod:2414
7661 "This does not return logical volumes. For that you will need to call "
7666 #: ../src/guestfs-actions.pod:2421
7671 #: ../src/guestfs-actions.pod:2423
7674 " char *guestfs_ll (guestfs_h *g,\n"
7675 "\t\tconst char *directory);\n"
7680 #: ../src/guestfs-actions.pod:2426 ../fish/guestfish-actions.pod:1925
7682 "List the files in C<directory> (relative to the root directory, there is no "
7683 "cwd) in the format of 'ls -la'."
7687 #: ../src/guestfs-actions.pod:2429 ../fish/guestfish-actions.pod:1928
7689 "This command is mostly useful for interactive sessions. It is I<not> "
7690 "intended that you try to parse the output string."
7694 #: ../src/guestfs-actions.pod:2435
7699 #: ../src/guestfs-actions.pod:2437
7702 " int guestfs_ln (guestfs_h *g,\n"
7703 "\t\tconst char *target,\n"
7704 "\t\tconst char *linkname);\n"
7709 #: ../src/guestfs-actions.pod:2441 ../fish/guestfish-actions.pod:1935
7710 msgid "This command creates a hard link using the C<ln> command."
7714 #: ../src/guestfs-actions.pod:2445
7715 msgid "guestfs_ln_f"
7719 #: ../src/guestfs-actions.pod:2447
7722 " int guestfs_ln_f (guestfs_h *g,\n"
7723 "\t\tconst char *target,\n"
7724 "\t\tconst char *linkname);\n"
7729 #: ../src/guestfs-actions.pod:2451 ../fish/guestfish-actions.pod:1941
7731 "This command creates a hard link using the C<ln -f> command. The C<-f> "
7732 "option removes the link (C<linkname>) if it exists already."
7736 #: ../src/guestfs-actions.pod:2456
7737 msgid "guestfs_ln_s"
7741 #: ../src/guestfs-actions.pod:2458
7744 " int guestfs_ln_s (guestfs_h *g,\n"
7745 "\t\tconst char *target,\n"
7746 "\t\tconst char *linkname);\n"
7751 #: ../src/guestfs-actions.pod:2462 ../fish/guestfish-actions.pod:1948
7752 msgid "This command creates a symbolic link using the C<ln -s> command."
7756 #: ../src/guestfs-actions.pod:2466
7757 msgid "guestfs_ln_sf"
7761 #: ../src/guestfs-actions.pod:2468
7764 " int guestfs_ln_sf (guestfs_h *g,\n"
7765 "\t\tconst char *target,\n"
7766 "\t\tconst char *linkname);\n"
7771 #: ../src/guestfs-actions.pod:2472 ../fish/guestfish-actions.pod:1954
7773 "This command creates a symbolic link using the C<ln -sf> command, The C<-f> "
7774 "option removes the link (C<linkname>) if it exists already."
7778 #: ../src/guestfs-actions.pod:2477
7779 msgid "guestfs_lremovexattr"
7783 #: ../src/guestfs-actions.pod:2479
7786 " int guestfs_lremovexattr (guestfs_h *g,\n"
7787 "\t\tconst char *xattr,\n"
7788 "\t\tconst char *path);\n"
7793 #: ../src/guestfs-actions.pod:2483
7795 "This is the same as C<guestfs_removexattr>, but if C<path> is a symbolic "
7796 "link, then it removes an extended attribute of the link itself."
7800 #: ../src/guestfs-actions.pod:2489
7805 #: ../src/guestfs-actions.pod:2491
7808 " char **guestfs_ls (guestfs_h *g,\n"
7809 "\t\tconst char *directory);\n"
7814 #: ../src/guestfs-actions.pod:2494 ../fish/guestfish-actions.pod:1969
7816 "List the files in C<directory> (relative to the root directory, there is no "
7817 "cwd). The '.' and '..' entries are not returned, but hidden files are "
7822 #: ../src/guestfs-actions.pod:2498
7824 "This command is mostly useful for interactive sessions. Programs should "
7825 "probably use C<guestfs_readdir> instead."
7829 #: ../src/guestfs-actions.pod:2505
7830 msgid "guestfs_lsetxattr"
7834 #: ../src/guestfs-actions.pod:2507
7837 " int guestfs_lsetxattr (guestfs_h *g,\n"
7838 "\t\tconst char *xattr,\n"
7839 "\t\tconst char *val,\n"
7841 "\t\tconst char *path);\n"
7846 #: ../src/guestfs-actions.pod:2513
7848 "This is the same as C<guestfs_setxattr>, but if C<path> is a symbolic link, "
7849 "then it sets an extended attribute of the link itself."
7853 #: ../src/guestfs-actions.pod:2519
7854 msgid "guestfs_lstat"
7858 #: ../src/guestfs-actions.pod:2521
7861 " struct guestfs_stat *guestfs_lstat (guestfs_h *g,\n"
7862 "\t\tconst char *path);\n"
7867 #: ../src/guestfs-actions.pod:2524 ../src/guestfs-actions.pod:4507 ../fish/guestfish-actions.pod:1988 ../fish/guestfish-actions.pod:3477
7868 msgid "Returns file information for the given C<path>."
7872 #: ../src/guestfs-actions.pod:2526
7874 "This is the same as C<guestfs_stat> except that if C<path> is a symbolic "
7875 "link, then the link is stat-ed, not the file it refers to."
7879 #: ../src/guestfs-actions.pod:2530 ../fish/guestfish-actions.pod:1994
7880 msgid "This is the same as the C<lstat(2)> system call."
7884 #: ../src/guestfs-actions.pod:2532 ../src/guestfs-actions.pod:4511
7886 "This function returns a C<struct guestfs_stat *>, or NULL if there was an "
7887 "error. I<The caller must call C<guestfs_free_stat> after use>."
7891 #: ../src/guestfs-actions.pod:2536
7892 msgid "guestfs_lstatlist"
7896 #: ../src/guestfs-actions.pod:2538
7899 " struct guestfs_stat_list *guestfs_lstatlist (guestfs_h *g,\n"
7900 "\t\tconst char *path,\n"
7901 "\t\tchar *const *names);\n"
7906 #: ../src/guestfs-actions.pod:2542
7908 "This call allows you to perform the C<guestfs_lstat> operation on multiple "
7909 "files, where all files are in the directory C<path>. C<names> is the list "
7910 "of files from this directory."
7914 #: ../src/guestfs-actions.pod:2546 ../fish/guestfish-actions.pod:2004
7916 "On return you get a list of stat structs, with a one-to-one correspondence "
7917 "to the C<names> list. If any name did not exist or could not be lstat'd, "
7918 "then the C<ino> field of that structure is set to C<-1>."
7922 #: ../src/guestfs-actions.pod:2551
7924 "This call is intended for programs that want to efficiently list a directory "
7925 "contents without making many round-trips. See also C<guestfs_lxattrlist> "
7926 "for a similarly efficient call for getting extended attributes. Very long "
7927 "directory listings might cause the protocol message size to be exceeded, "
7928 "causing this call to fail. The caller must split up such requests into "
7929 "smaller groups of names."
7933 #: ../src/guestfs-actions.pod:2559
7935 "This function returns a C<struct guestfs_stat_list *> (see "
7936 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
7937 "must call C<guestfs_free_stat_list> after use>."
7941 #: ../src/guestfs-actions.pod:2564
7942 msgid "guestfs_luks_add_key"
7946 #: ../src/guestfs-actions.pod:2566
7949 " int guestfs_luks_add_key (guestfs_h *g,\n"
7950 "\t\tconst char *device,\n"
7951 "\t\tconst char *key,\n"
7952 "\t\tconst char *newkey,\n"
7953 "\t\tint keyslot);\n"
7958 #: ../src/guestfs-actions.pod:2572 ../fish/guestfish-actions.pod:2021
7960 "This command adds a new key on LUKS device C<device>. C<key> is any "
7961 "existing key, and is used to access the device. C<newkey> is the new key to "
7962 "add. C<keyslot> is the key slot that will be replaced."
7966 #: ../src/guestfs-actions.pod:2577
7968 "Note that if C<keyslot> already contains a key, then this command will "
7969 "fail. You have to use C<guestfs_luks_kill_slot> first to remove that key."
7973 #: ../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
7975 "This function takes a key or passphrase parameter which could contain "
7976 "sensitive material. Read the section L</KEYS AND PASSPHRASES> for more "
7981 #: ../src/guestfs-actions.pod:2587
7982 msgid "guestfs_luks_close"
7986 #: ../src/guestfs-actions.pod:2589
7989 " int guestfs_luks_close (guestfs_h *g,\n"
7990 "\t\tconst char *device);\n"
7995 #: ../src/guestfs-actions.pod:2592
7997 "This closes a LUKS device that was created earlier by C<guestfs_luks_open> "
7998 "or C<guestfs_luks_open_ro>. The C<device> parameter must be the name of the "
7999 "LUKS mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
8000 "underlying block device."
8004 #: ../src/guestfs-actions.pod:2600
8005 msgid "guestfs_luks_format"
8009 #: ../src/guestfs-actions.pod:2602
8012 " int guestfs_luks_format (guestfs_h *g,\n"
8013 "\t\tconst char *device,\n"
8014 "\t\tconst char *key,\n"
8015 "\t\tint keyslot);\n"
8020 #: ../src/guestfs-actions.pod:2607 ../fish/guestfish-actions.pod:2047
8022 "This command erases existing data on C<device> and formats the device as a "
8023 "LUKS encrypted device. C<key> is the initial key, which is added to key "
8024 "slot C<slot>. (LUKS supports 8 key slots, numbered 0-7)."
8028 #: ../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
8030 "B<This command is dangerous. Without careful use you can easily destroy all "
8035 #: ../src/guestfs-actions.pod:2621
8036 msgid "guestfs_luks_format_cipher"
8040 #: ../src/guestfs-actions.pod:2623
8043 " int guestfs_luks_format_cipher (guestfs_h *g,\n"
8044 "\t\tconst char *device,\n"
8045 "\t\tconst char *key,\n"
8046 "\t\tint keyslot,\n"
8047 "\t\tconst char *cipher);\n"
8052 #: ../src/guestfs-actions.pod:2629
8054 "This command is the same as C<guestfs_luks_format> but it also allows you to "
8055 "set the C<cipher> used."
8059 #: ../src/guestfs-actions.pod:2641
8060 msgid "guestfs_luks_kill_slot"
8064 #: ../src/guestfs-actions.pod:2643
8067 " int guestfs_luks_kill_slot (guestfs_h *g,\n"
8068 "\t\tconst char *device,\n"
8069 "\t\tconst char *key,\n"
8070 "\t\tint keyslot);\n"
8075 #: ../src/guestfs-actions.pod:2648 ../fish/guestfish-actions.pod:2075
8077 "This command deletes the key in key slot C<keyslot> from the encrypted LUKS "
8078 "device C<device>. C<key> must be one of the I<other> keys."
8082 #: ../src/guestfs-actions.pod:2658
8083 msgid "guestfs_luks_open"
8087 #: ../src/guestfs-actions.pod:2660
8090 " int guestfs_luks_open (guestfs_h *g,\n"
8091 "\t\tconst char *device,\n"
8092 "\t\tconst char *key,\n"
8093 "\t\tconst char *mapname);\n"
8098 #: ../src/guestfs-actions.pod:2665 ../fish/guestfish-actions.pod:2086
8100 "This command opens a block device which has been encrypted according to the "
8101 "Linux Unified Key Setup (LUKS) standard."
8105 #: ../src/guestfs-actions.pod:2668 ../fish/guestfish-actions.pod:2089
8106 msgid "C<device> is the encrypted block device or partition."
8110 #: ../src/guestfs-actions.pod:2670 ../fish/guestfish-actions.pod:2091
8112 "The caller must supply one of the keys associated with the LUKS block "
8113 "device, in the C<key> parameter."
8117 #: ../src/guestfs-actions.pod:2673 ../fish/guestfish-actions.pod:2094
8119 "This creates a new block device called C</dev/mapper/mapname>. Reads and "
8120 "writes to this block device are decrypted from and encrypted to the "
8121 "underlying C<device> respectively."
8125 #: ../src/guestfs-actions.pod:2677
8127 "If this block device contains LVM volume groups, then calling "
8128 "C<guestfs_vgscan> followed by C<guestfs_vg_activate_all> will make them "
8133 #: ../src/guestfs-actions.pod:2687
8134 msgid "guestfs_luks_open_ro"
8138 #: ../src/guestfs-actions.pod:2689
8141 " int guestfs_luks_open_ro (guestfs_h *g,\n"
8142 "\t\tconst char *device,\n"
8143 "\t\tconst char *key,\n"
8144 "\t\tconst char *mapname);\n"
8149 #: ../src/guestfs-actions.pod:2694
8151 "This is the same as C<guestfs_luks_open> except that a read-only mapping is "
8156 #: ../src/guestfs-actions.pod:2703
8157 msgid "guestfs_lvcreate"
8161 #: ../src/guestfs-actions.pod:2705
8164 " int guestfs_lvcreate (guestfs_h *g,\n"
8165 "\t\tconst char *logvol,\n"
8166 "\t\tconst char *volgroup,\n"
8167 "\t\tint mbytes);\n"
8172 #: ../src/guestfs-actions.pod:2710 ../fish/guestfish-actions.pod:2119
8174 "This creates an LVM logical volume called C<logvol> on the volume group "
8175 "C<volgroup>, with C<size> megabytes."
8179 #: ../src/guestfs-actions.pod:2715
8180 msgid "guestfs_lvm_clear_filter"
8184 #: ../src/guestfs-actions.pod:2717
8187 " int guestfs_lvm_clear_filter (guestfs_h *g);\n"
8192 #: ../src/guestfs-actions.pod:2719
8194 "This undoes the effect of C<guestfs_lvm_set_filter>. LVM will be able to "
8195 "see every block device."
8199 #: ../src/guestfs-actions.pod:2722 ../src/guestfs-actions.pod:2758 ../fish/guestfish-actions.pod:2129 ../fish/guestfish-actions.pod:2160
8200 msgid "This command also clears the LVM cache and performs a volume group scan."
8204 #: ../src/guestfs-actions.pod:2727
8205 msgid "guestfs_lvm_remove_all"
8209 #: ../src/guestfs-actions.pod:2729
8212 " int guestfs_lvm_remove_all (guestfs_h *g);\n"
8217 #: ../src/guestfs-actions.pod:2731 ../fish/guestfish-actions.pod:2136
8219 "This command removes all LVM logical volumes, volume groups and physical "
8224 #: ../src/guestfs-actions.pod:2739
8225 msgid "guestfs_lvm_set_filter"
8229 #: ../src/guestfs-actions.pod:2741
8232 " int guestfs_lvm_set_filter (guestfs_h *g,\n"
8233 "\t\tchar *const *devices);\n"
8238 #: ../src/guestfs-actions.pod:2744 ../fish/guestfish-actions.pod:2146
8240 "This sets the LVM device filter so that LVM will only be able to \"see\" the "
8241 "block devices in the list C<devices>, and will ignore all other attached "
8246 #: ../src/guestfs-actions.pod:2748 ../fish/guestfish-actions.pod:2150
8248 "Where disk image(s) contain duplicate PVs or VGs, this command is useful to "
8249 "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also "
8250 "there are two types of duplication possible: either cloned PVs/VGs which "
8251 "have identical UUIDs; or VGs that are not cloned but just happen to have the "
8252 "same name. In normal operation you cannot create this situation, but you "
8253 "can do it outside LVM, eg. by cloning disk images or by bit twiddling "
8254 "inside the LVM metadata."
8258 #: ../src/guestfs-actions.pod:2761 ../fish/guestfish-actions.pod:2163
8259 msgid "You can filter whole block devices or individual partitions."
8263 #: ../src/guestfs-actions.pod:2763 ../fish/guestfish-actions.pod:2165
8265 "You cannot use this if any VG is currently in use (eg. contains a mounted "
8266 "filesystem), even if you are not filtering out that VG."
8270 #: ../src/guestfs-actions.pod:2769
8271 msgid "guestfs_lvremove"
8275 #: ../src/guestfs-actions.pod:2771
8278 " int guestfs_lvremove (guestfs_h *g,\n"
8279 "\t\tconst char *device);\n"
8284 #: ../src/guestfs-actions.pod:2774 ../fish/guestfish-actions.pod:2173
8286 "Remove an LVM logical volume C<device>, where C<device> is the path to the "
8287 "LV, such as C</dev/VG/LV>."
8291 #: ../src/guestfs-actions.pod:2777 ../fish/guestfish-actions.pod:2176
8293 "You can also remove all LVs in a volume group by specifying the VG name, "
8298 #: ../src/guestfs-actions.pod:2782
8299 msgid "guestfs_lvrename"
8303 #: ../src/guestfs-actions.pod:2784
8306 " int guestfs_lvrename (guestfs_h *g,\n"
8307 "\t\tconst char *logvol,\n"
8308 "\t\tconst char *newlogvol);\n"
8313 #: ../src/guestfs-actions.pod:2788 ../fish/guestfish-actions.pod:2183
8314 msgid "Rename a logical volume C<logvol> with the new name C<newlogvol>."
8318 #: ../src/guestfs-actions.pod:2792
8319 msgid "guestfs_lvresize"
8323 #: ../src/guestfs-actions.pod:2794
8326 " int guestfs_lvresize (guestfs_h *g,\n"
8327 "\t\tconst char *device,\n"
8328 "\t\tint mbytes);\n"
8333 #: ../src/guestfs-actions.pod:2798 ../fish/guestfish-actions.pod:2189
8335 "This resizes (expands or shrinks) an existing LVM logical volume to "
8336 "C<mbytes>. When reducing, data in the reduced part is lost."
8340 #: ../src/guestfs-actions.pod:2804
8341 msgid "guestfs_lvresize_free"
8345 #: ../src/guestfs-actions.pod:2806
8348 " int guestfs_lvresize_free (guestfs_h *g,\n"
8349 "\t\tconst char *lv,\n"
8350 "\t\tint percent);\n"
8355 #: ../src/guestfs-actions.pod:2810 ../fish/guestfish-actions.pod:2197
8357 "This expands an existing logical volume C<lv> so that it fills C<pc>% of the "
8358 "remaining free space in the volume group. Commonly you would call this with "
8359 "pc = 100 which expands the logical volume as much as possible, using all "
8360 "remaining free space in the volume group."
8364 #: ../src/guestfs-actions.pod:2818
8369 #: ../src/guestfs-actions.pod:2820
8372 " char **guestfs_lvs (guestfs_h *g);\n"
8377 #: ../src/guestfs-actions.pod:2822 ../fish/guestfish-actions.pod:2207
8379 "List all the logical volumes detected. This is the equivalent of the "
8380 "L<lvs(8)> command."
8384 #: ../src/guestfs-actions.pod:2825 ../fish/guestfish-actions.pod:2210
8386 "This returns a list of the logical volume device names "
8387 "(eg. C</dev/VolGroup00/LogVol00>)."
8391 #: ../src/guestfs-actions.pod:2828
8392 msgid "See also C<guestfs_lvs_full>."
8396 #: ../src/guestfs-actions.pod:2834
8397 msgid "guestfs_lvs_full"
8401 #: ../src/guestfs-actions.pod:2836
8404 " struct guestfs_lvm_lv_list *guestfs_lvs_full (guestfs_h *g);\n"
8409 #: ../src/guestfs-actions.pod:2838 ../fish/guestfish-actions.pod:2219
8411 "List all the logical volumes detected. This is the equivalent of the "
8412 "L<lvs(8)> command. The \"full\" version includes all fields."
8416 #: ../src/guestfs-actions.pod:2841
8418 "This function returns a C<struct guestfs_lvm_lv_list *> (see "
8419 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
8420 "must call C<guestfs_free_lvm_lv_list> after use>."
8424 #: ../src/guestfs-actions.pod:2846
8425 msgid "guestfs_lvuuid"
8429 #: ../src/guestfs-actions.pod:2848
8432 " char *guestfs_lvuuid (guestfs_h *g,\n"
8433 "\t\tconst char *device);\n"
8438 #: ../src/guestfs-actions.pod:2851 ../fish/guestfish-actions.pod:2226
8439 msgid "This command returns the UUID of the LVM LV C<device>."
8443 #: ../src/guestfs-actions.pod:2856
8444 msgid "guestfs_lxattrlist"
8448 #: ../src/guestfs-actions.pod:2858
8451 " struct guestfs_xattr_list *guestfs_lxattrlist (guestfs_h *g,\n"
8452 "\t\tconst char *path,\n"
8453 "\t\tchar *const *names);\n"
8458 #: ../src/guestfs-actions.pod:2862 ../fish/guestfish-actions.pod:2232
8460 "This call allows you to get the extended attributes of multiple files, where "
8461 "all files are in the directory C<path>. C<names> is the list of files from "
8466 #: ../src/guestfs-actions.pod:2866 ../fish/guestfish-actions.pod:2236
8468 "On return you get a flat list of xattr structs which must be interpreted "
8469 "sequentially. The first xattr struct always has a zero-length C<attrname>. "
8470 "C<attrval> in this struct is zero-length to indicate there was an error "
8471 "doing C<lgetxattr> for this file, I<or> is a C string which is a decimal "
8472 "number (the number of following attributes for this file, which could be "
8473 "C<\"0\">). Then after the first xattr struct are the zero or more "
8474 "attributes for the first named file. This repeats for the second and "
8479 #: ../src/guestfs-actions.pod:2876
8481 "This call is intended for programs that want to efficiently list a directory "
8482 "contents without making many round-trips. See also C<guestfs_lstatlist> for "
8483 "a similarly efficient call for getting standard stats. Very long directory "
8484 "listings might cause the protocol message size to be exceeded, causing this "
8485 "call to fail. The caller must split up such requests into smaller groups of "
8490 #: ../src/guestfs-actions.pod:2889
8491 msgid "guestfs_mkdir"
8495 #: ../src/guestfs-actions.pod:2891
8498 " int guestfs_mkdir (guestfs_h *g,\n"
8499 "\t\tconst char *path);\n"
8504 #: ../src/guestfs-actions.pod:2894 ../fish/guestfish-actions.pod:2258
8505 msgid "Create a directory named C<path>."
8509 #: ../src/guestfs-actions.pod:2898
8510 msgid "guestfs_mkdir_mode"
8514 #: ../src/guestfs-actions.pod:2900
8517 " int guestfs_mkdir_mode (guestfs_h *g,\n"
8518 "\t\tconst char *path,\n"
8524 #: ../src/guestfs-actions.pod:2904 ../fish/guestfish-actions.pod:2264
8526 "This command creates a directory, setting the initial permissions of the "
8527 "directory to C<mode>."
8531 #: ../src/guestfs-actions.pod:2907 ../fish/guestfish-actions.pod:2267
8533 "For common Linux filesystems, the actual mode which is set will be C<mode & "
8534 "~umask & 01777>. Non-native-Linux filesystems may interpret the mode in "
8539 #: ../src/guestfs-actions.pod:2911
8540 msgid "See also C<guestfs_mkdir>, C<guestfs_umask>"
8544 #: ../src/guestfs-actions.pod:2915
8545 msgid "guestfs_mkdir_p"
8549 #: ../src/guestfs-actions.pod:2917
8552 " int guestfs_mkdir_p (guestfs_h *g,\n"
8553 "\t\tconst char *path);\n"
8558 #: ../src/guestfs-actions.pod:2920 ../fish/guestfish-actions.pod:2277
8560 "Create a directory named C<path>, creating any parent directories as "
8561 "necessary. This is like the C<mkdir -p> shell command."
8565 #: ../src/guestfs-actions.pod:2925
8566 msgid "guestfs_mkdtemp"
8570 #: ../src/guestfs-actions.pod:2927
8573 " char *guestfs_mkdtemp (guestfs_h *g,\n"
8574 "\t\tconst char *template);\n"
8579 #: ../src/guestfs-actions.pod:2930 ../fish/guestfish-actions.pod:2284
8581 "This command creates a temporary directory. The C<template> parameter "
8582 "should be a full pathname for the temporary directory name with the final "
8583 "six characters being \"XXXXXX\"."
8587 #: ../src/guestfs-actions.pod:2935 ../fish/guestfish-actions.pod:2289
8589 "For example: \"/tmp/myprogXXXXXX\" or \"/Temp/myprogXXXXXX\", the second one "
8590 "being suitable for Windows filesystems."
8594 #: ../src/guestfs-actions.pod:2938 ../fish/guestfish-actions.pod:2292
8595 msgid "The name of the temporary directory that was created is returned."
8599 #: ../src/guestfs-actions.pod:2941 ../fish/guestfish-actions.pod:2295
8600 msgid "The temporary directory is created with mode 0700 and is owned by root."
8604 #: ../src/guestfs-actions.pod:2944 ../fish/guestfish-actions.pod:2298
8606 "The caller is responsible for deleting the temporary directory and its "
8607 "contents after use."
8611 #: ../src/guestfs-actions.pod:2947 ../fish/guestfish-actions.pod:2301
8612 msgid "See also: L<mkdtemp(3)>"
8616 #: ../src/guestfs-actions.pod:2952
8617 msgid "guestfs_mke2fs_J"
8621 #: ../src/guestfs-actions.pod:2954
8624 " int guestfs_mke2fs_J (guestfs_h *g,\n"
8625 "\t\tconst char *fstype,\n"
8626 "\t\tint blocksize,\n"
8627 "\t\tconst char *device,\n"
8628 "\t\tconst char *journal);\n"
8633 #: ../src/guestfs-actions.pod:2960 ../fish/guestfish-actions.pod:2307
8635 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
8636 "C<journal>. It is equivalent to the command:"
8640 #: ../src/guestfs-actions.pod:2964 ../fish/guestfish-actions.pod:2311
8643 " mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
8648 #: ../src/guestfs-actions.pod:2966
8649 msgid "See also C<guestfs_mke2journal>."
8653 #: ../src/guestfs-actions.pod:2970
8654 msgid "guestfs_mke2fs_JL"
8658 #: ../src/guestfs-actions.pod:2972
8661 " int guestfs_mke2fs_JL (guestfs_h *g,\n"
8662 "\t\tconst char *fstype,\n"
8663 "\t\tint blocksize,\n"
8664 "\t\tconst char *device,\n"
8665 "\t\tconst char *label);\n"
8670 #: ../src/guestfs-actions.pod:2978 ../fish/guestfish-actions.pod:2319
8672 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
8673 "the journal labeled C<label>."
8677 #: ../src/guestfs-actions.pod:2981
8678 msgid "See also C<guestfs_mke2journal_L>."
8682 #: ../src/guestfs-actions.pod:2985
8683 msgid "guestfs_mke2fs_JU"
8687 #: ../src/guestfs-actions.pod:2987
8690 " int guestfs_mke2fs_JU (guestfs_h *g,\n"
8691 "\t\tconst char *fstype,\n"
8692 "\t\tint blocksize,\n"
8693 "\t\tconst char *device,\n"
8694 "\t\tconst char *uuid);\n"
8699 #: ../src/guestfs-actions.pod:2993 ../fish/guestfish-actions.pod:2328
8701 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
8702 "the journal with UUID C<uuid>."
8706 #: ../src/guestfs-actions.pod:2996
8707 msgid "See also C<guestfs_mke2journal_U>."
8711 #: ../src/guestfs-actions.pod:3000
8712 msgid "guestfs_mke2journal"
8716 #: ../src/guestfs-actions.pod:3002
8719 " int guestfs_mke2journal (guestfs_h *g,\n"
8720 "\t\tint blocksize,\n"
8721 "\t\tconst char *device);\n"
8726 #: ../src/guestfs-actions.pod:3006 ../fish/guestfish-actions.pod:2337
8728 "This creates an ext2 external journal on C<device>. It is equivalent to the "
8733 #: ../src/guestfs-actions.pod:3009 ../fish/guestfish-actions.pod:2340
8736 " mke2fs -O journal_dev -b blocksize device\n"
8741 #: ../src/guestfs-actions.pod:3013
8742 msgid "guestfs_mke2journal_L"
8746 #: ../src/guestfs-actions.pod:3015
8749 " int guestfs_mke2journal_L (guestfs_h *g,\n"
8750 "\t\tint blocksize,\n"
8751 "\t\tconst char *label,\n"
8752 "\t\tconst char *device);\n"
8757 #: ../src/guestfs-actions.pod:3020 ../fish/guestfish-actions.pod:2346
8758 msgid "This creates an ext2 external journal on C<device> with label C<label>."
8762 #: ../src/guestfs-actions.pod:3024
8763 msgid "guestfs_mke2journal_U"
8767 #: ../src/guestfs-actions.pod:3026
8770 " int guestfs_mke2journal_U (guestfs_h *g,\n"
8771 "\t\tint blocksize,\n"
8772 "\t\tconst char *uuid,\n"
8773 "\t\tconst char *device);\n"
8778 #: ../src/guestfs-actions.pod:3031 ../fish/guestfish-actions.pod:2352
8779 msgid "This creates an ext2 external journal on C<device> with UUID C<uuid>."
8783 #: ../src/guestfs-actions.pod:3035
8784 msgid "guestfs_mkfifo"
8788 #: ../src/guestfs-actions.pod:3037
8791 " int guestfs_mkfifo (guestfs_h *g,\n"
8793 "\t\tconst char *path);\n"
8798 #: ../src/guestfs-actions.pod:3041
8800 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
8801 "is just a convenient wrapper around C<guestfs_mknod>."
8805 #: ../src/guestfs-actions.pod:3049
8806 msgid "guestfs_mkfs"
8810 #: ../src/guestfs-actions.pod:3051
8813 " int guestfs_mkfs (guestfs_h *g,\n"
8814 "\t\tconst char *fstype,\n"
8815 "\t\tconst char *device);\n"
8820 #: ../src/guestfs-actions.pod:3055 ../fish/guestfish-actions.pod:2368
8822 "This creates a filesystem on C<device> (usually a partition or LVM logical "
8823 "volume). The filesystem type is C<fstype>, for example C<ext3>."
8827 #: ../src/guestfs-actions.pod:3061
8828 msgid "guestfs_mkfs_b"
8832 #: ../src/guestfs-actions.pod:3063
8835 " int guestfs_mkfs_b (guestfs_h *g,\n"
8836 "\t\tconst char *fstype,\n"
8837 "\t\tint blocksize,\n"
8838 "\t\tconst char *device);\n"
8843 #: ../src/guestfs-actions.pod:3068
8845 "This call is similar to C<guestfs_mkfs>, but it allows you to control the "
8846 "block size of the resulting filesystem. Supported block sizes depend on the "
8847 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
8851 #: ../src/guestfs-actions.pod:3073 ../fish/guestfish-actions.pod:2381
8853 "For VFAT and NTFS the C<blocksize> parameter is treated as the requested "
8858 #: ../src/guestfs-actions.pod:3078
8859 msgid "guestfs_mkmountpoint"
8863 #: ../src/guestfs-actions.pod:3080
8866 " int guestfs_mkmountpoint (guestfs_h *g,\n"
8867 "\t\tconst char *exemptpath);\n"
8872 #: ../src/guestfs-actions.pod:3083
8874 "C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are specialized calls "
8875 "that can be used to create extra mountpoints before mounting the first "
8880 #: ../src/guestfs-actions.pod:3087 ../fish/guestfish-actions.pod:2392
8882 "These calls are I<only> necessary in some very limited circumstances, mainly "
8883 "the case where you want to mount a mix of unrelated and/or read-only "
8884 "filesystems together."
8888 #: ../src/guestfs-actions.pod:3091 ../fish/guestfish-actions.pod:2396
8890 "For example, live CDs often contain a \"Russian doll\" nest of filesystems, "
8891 "an ISO outer layer, with a squashfs image inside, with an ext2/3 image "
8892 "inside that. You can unpack this as follows in guestfish:"
8896 #: ../src/guestfs-actions.pod:3096 ../fish/guestfish-actions.pod:2401
8899 " add-ro Fedora-11-i686-Live.iso\n"
8901 " mkmountpoint /cd\n"
8902 " mkmountpoint /squash\n"
8903 " mkmountpoint /ext3\n"
8904 " mount /dev/sda /cd\n"
8905 " mount-loop /cd/LiveOS/squashfs.img /squash\n"
8906 " mount-loop /squash/LiveOS/ext3fs.img /ext3\n"
8911 #: ../src/guestfs-actions.pod:3105 ../fish/guestfish-actions.pod:2410
8912 msgid "The inner filesystem is now unpacked under the /ext3 mountpoint."
8916 #: ../src/guestfs-actions.pod:3109
8917 msgid "guestfs_mknod"
8921 #: ../src/guestfs-actions.pod:3111
8924 " int guestfs_mknod (guestfs_h *g,\n"
8926 "\t\tint devmajor,\n"
8927 "\t\tint devminor,\n"
8928 "\t\tconst char *path);\n"
8933 #: ../src/guestfs-actions.pod:3117 ../fish/guestfish-actions.pod:2416
8935 "This call creates block or character special devices, or named pipes "
8940 #: ../src/guestfs-actions.pod:3120 ../fish/guestfish-actions.pod:2419
8942 "The C<mode> parameter should be the mode, using the standard constants. "
8943 "C<devmajor> and C<devminor> are the device major and minor numbers, only "
8944 "used when creating block and character special devices."
8948 #: ../src/guestfs-actions.pod:3125
8950 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
8951 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
8952 "regular file). These constants are available in the standard Linux header "
8953 "files, or you can use C<guestfs_mknod_b>, C<guestfs_mknod_c> or "
8954 "C<guestfs_mkfifo> which are wrappers around this command which bitwise OR in "
8955 "the appropriate constant for you."
8959 #: ../src/guestfs-actions.pod:3137
8960 msgid "guestfs_mknod_b"
8964 #: ../src/guestfs-actions.pod:3139
8967 " int guestfs_mknod_b (guestfs_h *g,\n"
8969 "\t\tint devmajor,\n"
8970 "\t\tint devminor,\n"
8971 "\t\tconst char *path);\n"
8976 #: ../src/guestfs-actions.pod:3145
8978 "This call creates a block device node called C<path> with mode C<mode> and "
8979 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
8980 "wrapper around C<guestfs_mknod>."
8984 #: ../src/guestfs-actions.pod:3153
8985 msgid "guestfs_mknod_c"
8989 #: ../src/guestfs-actions.pod:3155
8992 " int guestfs_mknod_c (guestfs_h *g,\n"
8994 "\t\tint devmajor,\n"
8995 "\t\tint devminor,\n"
8996 "\t\tconst char *path);\n"
9001 #: ../src/guestfs-actions.pod:3161
9003 "This call creates a char device node called C<path> with mode C<mode> and "
9004 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
9005 "wrapper around C<guestfs_mknod>."
9009 #: ../src/guestfs-actions.pod:3169
9010 msgid "guestfs_mkswap"
9014 #: ../src/guestfs-actions.pod:3171
9017 " int guestfs_mkswap (guestfs_h *g,\n"
9018 "\t\tconst char *device);\n"
9023 #: ../src/guestfs-actions.pod:3174 ../fish/guestfish-actions.pod:2458
9024 msgid "Create a swap partition on C<device>."
9028 #: ../src/guestfs-actions.pod:3178
9029 msgid "guestfs_mkswap_L"
9033 #: ../src/guestfs-actions.pod:3180
9036 " int guestfs_mkswap_L (guestfs_h *g,\n"
9037 "\t\tconst char *label,\n"
9038 "\t\tconst char *device);\n"
9043 #: ../src/guestfs-actions.pod:3184 ../fish/guestfish-actions.pod:2464
9044 msgid "Create a swap partition on C<device> with label C<label>."
9048 #: ../src/guestfs-actions.pod:3186 ../fish/guestfish-actions.pod:2466
9050 "Note that you cannot attach a swap label to a block device "
9051 "(eg. C</dev/sda>), just to a partition. This appears to be a limitation of "
9052 "the kernel or swap tools."
9056 #: ../src/guestfs-actions.pod:3192
9057 msgid "guestfs_mkswap_U"
9061 #: ../src/guestfs-actions.pod:3194
9064 " int guestfs_mkswap_U (guestfs_h *g,\n"
9065 "\t\tconst char *uuid,\n"
9066 "\t\tconst char *device);\n"
9071 #: ../src/guestfs-actions.pod:3198 ../fish/guestfish-actions.pod:2474
9072 msgid "Create a swap partition on C<device> with UUID C<uuid>."
9076 #: ../src/guestfs-actions.pod:3202
9077 msgid "guestfs_mkswap_file"
9081 #: ../src/guestfs-actions.pod:3204
9084 " int guestfs_mkswap_file (guestfs_h *g,\n"
9085 "\t\tconst char *path);\n"
9090 #: ../src/guestfs-actions.pod:3207 ../fish/guestfish-actions.pod:2480
9091 msgid "Create a swap file."
9095 #: ../src/guestfs-actions.pod:3209
9097 "This command just writes a swap file signature to an existing file. To "
9098 "create the file itself, use something like C<guestfs_fallocate>."
9102 #: ../src/guestfs-actions.pod:3214
9103 msgid "guestfs_modprobe"
9107 #: ../src/guestfs-actions.pod:3216
9110 " int guestfs_modprobe (guestfs_h *g,\n"
9111 "\t\tconst char *modulename);\n"
9116 #: ../src/guestfs-actions.pod:3219 ../fish/guestfish-actions.pod:2489
9117 msgid "This loads a kernel module in the appliance."
9121 #: ../src/guestfs-actions.pod:3221 ../fish/guestfish-actions.pod:2491
9123 "The kernel module must have been whitelisted when libguestfs was built (see "
9124 "C<appliance/kmod.whitelist.in> in the source)."
9128 #: ../src/guestfs-actions.pod:3226
9129 msgid "guestfs_mount"
9133 #: ../src/guestfs-actions.pod:3228
9136 " int guestfs_mount (guestfs_h *g,\n"
9137 "\t\tconst char *device,\n"
9138 "\t\tconst char *mountpoint);\n"
9143 #: ../src/guestfs-actions.pod:3232 ../fish/guestfish-actions.pod:2498
9145 "Mount a guest disk at a position in the filesystem. Block devices are named "
9146 "C</dev/sda>, C</dev/sdb> and so on, as they were added to the guest. If "
9147 "those block devices contain partitions, they will have the usual names "
9148 "(eg. C</dev/sda1>). Also LVM C</dev/VG/LV>-style names can be used."
9152 #: ../src/guestfs-actions.pod:3238 ../fish/guestfish-actions.pod:2504
9154 "The rules are the same as for L<mount(2)>: A filesystem must first be "
9155 "mounted on C</> before others can be mounted. Other filesystems can only be "
9156 "mounted on directories which already exist."
9160 #: ../src/guestfs-actions.pod:3243 ../fish/guestfish-actions.pod:2509
9162 "The mounted filesystem is writable, if we have sufficient permissions on the "
9163 "underlying device."
9167 #: ../src/guestfs-actions.pod:3246
9169 "B<Important note:> When you use this call, the filesystem options C<sync> "
9170 "and C<noatime> are set implicitly. This was originally done because we "
9171 "thought it would improve reliability, but it turns out that I<-o sync> has a "
9172 "very large negative performance impact and negligible effect on "
9173 "reliability. Therefore we recommend that you avoid using C<guestfs_mount> "
9174 "in any code that needs performance, and instead use C<guestfs_mount_options> "
9175 "(use an empty string for the first parameter if you don't want any options)."
9179 #: ../src/guestfs-actions.pod:3258
9180 msgid "guestfs_mount_loop"
9184 #: ../src/guestfs-actions.pod:3260
9187 " int guestfs_mount_loop (guestfs_h *g,\n"
9188 "\t\tconst char *file,\n"
9189 "\t\tconst char *mountpoint);\n"
9194 #: ../src/guestfs-actions.pod:3264 ../fish/guestfish-actions.pod:2526
9196 "This command lets you mount C<file> (a filesystem image in a file) on a "
9197 "mount point. It is entirely equivalent to the command C<mount -o loop file "
9202 #: ../src/guestfs-actions.pod:3270
9203 msgid "guestfs_mount_options"
9207 #: ../src/guestfs-actions.pod:3272
9210 " int guestfs_mount_options (guestfs_h *g,\n"
9211 "\t\tconst char *options,\n"
9212 "\t\tconst char *device,\n"
9213 "\t\tconst char *mountpoint);\n"
9218 #: ../src/guestfs-actions.pod:3277
9220 "This is the same as the C<guestfs_mount> command, but it allows you to set "
9221 "the mount options as for the L<mount(8)> I<-o> flag."
9225 #: ../src/guestfs-actions.pod:3281 ../fish/guestfish-actions.pod:2538
9227 "If the C<options> parameter is an empty string, then no options are passed "
9228 "(all options default to whatever the filesystem uses)."
9232 #: ../src/guestfs-actions.pod:3287
9233 msgid "guestfs_mount_ro"
9237 #: ../src/guestfs-actions.pod:3289
9240 " int guestfs_mount_ro (guestfs_h *g,\n"
9241 "\t\tconst char *device,\n"
9242 "\t\tconst char *mountpoint);\n"
9247 #: ../src/guestfs-actions.pod:3293
9249 "This is the same as the C<guestfs_mount> command, but it mounts the "
9250 "filesystem with the read-only (I<-o ro>) flag."
9254 #: ../src/guestfs-actions.pod:3298
9255 msgid "guestfs_mount_vfs"
9259 #: ../src/guestfs-actions.pod:3300
9262 " int guestfs_mount_vfs (guestfs_h *g,\n"
9263 "\t\tconst char *options,\n"
9264 "\t\tconst char *vfstype,\n"
9265 "\t\tconst char *device,\n"
9266 "\t\tconst char *mountpoint);\n"
9271 #: ../src/guestfs-actions.pod:3306
9273 "This is the same as the C<guestfs_mount> command, but it allows you to set "
9274 "both the mount options and the vfstype as for the L<mount(8)> I<-o> and "
9279 #: ../src/guestfs-actions.pod:3312
9280 msgid "guestfs_mountpoints"
9284 #: ../src/guestfs-actions.pod:3314
9287 " char **guestfs_mountpoints (guestfs_h *g);\n"
9292 #: ../src/guestfs-actions.pod:3316
9294 "This call is similar to C<guestfs_mounts>. That call returns a list of "
9295 "devices. This one returns a hash table (map) of device name to directory "
9296 "where the device is mounted."
9300 #: ../src/guestfs-actions.pod:3326
9301 msgid "guestfs_mounts"
9305 #: ../src/guestfs-actions.pod:3328
9308 " char **guestfs_mounts (guestfs_h *g);\n"
9313 #: ../src/guestfs-actions.pod:3330 ../fish/guestfish-actions.pod:2569
9315 "This returns the list of currently mounted filesystems. It returns the list "
9316 "of devices (eg. C</dev/sda1>, C</dev/VG/LV>)."
9320 #: ../src/guestfs-actions.pod:3333 ../fish/guestfish-actions.pod:2572
9321 msgid "Some internal mounts are not shown."
9325 #: ../src/guestfs-actions.pod:3335
9326 msgid "See also: C<guestfs_mountpoints>"
9330 #: ../src/guestfs-actions.pod:3341
9335 #: ../src/guestfs-actions.pod:3343
9338 " int guestfs_mv (guestfs_h *g,\n"
9339 "\t\tconst char *src,\n"
9340 "\t\tconst char *dest);\n"
9345 #: ../src/guestfs-actions.pod:3347 ../fish/guestfish-actions.pod:2580
9347 "This moves a file from C<src> to C<dest> where C<dest> is either a "
9348 "destination filename or destination directory."
9352 #: ../src/guestfs-actions.pod:3352
9353 msgid "guestfs_ntfs_3g_probe"
9357 #: ../src/guestfs-actions.pod:3354
9360 " int guestfs_ntfs_3g_probe (guestfs_h *g,\n"
9362 "\t\tconst char *device);\n"
9367 #: ../src/guestfs-actions.pod:3358 ../fish/guestfish-actions.pod:2587
9369 "This command runs the L<ntfs-3g.probe(8)> command which probes an NTFS "
9370 "C<device> for mountability. (Not all NTFS volumes can be mounted "
9371 "read-write, and some cannot be mounted at all)."
9375 #: ../src/guestfs-actions.pod:3362 ../fish/guestfish-actions.pod:2591
9377 "C<rw> is a boolean flag. Set it to true if you want to test if the volume "
9378 "can be mounted read-write. Set it to false if you want to test if the "
9379 "volume can be mounted read-only."
9383 #: ../src/guestfs-actions.pod:3366 ../fish/guestfish-actions.pod:2595
9385 "The return value is an integer which C<0> if the operation would succeed, or "
9386 "some non-zero value documented in the L<ntfs-3g.probe(8)> manual page."
9390 #: ../src/guestfs-actions.pod:3372
9391 msgid "guestfs_ntfsresize"
9395 #: ../src/guestfs-actions.pod:3374
9398 " int guestfs_ntfsresize (guestfs_h *g,\n"
9399 "\t\tconst char *device);\n"
9404 #: ../src/guestfs-actions.pod:3377 ../fish/guestfish-actions.pod:2603
9406 "This command resizes an NTFS filesystem, expanding or shrinking it to the "
9407 "size of the underlying device. See also L<ntfsresize(8)>."
9411 #: ../src/guestfs-actions.pod:3383
9412 msgid "guestfs_ntfsresize_size"
9416 #: ../src/guestfs-actions.pod:3385
9419 " int guestfs_ntfsresize_size (guestfs_h *g,\n"
9420 "\t\tconst char *device,\n"
9421 "\t\tint64_t size);\n"
9426 #: ../src/guestfs-actions.pod:3389
9428 "This command is the same as C<guestfs_ntfsresize> except that it allows you "
9429 "to specify the new size (in bytes) explicitly."
9433 #: ../src/guestfs-actions.pod:3394
9434 msgid "guestfs_part_add"
9438 #: ../src/guestfs-actions.pod:3396
9441 " int guestfs_part_add (guestfs_h *g,\n"
9442 "\t\tconst char *device,\n"
9443 "\t\tconst char *prlogex,\n"
9444 "\t\tint64_t startsect,\n"
9445 "\t\tint64_t endsect);\n"
9450 #: ../src/guestfs-actions.pod:3402
9452 "This command adds a partition to C<device>. If there is no partition table "
9453 "on the device, call C<guestfs_part_init> first."
9457 #: ../src/guestfs-actions.pod:3405 ../fish/guestfish-actions.pod:2621
9459 "The C<prlogex> parameter is the type of partition. Normally you should pass "
9460 "C<p> or C<primary> here, but MBR partition tables also support C<l> (or "
9461 "C<logical>) and C<e> (or C<extended>) partition types."
9465 #: ../src/guestfs-actions.pod:3410 ../fish/guestfish-actions.pod:2626
9467 "C<startsect> and C<endsect> are the start and end of the partition in "
9468 "I<sectors>. C<endsect> may be negative, which means it counts backwards "
9469 "from the end of the disk (C<-1> is the last sector)."
9473 #: ../src/guestfs-actions.pod:3414
9475 "Creating a partition which covers the whole disk is not so easy. Use "
9476 "C<guestfs_part_disk> to do that."
9480 #: ../src/guestfs-actions.pod:3419
9481 msgid "guestfs_part_del"
9485 #: ../src/guestfs-actions.pod:3421
9488 " int guestfs_part_del (guestfs_h *g,\n"
9489 "\t\tconst char *device,\n"
9490 "\t\tint partnum);\n"
9495 #: ../src/guestfs-actions.pod:3425 ../fish/guestfish-actions.pod:2637
9496 msgid "This command deletes the partition numbered C<partnum> on C<device>."
9500 #: ../src/guestfs-actions.pod:3427 ../fish/guestfish-actions.pod:2639
9502 "Note that in the case of MBR partitioning, deleting an extended partition "
9503 "also deletes any logical partitions it contains."
9507 #: ../src/guestfs-actions.pod:3433
9508 msgid "guestfs_part_disk"
9512 #: ../src/guestfs-actions.pod:3435
9515 " int guestfs_part_disk (guestfs_h *g,\n"
9516 "\t\tconst char *device,\n"
9517 "\t\tconst char *parttype);\n"
9522 #: ../src/guestfs-actions.pod:3439
9524 "This command is simply a combination of C<guestfs_part_init> followed by "
9525 "C<guestfs_part_add> to create a single primary partition covering the whole "
9530 #: ../src/guestfs-actions.pod:3443
9532 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
9533 "possible values are described in C<guestfs_part_init>."
9537 #: ../src/guestfs-actions.pod:3451
9538 msgid "guestfs_part_get_bootable"
9542 #: ../src/guestfs-actions.pod:3453
9545 " int guestfs_part_get_bootable (guestfs_h *g,\n"
9546 "\t\tconst char *device,\n"
9547 "\t\tint partnum);\n"
9552 #: ../src/guestfs-actions.pod:3457 ../fish/guestfish-actions.pod:2661
9554 "This command returns true if the partition C<partnum> on C<device> has the "
9555 "bootable flag set."
9559 #: ../src/guestfs-actions.pod:3460
9560 msgid "See also C<guestfs_part_set_bootable>."
9564 #: ../src/guestfs-actions.pod:3464
9565 msgid "guestfs_part_get_mbr_id"
9569 #: ../src/guestfs-actions.pod:3466
9572 " int guestfs_part_get_mbr_id (guestfs_h *g,\n"
9573 "\t\tconst char *device,\n"
9574 "\t\tint partnum);\n"
9579 #: ../src/guestfs-actions.pod:3470 ../fish/guestfish-actions.pod:2670
9581 "Returns the MBR type byte (also known as the ID byte) from the numbered "
9582 "partition C<partnum>."
9586 #: ../src/guestfs-actions.pod:3473 ../src/guestfs-actions.pod:3635
9588 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
9589 "undefined results for other partition table types (see "
9590 "C<guestfs_part_get_parttype>)."
9594 #: ../src/guestfs-actions.pod:3479
9595 msgid "guestfs_part_get_parttype"
9599 #: ../src/guestfs-actions.pod:3481
9602 " char *guestfs_part_get_parttype (guestfs_h *g,\n"
9603 "\t\tconst char *device);\n"
9608 #: ../src/guestfs-actions.pod:3484 ../fish/guestfish-actions.pod:2681
9610 "This command examines the partition table on C<device> and returns the "
9611 "partition table type (format) being used."
9615 #: ../src/guestfs-actions.pod:3487
9617 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
9618 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
9619 "possible, although unusual. See C<guestfs_part_init> for a full list."
9623 #: ../src/guestfs-actions.pod:3495
9624 msgid "guestfs_part_init"
9628 #: ../src/guestfs-actions.pod:3497
9631 " int guestfs_part_init (guestfs_h *g,\n"
9632 "\t\tconst char *device,\n"
9633 "\t\tconst char *parttype);\n"
9638 #: ../src/guestfs-actions.pod:3501 ../fish/guestfish-actions.pod:2693
9640 "This creates an empty partition table on C<device> of one of the partition "
9641 "types listed below. Usually C<parttype> should be either C<msdos> or C<gpt> "
9642 "(for large disks)."
9646 #: ../src/guestfs-actions.pod:3505
9648 "Initially there are no partitions. Following this, you should call "
9649 "C<guestfs_part_add> for each partition required."
9653 #: ../src/guestfs-actions.pod:3508 ../fish/guestfish-actions.pod:2700
9654 msgid "Possible values for C<parttype> are:"
9658 #: ../src/guestfs-actions.pod:3512 ../fish/guestfish-actions.pod:2704
9659 msgid "B<efi> | B<gpt>"
9663 #: ../src/guestfs-actions.pod:3514 ../fish/guestfish-actions.pod:2706
9664 msgid "Intel EFI / GPT partition table."
9668 #: ../src/guestfs-actions.pod:3516 ../fish/guestfish-actions.pod:2708
9670 "This is recommended for >= 2 TB partitions that will be accessed from Linux "
9671 "and Intel-based Mac OS X. It also has limited backwards compatibility with "
9672 "the C<mbr> format."
9676 #: ../src/guestfs-actions.pod:3520 ../fish/guestfish-actions.pod:2712
9677 msgid "B<mbr> | B<msdos>"
9681 #: ../src/guestfs-actions.pod:3522 ../fish/guestfish-actions.pod:2714
9683 "The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and "
9684 "Windows. This partition type will B<only> work for device sizes up to 2 "
9685 "TB. For large disks we recommend using C<gpt>."
9689 #: ../src/guestfs-actions.pod:3529 ../fish/guestfish-actions.pod:2721
9690 msgid "Other partition table types that may work but are not supported include:"
9694 #: ../src/guestfs-actions.pod:3534 ../fish/guestfish-actions.pod:2726
9699 #: ../src/guestfs-actions.pod:3536 ../fish/guestfish-actions.pod:2728
9700 msgid "AIX disk labels."
9704 #: ../src/guestfs-actions.pod:3538 ../fish/guestfish-actions.pod:2730
9705 msgid "B<amiga> | B<rdb>"
9709 #: ../src/guestfs-actions.pod:3540 ../fish/guestfish-actions.pod:2732
9710 msgid "Amiga \"Rigid Disk Block\" format."
9714 #: ../src/guestfs-actions.pod:3542 ../fish/guestfish-actions.pod:2734
9719 #: ../src/guestfs-actions.pod:3544 ../fish/guestfish-actions.pod:2736
9720 msgid "BSD disk labels."
9724 #: ../src/guestfs-actions.pod:3546 ../fish/guestfish-actions.pod:2738
9729 #: ../src/guestfs-actions.pod:3548 ../fish/guestfish-actions.pod:2740
9730 msgid "DASD, used on IBM mainframes."
9734 #: ../src/guestfs-actions.pod:3550 ../fish/guestfish-actions.pod:2742
9739 #: ../src/guestfs-actions.pod:3552 ../fish/guestfish-actions.pod:2744
9740 msgid "MIPS/SGI volumes."
9744 #: ../src/guestfs-actions.pod:3554 ../fish/guestfish-actions.pod:2746
9749 #: ../src/guestfs-actions.pod:3556 ../fish/guestfish-actions.pod:2748
9750 msgid "Old Mac partition format. Modern Macs use C<gpt>."
9754 #: ../src/guestfs-actions.pod:3558 ../fish/guestfish-actions.pod:2750
9759 #: ../src/guestfs-actions.pod:3560 ../fish/guestfish-actions.pod:2752
9760 msgid "NEC PC-98 format, common in Japan apparently."
9764 #: ../src/guestfs-actions.pod:3562 ../fish/guestfish-actions.pod:2754
9769 #: ../src/guestfs-actions.pod:3564 ../fish/guestfish-actions.pod:2756
9770 msgid "Sun disk labels."
9774 #: ../src/guestfs-actions.pod:3570
9775 msgid "guestfs_part_list"
9779 #: ../src/guestfs-actions.pod:3572
9782 " struct guestfs_partition_list *guestfs_part_list (guestfs_h *g,\n"
9783 "\t\tconst char *device);\n"
9788 #: ../src/guestfs-actions.pod:3575 ../fish/guestfish-actions.pod:2764
9790 "This command parses the partition table on C<device> and returns the list of "
9795 #: ../src/guestfs-actions.pod:3578 ../fish/guestfish-actions.pod:2767
9796 msgid "The fields in the returned structure are:"
9800 #: ../src/guestfs-actions.pod:3582 ../fish/guestfish-actions.pod:2771
9805 #: ../src/guestfs-actions.pod:3584 ../fish/guestfish-actions.pod:2773
9806 msgid "Partition number, counting from 1."
9810 #: ../src/guestfs-actions.pod:3586 ../fish/guestfish-actions.pod:2775
9811 msgid "B<part_start>"
9815 #: ../src/guestfs-actions.pod:3588
9817 "Start of the partition I<in bytes>. To get sectors you have to divide by "
9818 "the device's sector size, see C<guestfs_blockdev_getss>."
9822 #: ../src/guestfs-actions.pod:3591 ../fish/guestfish-actions.pod:2780
9827 #: ../src/guestfs-actions.pod:3593 ../fish/guestfish-actions.pod:2782
9828 msgid "End of the partition in bytes."
9832 #: ../src/guestfs-actions.pod:3595 ../fish/guestfish-actions.pod:2784
9833 msgid "B<part_size>"
9837 #: ../src/guestfs-actions.pod:3597 ../fish/guestfish-actions.pod:2786
9838 msgid "Size of the partition in bytes."
9842 #: ../src/guestfs-actions.pod:3601
9844 "This function returns a C<struct guestfs_partition_list *> (see "
9845 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
9846 "must call C<guestfs_free_partition_list> after use>."
9850 #: ../src/guestfs-actions.pod:3606
9851 msgid "guestfs_part_set_bootable"
9855 #: ../src/guestfs-actions.pod:3608
9858 " int guestfs_part_set_bootable (guestfs_h *g,\n"
9859 "\t\tconst char *device,\n"
9860 "\t\tint partnum,\n"
9861 "\t\tint bootable);\n"
9866 #: ../src/guestfs-actions.pod:3613 ../fish/guestfish-actions.pod:2794
9868 "This sets the bootable flag on partition numbered C<partnum> on device "
9869 "C<device>. Note that partitions are numbered from 1."
9873 #: ../src/guestfs-actions.pod:3616 ../fish/guestfish-actions.pod:2797
9875 "The bootable flag is used by some operating systems (notably Windows) to "
9876 "determine which partition to boot from. It is by no means universally "
9881 #: ../src/guestfs-actions.pod:3622
9882 msgid "guestfs_part_set_mbr_id"
9886 #: ../src/guestfs-actions.pod:3624
9889 " int guestfs_part_set_mbr_id (guestfs_h *g,\n"
9890 "\t\tconst char *device,\n"
9891 "\t\tint partnum,\n"
9892 "\t\tint idbyte);\n"
9897 #: ../src/guestfs-actions.pod:3629 ../fish/guestfish-actions.pod:2805
9899 "Sets the MBR type byte (also known as the ID byte) of the numbered partition "
9900 "C<partnum> to C<idbyte>. Note that the type bytes quoted in most "
9901 "documentation are in fact hexadecimal numbers, but usually documented "
9902 "without any leading \"0x\" which might be confusing."
9906 #: ../src/guestfs-actions.pod:3641
9907 msgid "guestfs_part_set_name"
9911 #: ../src/guestfs-actions.pod:3643
9914 " int guestfs_part_set_name (guestfs_h *g,\n"
9915 "\t\tconst char *device,\n"
9916 "\t\tint partnum,\n"
9917 "\t\tconst char *name);\n"
9922 #: ../src/guestfs-actions.pod:3648 ../fish/guestfish-actions.pod:2819
9924 "This sets the partition name on partition numbered C<partnum> on device "
9925 "C<device>. Note that partitions are numbered from 1."
9929 #: ../src/guestfs-actions.pod:3651 ../fish/guestfish-actions.pod:2822
9931 "The partition name can only be set on certain types of partition table. "
9932 "This works on C<gpt> but not on C<mbr> partitions."
9936 #: ../src/guestfs-actions.pod:3656
9937 msgid "guestfs_ping_daemon"
9941 #: ../src/guestfs-actions.pod:3658
9944 " int guestfs_ping_daemon (guestfs_h *g);\n"
9949 #: ../src/guestfs-actions.pod:3660 ../fish/guestfish-actions.pod:2829
9951 "This is a test probe into the guestfs daemon running inside the qemu "
9952 "subprocess. Calling this function checks that the daemon responds to the "
9953 "ping message, without affecting the daemon or attached block device(s) in "
9958 #: ../src/guestfs-actions.pod:3667
9959 msgid "guestfs_pread"
9963 #: ../src/guestfs-actions.pod:3669
9966 " char *guestfs_pread (guestfs_h *g,\n"
9967 "\t\tconst char *path,\n"
9969 "\t\tint64_t offset,\n"
9970 "\t\tsize_t *size_r);\n"
9975 #: ../src/guestfs-actions.pod:3675 ../fish/guestfish-actions.pod:2838
9977 "This command lets you read part of a file. It reads C<count> bytes of the "
9978 "file, starting at C<offset>, from file C<path>."
9982 #: ../src/guestfs-actions.pod:3678 ../fish/guestfish-actions.pod:2841
9984 "This may read fewer bytes than requested. For further details see the "
9985 "L<pread(2)> system call."
9989 #: ../src/guestfs-actions.pod:3681
9990 msgid "See also C<guestfs_pwrite>."
9994 #: ../src/guestfs-actions.pod:3690
9995 msgid "guestfs_pvcreate"
9999 #: ../src/guestfs-actions.pod:3692
10002 " int guestfs_pvcreate (guestfs_h *g,\n"
10003 "\t\tconst char *device);\n"
10008 #: ../src/guestfs-actions.pod:3695 ../fish/guestfish-actions.pod:2853
10010 "This creates an LVM physical volume on the named C<device>, where C<device> "
10011 "should usually be a partition name such as C</dev/sda1>."
10015 #: ../src/guestfs-actions.pod:3701
10016 msgid "guestfs_pvremove"
10020 #: ../src/guestfs-actions.pod:3703
10023 " int guestfs_pvremove (guestfs_h *g,\n"
10024 "\t\tconst char *device);\n"
10029 #: ../src/guestfs-actions.pod:3706 ../fish/guestfish-actions.pod:2861
10031 "This wipes a physical volume C<device> so that LVM will no longer recognise "
10036 #: ../src/guestfs-actions.pod:3709 ../fish/guestfish-actions.pod:2864
10038 "The implementation uses the C<pvremove> command which refuses to wipe "
10039 "physical volumes that contain any volume groups, so you have to remove those "
10044 #: ../src/guestfs-actions.pod:3715
10045 msgid "guestfs_pvresize"
10049 #: ../src/guestfs-actions.pod:3717
10052 " int guestfs_pvresize (guestfs_h *g,\n"
10053 "\t\tconst char *device);\n"
10058 #: ../src/guestfs-actions.pod:3720 ../fish/guestfish-actions.pod:2872
10060 "This resizes (expands or shrinks) an existing LVM physical volume to match "
10061 "the new size of the underlying device."
10065 #: ../src/guestfs-actions.pod:3725
10066 msgid "guestfs_pvresize_size"
10070 #: ../src/guestfs-actions.pod:3727
10073 " int guestfs_pvresize_size (guestfs_h *g,\n"
10074 "\t\tconst char *device,\n"
10075 "\t\tint64_t size);\n"
10080 #: ../src/guestfs-actions.pod:3731
10082 "This command is the same as C<guestfs_pvresize> except that it allows you to "
10083 "specify the new size (in bytes) explicitly."
10087 #: ../src/guestfs-actions.pod:3736
10088 msgid "guestfs_pvs"
10092 #: ../src/guestfs-actions.pod:3738
10095 " char **guestfs_pvs (guestfs_h *g);\n"
10100 #: ../src/guestfs-actions.pod:3740 ../fish/guestfish-actions.pod:2886
10102 "List all the physical volumes detected. This is the equivalent of the "
10103 "L<pvs(8)> command."
10107 #: ../src/guestfs-actions.pod:3743 ../fish/guestfish-actions.pod:2889
10109 "This returns a list of just the device names that contain PVs "
10110 "(eg. C</dev/sda2>)."
10114 #: ../src/guestfs-actions.pod:3746
10115 msgid "See also C<guestfs_pvs_full>."
10119 #: ../src/guestfs-actions.pod:3752
10120 msgid "guestfs_pvs_full"
10124 #: ../src/guestfs-actions.pod:3754
10127 " struct guestfs_lvm_pv_list *guestfs_pvs_full (guestfs_h *g);\n"
10132 #: ../src/guestfs-actions.pod:3756 ../fish/guestfish-actions.pod:2898
10134 "List all the physical volumes detected. This is the equivalent of the "
10135 "L<pvs(8)> command. The \"full\" version includes all fields."
10139 #: ../src/guestfs-actions.pod:3759
10141 "This function returns a C<struct guestfs_lvm_pv_list *> (see "
10142 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
10143 "must call C<guestfs_free_lvm_pv_list> after use>."
10147 #: ../src/guestfs-actions.pod:3764
10148 msgid "guestfs_pvuuid"
10152 #: ../src/guestfs-actions.pod:3766
10155 " char *guestfs_pvuuid (guestfs_h *g,\n"
10156 "\t\tconst char *device);\n"
10161 #: ../src/guestfs-actions.pod:3769 ../fish/guestfish-actions.pod:2905
10162 msgid "This command returns the UUID of the LVM PV C<device>."
10166 #: ../src/guestfs-actions.pod:3774
10167 msgid "guestfs_pwrite"
10171 #: ../src/guestfs-actions.pod:3776
10174 " int guestfs_pwrite (guestfs_h *g,\n"
10175 "\t\tconst char *path,\n"
10176 "\t\tconst char *content,\n"
10177 "\t\tsize_t content_size,\n"
10178 "\t\tint64_t offset);\n"
10183 #: ../src/guestfs-actions.pod:3782 ../fish/guestfish-actions.pod:2911
10185 "This command writes to part of a file. It writes the data buffer C<content> "
10186 "to the file C<path> starting at offset C<offset>."
10190 #: ../src/guestfs-actions.pod:3785 ../fish/guestfish-actions.pod:2914
10192 "This command implements the L<pwrite(2)> system call, and like that system "
10193 "call it may not write the full data requested. The return value is the "
10194 "number of bytes that were actually written to the file. This could even be "
10195 "0, although short writes are unlikely for regular files in ordinary "
10200 #: ../src/guestfs-actions.pod:3791
10201 msgid "See also C<guestfs_pread>."
10205 #: ../src/guestfs-actions.pod:3798
10206 msgid "guestfs_read_file"
10210 #: ../src/guestfs-actions.pod:3800
10213 " char *guestfs_read_file (guestfs_h *g,\n"
10214 "\t\tconst char *path,\n"
10215 "\t\tsize_t *size_r);\n"
10220 #: ../src/guestfs-actions.pod:3804 ../fish/guestfish-actions.pod:2929
10221 msgid "This calls returns the contents of the file C<path> as a buffer."
10225 #: ../src/guestfs-actions.pod:3807
10227 "Unlike C<guestfs_cat>, this function can correctly handle files that contain "
10228 "embedded ASCII NUL characters. However unlike C<guestfs_download>, this "
10229 "function is limited in the total size of file that can be handled."
10233 #: ../src/guestfs-actions.pod:3819
10234 msgid "guestfs_read_lines"
10238 #: ../src/guestfs-actions.pod:3821
10241 " char **guestfs_read_lines (guestfs_h *g,\n"
10242 "\t\tconst char *path);\n"
10247 #: ../src/guestfs-actions.pod:3826 ../fish/guestfish-actions.pod:2946
10249 "The file contents are returned as a list of lines. Trailing C<LF> and "
10250 "C<CRLF> character sequences are I<not> returned."
10254 #: ../src/guestfs-actions.pod:3829
10256 "Note that this function cannot correctly handle binary files (specifically, "
10257 "files containing C<\\0> character which is treated as end of line). For "
10258 "those you need to use the C<guestfs_read_file> function which has a more "
10259 "complex interface."
10263 #: ../src/guestfs-actions.pod:3838
10264 msgid "guestfs_readdir"
10268 #: ../src/guestfs-actions.pod:3840
10271 " struct guestfs_dirent_list *guestfs_readdir (guestfs_h *g,\n"
10272 "\t\tconst char *dir);\n"
10277 #: ../src/guestfs-actions.pod:3843 ../fish/guestfish-actions.pod:2958
10278 msgid "This returns the list of directory entries in directory C<dir>."
10282 #: ../src/guestfs-actions.pod:3845 ../fish/guestfish-actions.pod:2960
10284 "All entries in the directory are returned, including C<.> and C<..>. The "
10285 "entries are I<not> sorted, but returned in the same order as the underlying "
10290 #: ../src/guestfs-actions.pod:3849 ../fish/guestfish-actions.pod:2964
10292 "Also this call returns basic file type information about each file. The "
10293 "C<ftyp> field will contain one of the following characters:"
10297 #: ../src/guestfs-actions.pod:3854 ../fish/guestfish-actions.pod:2969
10302 #: ../src/guestfs-actions.pod:3856 ../fish/guestfish-actions.pod:2971
10303 msgid "Block special"
10307 #: ../src/guestfs-actions.pod:3858 ../fish/guestfish-actions.pod:2973
10312 #: ../src/guestfs-actions.pod:3860 ../fish/guestfish-actions.pod:2975
10313 msgid "Char special"
10317 #: ../src/guestfs-actions.pod:3862 ../fish/guestfish-actions.pod:2977
10322 #: ../src/guestfs-actions.pod:3864 ../fish/guestfish-actions.pod:2979
10327 #: ../src/guestfs-actions.pod:3866 ../fish/guestfish-actions.pod:2981
10332 #: ../src/guestfs-actions.pod:3868 ../fish/guestfish-actions.pod:2983
10333 msgid "FIFO (named pipe)"
10337 #: ../src/guestfs-actions.pod:3870 ../fish/guestfish-actions.pod:2985
10342 #: ../src/guestfs-actions.pod:3872 ../fish/guestfish-actions.pod:2987
10343 msgid "Symbolic link"
10347 #: ../src/guestfs-actions.pod:3874 ../fish/guestfish-actions.pod:2989
10352 #: ../src/guestfs-actions.pod:3876 ../fish/guestfish-actions.pod:2991
10353 msgid "Regular file"
10357 #: ../src/guestfs-actions.pod:3878 ../fish/guestfish-actions.pod:2993
10362 #: ../src/guestfs-actions.pod:3880 ../fish/guestfish-actions.pod:2995
10367 #: ../src/guestfs-actions.pod:3882 ../fish/guestfish-actions.pod:2997
10372 #: ../src/guestfs-actions.pod:3884 ../fish/guestfish-actions.pod:2999
10373 msgid "Unknown file type"
10377 #: ../src/guestfs-actions.pod:3886 ../fish/guestfish-actions.pod:3001
10382 #: ../src/guestfs-actions.pod:3888 ../fish/guestfish-actions.pod:3003
10383 msgid "The L<readdir(3)> call returned a C<d_type> field with an unexpected value"
10387 #: ../src/guestfs-actions.pod:3893
10389 "This function is primarily intended for use by programs. To get a simple "
10390 "list of names, use C<guestfs_ls>. To get a printable directory for human "
10391 "consumption, use C<guestfs_ll>."
10395 #: ../src/guestfs-actions.pod:3897
10397 "This function returns a C<struct guestfs_dirent_list *> (see "
10398 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
10399 "must call C<guestfs_free_dirent_list> after use>."
10403 #: ../src/guestfs-actions.pod:3902
10404 msgid "guestfs_readlink"
10408 #: ../src/guestfs-actions.pod:3904
10411 " char *guestfs_readlink (guestfs_h *g,\n"
10412 "\t\tconst char *path);\n"
10417 #: ../src/guestfs-actions.pod:3907 ../fish/guestfish-actions.pod:3016
10418 msgid "This command reads the target of a symbolic link."
10422 #: ../src/guestfs-actions.pod:3912
10423 msgid "guestfs_readlinklist"
10427 #: ../src/guestfs-actions.pod:3914
10430 " char **guestfs_readlinklist (guestfs_h *g,\n"
10431 "\t\tconst char *path,\n"
10432 "\t\tchar *const *names);\n"
10437 #: ../src/guestfs-actions.pod:3918 ../fish/guestfish-actions.pod:3022
10439 "This call allows you to do a C<readlink> operation on multiple files, where "
10440 "all files are in the directory C<path>. C<names> is the list of files from "
10445 #: ../src/guestfs-actions.pod:3922 ../fish/guestfish-actions.pod:3026
10447 "On return you get a list of strings, with a one-to-one correspondence to the "
10448 "C<names> list. Each string is the value of the symbolic link."
10452 #: ../src/guestfs-actions.pod:3926 ../fish/guestfish-actions.pod:3030
10454 "If the C<readlink(2)> operation fails on any name, then the corresponding "
10455 "result string is the empty string C<\"\">. However the whole operation is "
10456 "completed even if there were C<readlink(2)> errors, and so you can call this "
10457 "function with names where you don't know if they are symbolic links already "
10458 "(albeit slightly less efficient)."
10462 #: ../src/guestfs-actions.pod:3933 ../fish/guestfish-actions.pod:3037
10464 "This call is intended for programs that want to efficiently list a directory "
10465 "contents without making many round-trips. Very long directory listings "
10466 "might cause the protocol message size to be exceeded, causing this call to "
10467 "fail. The caller must split up such requests into smaller groups of names."
10471 #: ../src/guestfs-actions.pod:3944
10472 msgid "guestfs_realpath"
10476 #: ../src/guestfs-actions.pod:3946
10479 " char *guestfs_realpath (guestfs_h *g,\n"
10480 "\t\tconst char *path);\n"
10485 #: ../src/guestfs-actions.pod:3949 ../fish/guestfish-actions.pod:3048
10487 "Return the canonicalized absolute pathname of C<path>. The returned path "
10488 "has no C<.>, C<..> or symbolic link path elements."
10492 #: ../src/guestfs-actions.pod:3955
10493 msgid "guestfs_removexattr"
10497 #: ../src/guestfs-actions.pod:3957
10500 " int guestfs_removexattr (guestfs_h *g,\n"
10501 "\t\tconst char *xattr,\n"
10502 "\t\tconst char *path);\n"
10507 #: ../src/guestfs-actions.pod:3961 ../fish/guestfish-actions.pod:3055
10508 msgid "This call removes the extended attribute named C<xattr> of the file C<path>."
10512 #: ../src/guestfs-actions.pod:3964
10513 msgid "See also: C<guestfs_lremovexattr>, L<attr(5)>."
10517 #: ../src/guestfs-actions.pod:3968
10518 msgid "guestfs_resize2fs"
10522 #: ../src/guestfs-actions.pod:3970
10525 " int guestfs_resize2fs (guestfs_h *g,\n"
10526 "\t\tconst char *device);\n"
10531 #: ../src/guestfs-actions.pod:3973 ../fish/guestfish-actions.pod:3064
10533 "This resizes an ext2, ext3 or ext4 filesystem to match the size of the "
10534 "underlying device."
10538 #: ../src/guestfs-actions.pod:3976
10540 "I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> on the "
10541 "C<device> before calling this command. For unknown reasons C<resize2fs> "
10542 "sometimes gives an error about this and sometimes not. In any case, it is "
10543 "always safe to call C<guestfs_e2fsck_f> before calling this function."
10547 #: ../src/guestfs-actions.pod:3984
10548 msgid "guestfs_resize2fs_size"
10552 #: ../src/guestfs-actions.pod:3986
10555 " int guestfs_resize2fs_size (guestfs_h *g,\n"
10556 "\t\tconst char *device,\n"
10557 "\t\tint64_t size);\n"
10562 #: ../src/guestfs-actions.pod:3990
10564 "This command is the same as C<guestfs_resize2fs> except that it allows you "
10565 "to specify the new size (in bytes) explicitly."
10569 #: ../src/guestfs-actions.pod:3995
10574 #: ../src/guestfs-actions.pod:3997
10577 " int guestfs_rm (guestfs_h *g,\n"
10578 "\t\tconst char *path);\n"
10583 #: ../src/guestfs-actions.pod:4000 ../fish/guestfish-actions.pod:3084
10584 msgid "Remove the single file C<path>."
10588 #: ../src/guestfs-actions.pod:4004
10589 msgid "guestfs_rm_rf"
10593 #: ../src/guestfs-actions.pod:4006
10596 " int guestfs_rm_rf (guestfs_h *g,\n"
10597 "\t\tconst char *path);\n"
10602 #: ../src/guestfs-actions.pod:4009 ../fish/guestfish-actions.pod:3090
10604 "Remove the file or directory C<path>, recursively removing the contents if "
10605 "its a directory. This is like the C<rm -rf> shell command."
10609 #: ../src/guestfs-actions.pod:4015
10610 msgid "guestfs_rmdir"
10614 #: ../src/guestfs-actions.pod:4017
10617 " int guestfs_rmdir (guestfs_h *g,\n"
10618 "\t\tconst char *path);\n"
10623 #: ../src/guestfs-actions.pod:4020 ../fish/guestfish-actions.pod:3098
10624 msgid "Remove the single directory C<path>."
10628 #: ../src/guestfs-actions.pod:4024
10629 msgid "guestfs_rmmountpoint"
10633 #: ../src/guestfs-actions.pod:4026
10636 " int guestfs_rmmountpoint (guestfs_h *g,\n"
10637 "\t\tconst char *exemptpath);\n"
10642 #: ../src/guestfs-actions.pod:4029
10644 "This calls removes a mountpoint that was previously created with "
10645 "C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> for full details."
10649 #: ../src/guestfs-actions.pod:4035
10650 msgid "guestfs_scrub_device"
10654 #: ../src/guestfs-actions.pod:4037
10657 " int guestfs_scrub_device (guestfs_h *g,\n"
10658 "\t\tconst char *device);\n"
10663 #: ../src/guestfs-actions.pod:4040 ../fish/guestfish-actions.pod:3112
10665 "This command writes patterns over C<device> to make data retrieval more "
10670 #: ../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
10672 "It is an interface to the L<scrub(1)> program. See that manual page for "
10677 #: ../src/guestfs-actions.pod:4051
10678 msgid "guestfs_scrub_file"
10682 #: ../src/guestfs-actions.pod:4053
10685 " int guestfs_scrub_file (guestfs_h *g,\n"
10686 "\t\tconst char *file);\n"
10691 #: ../src/guestfs-actions.pod:4056 ../fish/guestfish-actions.pod:3125
10693 "This command writes patterns over a file to make data retrieval more "
10698 #: ../src/guestfs-actions.pod:4059 ../fish/guestfish-actions.pod:3128
10699 msgid "The file is I<removed> after scrubbing."
10703 #: ../src/guestfs-actions.pod:4066
10704 msgid "guestfs_scrub_freespace"
10708 #: ../src/guestfs-actions.pod:4068
10711 " int guestfs_scrub_freespace (guestfs_h *g,\n"
10712 "\t\tconst char *dir);\n"
10717 #: ../src/guestfs-actions.pod:4071
10719 "This command creates the directory C<dir> and then fills it with files until "
10720 "the filesystem is full, and scrubs the files as for C<guestfs_scrub_file>, "
10721 "and deletes them. The intention is to scrub any free space on the partition "
10722 "containing C<dir>."
10726 #: ../src/guestfs-actions.pod:4082
10727 msgid "guestfs_set_append"
10731 #: ../src/guestfs-actions.pod:4084
10734 " int guestfs_set_append (guestfs_h *g,\n"
10735 "\t\tconst char *append);\n"
10740 #: ../src/guestfs-actions.pod:4087 ../fish/guestfish-actions.pod:3150
10742 "This function is used to add additional options to the guest kernel command "
10747 #: ../src/guestfs-actions.pod:4090 ../fish/guestfish-actions.pod:3153
10749 "The default is C<NULL> unless overridden by setting C<LIBGUESTFS_APPEND> "
10750 "environment variable."
10754 #: ../src/guestfs-actions.pod:4093 ../fish/guestfish-actions.pod:3156
10756 "Setting C<append> to C<NULL> means I<no> additional options are passed "
10757 "(libguestfs always adds a few of its own)."
10761 #: ../src/guestfs-actions.pod:4098
10762 msgid "guestfs_set_autosync"
10766 #: ../src/guestfs-actions.pod:4100
10769 " int guestfs_set_autosync (guestfs_h *g,\n"
10770 "\t\tint autosync);\n"
10775 #: ../src/guestfs-actions.pod:4103
10777 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
10778 "effort attempt to run C<guestfs_umount_all> followed by C<guestfs_sync> when "
10779 "the handle is closed (also if the program exits without closing handles)."
10783 #: ../src/guestfs-actions.pod:4108 ../fish/guestfish-actions.pod:3168
10785 "This is disabled by default (except in guestfish where it is enabled by "
10790 #: ../src/guestfs-actions.pod:4113
10791 msgid "guestfs_set_direct"
10795 #: ../src/guestfs-actions.pod:4115
10798 " int guestfs_set_direct (guestfs_h *g,\n"
10799 "\t\tint direct);\n"
10804 #: ../src/guestfs-actions.pod:4118 ../fish/guestfish-actions.pod:3175
10806 "If the direct appliance mode flag is enabled, then stdin and stdout are "
10807 "passed directly through to the appliance once it is launched."
10811 #: ../src/guestfs-actions.pod:4122
10813 "One consequence of this is that log messages aren't caught by the library "
10814 "and handled by C<guestfs_set_log_message_callback>, but go straight to "
10819 #: ../src/guestfs-actions.pod:4126 ../fish/guestfish-actions.pod:3183
10820 msgid "You probably don't want to use this unless you know what you are doing."
10824 #: ../src/guestfs-actions.pod:4129 ../fish/guestfish-actions.pod:3186
10825 msgid "The default is disabled."
10829 #: ../src/guestfs-actions.pod:4133
10830 msgid "guestfs_set_e2label"
10834 #: ../src/guestfs-actions.pod:4135
10837 " int guestfs_set_e2label (guestfs_h *g,\n"
10838 "\t\tconst char *device,\n"
10839 "\t\tconst char *label);\n"
10844 #: ../src/guestfs-actions.pod:4139 ../fish/guestfish-actions.pod:3192
10846 "This sets the ext2/3/4 filesystem label of the filesystem on C<device> to "
10847 "C<label>. Filesystem labels are limited to 16 characters."
10851 #: ../src/guestfs-actions.pod:4143
10853 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label> to return "
10854 "the existing label on a filesystem."
10858 #: ../src/guestfs-actions.pod:4148
10859 msgid "guestfs_set_e2uuid"
10863 #: ../src/guestfs-actions.pod:4150
10866 " int guestfs_set_e2uuid (guestfs_h *g,\n"
10867 "\t\tconst char *device,\n"
10868 "\t\tconst char *uuid);\n"
10873 #: ../src/guestfs-actions.pod:4154 ../fish/guestfish-actions.pod:3203
10875 "This sets the ext2/3/4 filesystem UUID of the filesystem on C<device> to "
10876 "C<uuid>. The format of the UUID and alternatives such as C<clear>, "
10877 "C<random> and C<time> are described in the L<tune2fs(8)> manpage."
10881 #: ../src/guestfs-actions.pod:4159
10883 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid> to return "
10884 "the existing UUID of a filesystem."
10888 #: ../src/guestfs-actions.pod:4164
10889 msgid "guestfs_set_memsize"
10893 #: ../src/guestfs-actions.pod:4166
10896 " int guestfs_set_memsize (guestfs_h *g,\n"
10897 "\t\tint memsize);\n"
10902 #: ../src/guestfs-actions.pod:4169
10904 "This sets the memory size in megabytes allocated to the qemu subprocess. "
10905 "This only has any effect if called before C<guestfs_launch>."
10909 #: ../src/guestfs-actions.pod:4173 ../fish/guestfish-actions.pod:3219
10911 "You can also change this by setting the environment variable "
10912 "C<LIBGUESTFS_MEMSIZE> before the handle is created."
10916 #: ../src/guestfs-actions.pod:4182
10917 msgid "guestfs_set_network"
10921 #: ../src/guestfs-actions.pod:4184
10924 " int guestfs_set_network (guestfs_h *g,\n"
10925 "\t\tint network);\n"
10930 #: ../src/guestfs-actions.pod:4187 ../fish/guestfish-actions.pod:3230
10932 "If C<network> is true, then the network is enabled in the libguestfs "
10933 "appliance. The default is false."
10937 #: ../src/guestfs-actions.pod:4190 ../fish/guestfish-actions.pod:3233
10939 "This affects whether commands are able to access the network (see "
10940 "L<guestfs(3)/RUNNING COMMANDS>)."
10944 #: ../src/guestfs-actions.pod:4193
10946 "You must call this before calling C<guestfs_launch>, otherwise it has no "
10951 #: ../src/guestfs-actions.pod:4198
10952 msgid "guestfs_set_path"
10956 #: ../src/guestfs-actions.pod:4200
10959 " int guestfs_set_path (guestfs_h *g,\n"
10960 "\t\tconst char *searchpath);\n"
10965 #: ../src/guestfs-actions.pod:4203 ../fish/guestfish-actions.pod:3243
10966 msgid "Set the path that libguestfs searches for kernel and initrd.img."
10970 #: ../src/guestfs-actions.pod:4205 ../fish/guestfish-actions.pod:3245
10972 "The default is C<$libdir/guestfs> unless overridden by setting "
10973 "C<LIBGUESTFS_PATH> environment variable."
10977 #: ../src/guestfs-actions.pod:4208 ../fish/guestfish-actions.pod:3248
10978 msgid "Setting C<path> to C<NULL> restores the default path."
10982 #: ../src/guestfs-actions.pod:4212
10983 msgid "guestfs_set_qemu"
10987 #: ../src/guestfs-actions.pod:4214
10990 " int guestfs_set_qemu (guestfs_h *g,\n"
10991 "\t\tconst char *qemu);\n"
10996 #: ../src/guestfs-actions.pod:4217 ../fish/guestfish-actions.pod:3254
10997 msgid "Set the qemu binary that we will use."
11001 #: ../src/guestfs-actions.pod:4219 ../fish/guestfish-actions.pod:3256
11002 msgid "The default is chosen when the library was compiled by the configure script."
11006 #: ../src/guestfs-actions.pod:4222 ../fish/guestfish-actions.pod:3259
11008 "You can also override this by setting the C<LIBGUESTFS_QEMU> environment "
11013 #: ../src/guestfs-actions.pod:4225 ../fish/guestfish-actions.pod:3262
11014 msgid "Setting C<qemu> to C<NULL> restores the default qemu binary."
11018 #: ../src/guestfs-actions.pod:4227 ../fish/guestfish-actions.pod:3264
11020 "Note that you should call this function as early as possible after creating "
11021 "the handle. This is because some pre-launch operations depend on testing "
11022 "qemu features (by running C<qemu -help>). If the qemu binary changes, we "
11023 "don't retest features, and so you might see inconsistent results. Using the "
11024 "environment variable C<LIBGUESTFS_QEMU> is safest of all since that picks "
11025 "the qemu binary at the same time as the handle is created."
11029 #: ../src/guestfs-actions.pod:4237
11030 msgid "guestfs_set_recovery_proc"
11034 #: ../src/guestfs-actions.pod:4239
11037 " int guestfs_set_recovery_proc (guestfs_h *g,\n"
11038 "\t\tint recoveryproc);\n"
11043 #: ../src/guestfs-actions.pod:4242
11045 "If this is called with the parameter C<false> then C<guestfs_launch> does "
11046 "not create a recovery process. The purpose of the recovery process is to "
11047 "stop runaway qemu processes in the case where the main program aborts "
11052 #: ../src/guestfs-actions.pod:4247
11054 "This only has any effect if called before C<guestfs_launch>, and the default "
11059 #: ../src/guestfs-actions.pod:4250 ../fish/guestfish-actions.pod:3284
11061 "About the only time when you would want to disable this is if the main "
11062 "process will fork itself into the background (\"daemonize\" itself). In "
11063 "this case the recovery process thinks that the main program has disappeared "
11064 "and so kills qemu, which is not very helpful."
11068 #: ../src/guestfs-actions.pod:4258
11069 msgid "guestfs_set_selinux"
11073 #: ../src/guestfs-actions.pod:4260
11076 " int guestfs_set_selinux (guestfs_h *g,\n"
11077 "\t\tint selinux);\n"
11082 #: ../src/guestfs-actions.pod:4263 ../fish/guestfish-actions.pod:3294
11084 "This sets the selinux flag that is passed to the appliance at boot time. "
11085 "The default is C<selinux=0> (disabled)."
11089 #: ../src/guestfs-actions.pod:4266 ../fish/guestfish-actions.pod:3297
11091 "Note that if SELinux is enabled, it is always in Permissive mode "
11092 "(C<enforcing=0>)."
11096 #: ../src/guestfs-actions.pod:4274
11097 msgid "guestfs_set_trace"
11101 #: ../src/guestfs-actions.pod:4276
11104 " int guestfs_set_trace (guestfs_h *g,\n"
11105 "\t\tint trace);\n"
11110 #: ../src/guestfs-actions.pod:4279 ../fish/guestfish-actions.pod:3307
11112 "If the command trace flag is set to 1, then commands are printed on stderr "
11113 "before they are executed in a format which is very similar to the one used "
11114 "by guestfish. In other words, you can run a program with this enabled, and "
11115 "you will get out a script which you can feed to guestfish to perform the "
11116 "same set of actions."
11120 #: ../src/guestfs-actions.pod:4286 ../fish/guestfish-actions.pod:3314
11122 "If you want to trace C API calls into libguestfs (and other libraries) then "
11123 "possibly a better way is to use the external ltrace(1) command."
11127 #: ../src/guestfs-actions.pod:4290 ../fish/guestfish-actions.pod:3318
11129 "Command traces are disabled unless the environment variable "
11130 "C<LIBGUESTFS_TRACE> is defined and set to C<1>."
11134 #: ../src/guestfs-actions.pod:4295
11135 msgid "guestfs_set_verbose"
11139 #: ../src/guestfs-actions.pod:4297
11142 " int guestfs_set_verbose (guestfs_h *g,\n"
11143 "\t\tint verbose);\n"
11148 #: ../src/guestfs-actions.pod:4300 ../fish/guestfish-actions.pod:3325
11149 msgid "If C<verbose> is true, this turns on verbose messages (to C<stderr>)."
11153 #: ../src/guestfs-actions.pod:4302 ../fish/guestfish-actions.pod:3327
11155 "Verbose messages are disabled unless the environment variable "
11156 "C<LIBGUESTFS_DEBUG> is defined and set to C<1>."
11160 #: ../src/guestfs-actions.pod:4307
11161 msgid "guestfs_setcon"
11165 #: ../src/guestfs-actions.pod:4309
11168 " int guestfs_setcon (guestfs_h *g,\n"
11169 "\t\tconst char *context);\n"
11174 #: ../src/guestfs-actions.pod:4312 ../fish/guestfish-actions.pod:3334
11176 "This sets the SELinux security context of the daemon to the string "
11181 #: ../src/guestfs-actions.pod:4315 ../fish/guestfish-actions.pod:3337
11182 msgid "See the documentation about SELINUX in L<guestfs(3)>."
11186 #: ../src/guestfs-actions.pod:4319
11187 msgid "guestfs_setxattr"
11191 #: ../src/guestfs-actions.pod:4321
11194 " int guestfs_setxattr (guestfs_h *g,\n"
11195 "\t\tconst char *xattr,\n"
11196 "\t\tconst char *val,\n"
11197 "\t\tint vallen,\n"
11198 "\t\tconst char *path);\n"
11203 #: ../src/guestfs-actions.pod:4327 ../fish/guestfish-actions.pod:3343
11205 "This call sets the extended attribute named C<xattr> of the file C<path> to "
11206 "the value C<val> (of length C<vallen>). The value is arbitrary 8 bit data."
11210 #: ../src/guestfs-actions.pod:4331
11211 msgid "See also: C<guestfs_lsetxattr>, L<attr(5)>."
11215 #: ../src/guestfs-actions.pod:4335
11216 msgid "guestfs_sfdisk"
11220 #: ../src/guestfs-actions.pod:4337
11223 " int guestfs_sfdisk (guestfs_h *g,\n"
11224 "\t\tconst char *device,\n"
11227 "\t\tint sectors,\n"
11228 "\t\tchar *const *lines);\n"
11233 #: ../src/guestfs-actions.pod:4344 ../fish/guestfish-actions.pod:3353
11235 "This is a direct interface to the L<sfdisk(8)> program for creating "
11236 "partitions on block devices."
11240 #: ../src/guestfs-actions.pod:4347 ../fish/guestfish-actions.pod:3356
11241 msgid "C<device> should be a block device, for example C</dev/sda>."
11245 #: ../src/guestfs-actions.pod:4349 ../fish/guestfish-actions.pod:3358
11247 "C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads and "
11248 "sectors on the device, which are passed directly to sfdisk as the I<-C>, "
11249 "I<-H> and I<-S> parameters. If you pass C<0> for any of these, then the "
11250 "corresponding parameter is omitted. Usually for 'large' disks, you can just "
11251 "pass C<0> for these, but for small (floppy-sized) disks, sfdisk (or rather, "
11252 "the kernel) cannot work out the right geometry and you will need to tell it."
11256 #: ../src/guestfs-actions.pod:4357 ../fish/guestfish-actions.pod:3366
11258 "C<lines> is a list of lines that we feed to C<sfdisk>. For more information "
11259 "refer to the L<sfdisk(8)> manpage."
11263 #: ../src/guestfs-actions.pod:4360 ../fish/guestfish-actions.pod:3369
11265 "To create a single partition occupying the whole disk, you would pass "
11266 "C<lines> as a single element list, when the single element being the string "
11271 #: ../src/guestfs-actions.pod:4364
11272 msgid "See also: C<guestfs_sfdisk_l>, C<guestfs_sfdisk_N>, C<guestfs_part_init>"
11276 #: ../src/guestfs-actions.pod:4372
11277 msgid "guestfs_sfdiskM"
11281 #: ../src/guestfs-actions.pod:4374
11284 " int guestfs_sfdiskM (guestfs_h *g,\n"
11285 "\t\tconst char *device,\n"
11286 "\t\tchar *const *lines);\n"
11291 #: ../src/guestfs-actions.pod:4378
11293 "This is a simplified interface to the C<guestfs_sfdisk> command, where "
11294 "partition sizes are specified in megabytes only (rounded to the nearest "
11295 "cylinder) and you don't need to specify the cyls, heads and sectors "
11296 "parameters which were rarely if ever used anyway."
11300 #: ../src/guestfs-actions.pod:4384
11302 "See also: C<guestfs_sfdisk>, the L<sfdisk(8)> manpage and "
11303 "C<guestfs_part_disk>"
11307 #: ../src/guestfs-actions.pod:4392
11308 msgid "guestfs_sfdisk_N"
11312 #: ../src/guestfs-actions.pod:4394
11315 " int guestfs_sfdisk_N (guestfs_h *g,\n"
11316 "\t\tconst char *device,\n"
11317 "\t\tint partnum,\n"
11320 "\t\tint sectors,\n"
11321 "\t\tconst char *line);\n"
11326 #: ../src/guestfs-actions.pod:4402 ../fish/guestfish-actions.pod:3399
11328 "This runs L<sfdisk(8)> option to modify just the single partition C<n> "
11329 "(note: C<n> counts from 1)."
11333 #: ../src/guestfs-actions.pod:4405
11335 "For other parameters, see C<guestfs_sfdisk>. You should usually pass C<0> "
11336 "for the cyls/heads/sectors parameters."
11340 #: ../src/guestfs-actions.pod:4408
11341 msgid "See also: C<guestfs_part_add>"
11345 #: ../src/guestfs-actions.pod:4415
11346 msgid "guestfs_sfdisk_disk_geometry"
11350 #: ../src/guestfs-actions.pod:4417
11353 " char *guestfs_sfdisk_disk_geometry (guestfs_h *g,\n"
11354 "\t\tconst char *device);\n"
11359 #: ../src/guestfs-actions.pod:4420
11361 "This displays the disk geometry of C<device> read from the partition table. "
11362 "Especially in the case where the underlying block device has been resized, "
11363 "this can be different from the kernel's idea of the geometry (see "
11364 "C<guestfs_sfdisk_kernel_geometry>)."
11368 #: ../src/guestfs-actions.pod:4425 ../src/guestfs-actions.pod:4438 ../fish/guestfish-actions.pod:3419 ../fish/guestfish-actions.pod:3428
11369 msgid "The result is in human-readable format, and not designed to be parsed."
11373 #: ../src/guestfs-actions.pod:4431
11374 msgid "guestfs_sfdisk_kernel_geometry"
11378 #: ../src/guestfs-actions.pod:4433
11381 " char *guestfs_sfdisk_kernel_geometry (guestfs_h *g,\n"
11382 "\t\tconst char *device);\n"
11387 #: ../src/guestfs-actions.pod:4436 ../fish/guestfish-actions.pod:3426
11388 msgid "This displays the kernel's idea of the geometry of C<device>."
11392 #: ../src/guestfs-actions.pod:4444
11393 msgid "guestfs_sfdisk_l"
11397 #: ../src/guestfs-actions.pod:4446
11400 " char *guestfs_sfdisk_l (guestfs_h *g,\n"
11401 "\t\tconst char *device);\n"
11406 #: ../src/guestfs-actions.pod:4449 ../fish/guestfish-actions.pod:3435
11408 "This displays the partition table on C<device>, in the human-readable output "
11409 "of the L<sfdisk(8)> command. It is not intended to be parsed."
11413 #: ../src/guestfs-actions.pod:4453
11414 msgid "See also: C<guestfs_part_list>"
11418 #: ../src/guestfs-actions.pod:4458
11423 #: ../src/guestfs-actions.pod:4460
11426 " char *guestfs_sh (guestfs_h *g,\n"
11427 "\t\tconst char *command);\n"
11432 #: ../src/guestfs-actions.pod:4463 ../fish/guestfish-actions.pod:3445
11434 "This call runs a command from the guest filesystem via the guest's "
11439 #: ../src/guestfs-actions.pod:4466
11440 msgid "This is like C<guestfs_command>, but passes the command to:"
11444 #: ../src/guestfs-actions.pod:4468 ../fish/guestfish-actions.pod:3450
11447 " /bin/sh -c \"command\"\n"
11452 #: ../src/guestfs-actions.pod:4470 ../fish/guestfish-actions.pod:3452
11454 "Depending on the guest's shell, this usually results in wildcards being "
11455 "expanded, shell expressions being interpolated and so on."
11459 #: ../src/guestfs-actions.pod:4474
11460 msgid "All the provisos about C<guestfs_command> apply to this call."
11464 #: ../src/guestfs-actions.pod:4479
11465 msgid "guestfs_sh_lines"
11469 #: ../src/guestfs-actions.pod:4481
11472 " char **guestfs_sh_lines (guestfs_h *g,\n"
11473 "\t\tconst char *command);\n"
11478 #: ../src/guestfs-actions.pod:4484
11480 "This is the same as C<guestfs_sh>, but splits the result into a list of "
11485 #: ../src/guestfs-actions.pod:4487
11486 msgid "See also: C<guestfs_command_lines>"
11490 #: ../src/guestfs-actions.pod:4493
11491 msgid "guestfs_sleep"
11495 #: ../src/guestfs-actions.pod:4495
11498 " int guestfs_sleep (guestfs_h *g,\n"
11504 #: ../src/guestfs-actions.pod:4498 ../fish/guestfish-actions.pod:3471
11505 msgid "Sleep for C<secs> seconds."
11509 #: ../src/guestfs-actions.pod:4502 ../src/guestfs-structs.pod:109
11510 msgid "guestfs_stat"
11514 #: ../src/guestfs-actions.pod:4504
11517 " struct guestfs_stat *guestfs_stat (guestfs_h *g,\n"
11518 "\t\tconst char *path);\n"
11523 #: ../src/guestfs-actions.pod:4509 ../fish/guestfish-actions.pod:3479
11524 msgid "This is the same as the C<stat(2)> system call."
11528 #: ../src/guestfs-actions.pod:4515 ../src/guestfs-structs.pod:135
11529 msgid "guestfs_statvfs"
11533 #: ../src/guestfs-actions.pod:4517
11536 " struct guestfs_statvfs *guestfs_statvfs (guestfs_h *g,\n"
11537 "\t\tconst char *path);\n"
11542 #: ../src/guestfs-actions.pod:4520 ../fish/guestfish-actions.pod:3485
11544 "Returns file system statistics for any mounted file system. C<path> should "
11545 "be a file or directory in the mounted file system (typically it is the mount "
11546 "point itself, but it doesn't need to be)."
11550 #: ../src/guestfs-actions.pod:4524 ../fish/guestfish-actions.pod:3489
11551 msgid "This is the same as the C<statvfs(2)> system call."
11555 #: ../src/guestfs-actions.pod:4526
11557 "This function returns a C<struct guestfs_statvfs *>, or NULL if there was an "
11558 "error. I<The caller must call C<guestfs_free_statvfs> after use>."
11562 #: ../src/guestfs-actions.pod:4530
11563 msgid "guestfs_strings"
11567 #: ../src/guestfs-actions.pod:4532
11570 " char **guestfs_strings (guestfs_h *g,\n"
11571 "\t\tconst char *path);\n"
11576 #: ../src/guestfs-actions.pod:4535 ../fish/guestfish-actions.pod:3495
11578 "This runs the L<strings(1)> command on a file and returns the list of "
11579 "printable strings found."
11583 #: ../src/guestfs-actions.pod:4545
11584 msgid "guestfs_strings_e"
11588 #: ../src/guestfs-actions.pod:4547
11591 " char **guestfs_strings_e (guestfs_h *g,\n"
11592 "\t\tconst char *encoding,\n"
11593 "\t\tconst char *path);\n"
11598 #: ../src/guestfs-actions.pod:4551
11600 "This is like the C<guestfs_strings> command, but allows you to specify the "
11601 "encoding of strings that are looked for in the source file C<path>."
11605 #: ../src/guestfs-actions.pod:4555 ../fish/guestfish-actions.pod:3509
11606 msgid "Allowed encodings are:"
11610 #: ../src/guestfs-actions.pod:4559 ../fish/guestfish-actions.pod:3513
11615 #: ../src/guestfs-actions.pod:4561
11617 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
11618 "ISO-8859-X (this is what C<guestfs_strings> uses)."
11622 #: ../src/guestfs-actions.pod:4564 ../fish/guestfish-actions.pod:3518
11627 #: ../src/guestfs-actions.pod:4566 ../fish/guestfish-actions.pod:3520
11628 msgid "Single 8-bit-byte characters."
11632 #: ../src/guestfs-actions.pod:4568 ../fish/guestfish-actions.pod:3522
11637 #: ../src/guestfs-actions.pod:4570 ../fish/guestfish-actions.pod:3524
11638 msgid "16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE."
11642 #: ../src/guestfs-actions.pod:4573 ../fish/guestfish-actions.pod:3527
11643 msgid "l (lower case letter L)"
11647 #: ../src/guestfs-actions.pod:4575 ../fish/guestfish-actions.pod:3529
11649 "16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for "
11650 "examining binaries in Windows guests."
11654 #: ../src/guestfs-actions.pod:4578 ../fish/guestfish-actions.pod:3532
11659 #: ../src/guestfs-actions.pod:4580 ../fish/guestfish-actions.pod:3534
11660 msgid "32-bit big endian such as UCS-4BE."
11664 #: ../src/guestfs-actions.pod:4582 ../fish/guestfish-actions.pod:3536
11669 #: ../src/guestfs-actions.pod:4584 ../fish/guestfish-actions.pod:3538
11670 msgid "32-bit little endian such as UCS-4LE."
11674 #: ../src/guestfs-actions.pod:4588 ../fish/guestfish-actions.pod:3542
11675 msgid "The returned strings are transcoded to UTF-8."
11679 #: ../src/guestfs-actions.pod:4597
11680 msgid "guestfs_swapoff_device"
11684 #: ../src/guestfs-actions.pod:4599
11687 " int guestfs_swapoff_device (guestfs_h *g,\n"
11688 "\t\tconst char *device);\n"
11693 #: ../src/guestfs-actions.pod:4602
11695 "This command disables the libguestfs appliance swap device or partition "
11696 "named C<device>. See C<guestfs_swapon_device>."
11700 #: ../src/guestfs-actions.pod:4608
11701 msgid "guestfs_swapoff_file"
11705 #: ../src/guestfs-actions.pod:4610
11708 " int guestfs_swapoff_file (guestfs_h *g,\n"
11709 "\t\tconst char *file);\n"
11714 #: ../src/guestfs-actions.pod:4613 ../fish/guestfish-actions.pod:3559
11715 msgid "This command disables the libguestfs appliance swap on file."
11719 #: ../src/guestfs-actions.pod:4617
11720 msgid "guestfs_swapoff_label"
11724 #: ../src/guestfs-actions.pod:4619
11727 " int guestfs_swapoff_label (guestfs_h *g,\n"
11728 "\t\tconst char *label);\n"
11733 #: ../src/guestfs-actions.pod:4622 ../fish/guestfish-actions.pod:3565
11735 "This command disables the libguestfs appliance swap on labeled swap "
11740 #: ../src/guestfs-actions.pod:4627
11741 msgid "guestfs_swapoff_uuid"
11745 #: ../src/guestfs-actions.pod:4629
11748 " int guestfs_swapoff_uuid (guestfs_h *g,\n"
11749 "\t\tconst char *uuid);\n"
11754 #: ../src/guestfs-actions.pod:4632 ../fish/guestfish-actions.pod:3572
11756 "This command disables the libguestfs appliance swap partition with the given "
11761 #: ../src/guestfs-actions.pod:4637
11762 msgid "guestfs_swapon_device"
11766 #: ../src/guestfs-actions.pod:4639
11769 " int guestfs_swapon_device (guestfs_h *g,\n"
11770 "\t\tconst char *device);\n"
11775 #: ../src/guestfs-actions.pod:4642
11777 "This command enables the libguestfs appliance to use the swap device or "
11778 "partition named C<device>. The increased memory is made available for all "
11779 "commands, for example those run using C<guestfs_command> or C<guestfs_sh>."
11783 #: ../src/guestfs-actions.pod:4647 ../fish/guestfish-actions.pod:3584
11785 "Note that you should not swap to existing guest swap partitions unless you "
11786 "know what you are doing. They may contain hibernation information, or other "
11787 "information that the guest doesn't want you to trash. You also risk leaking "
11788 "information about the host to the guest this way. Instead, attach a new "
11789 "host device to the guest and swap on that."
11793 #: ../src/guestfs-actions.pod:4656
11794 msgid "guestfs_swapon_file"
11798 #: ../src/guestfs-actions.pod:4658
11801 " int guestfs_swapon_file (guestfs_h *g,\n"
11802 "\t\tconst char *file);\n"
11807 #: ../src/guestfs-actions.pod:4661
11809 "This command enables swap to a file. See C<guestfs_swapon_device> for other "
11814 #: ../src/guestfs-actions.pod:4666
11815 msgid "guestfs_swapon_label"
11819 #: ../src/guestfs-actions.pod:4668
11822 " int guestfs_swapon_label (guestfs_h *g,\n"
11823 "\t\tconst char *label);\n"
11828 #: ../src/guestfs-actions.pod:4671
11830 "This command enables swap to a labeled swap partition. See "
11831 "C<guestfs_swapon_device> for other notes."
11835 #: ../src/guestfs-actions.pod:4676
11836 msgid "guestfs_swapon_uuid"
11840 #: ../src/guestfs-actions.pod:4678
11843 " int guestfs_swapon_uuid (guestfs_h *g,\n"
11844 "\t\tconst char *uuid);\n"
11849 #: ../src/guestfs-actions.pod:4681
11851 "This command enables swap to a swap partition with the given UUID. See "
11852 "C<guestfs_swapon_device> for other notes."
11856 #: ../src/guestfs-actions.pod:4686
11857 msgid "guestfs_sync"
11861 #: ../src/guestfs-actions.pod:4688
11864 " int guestfs_sync (guestfs_h *g);\n"
11869 #: ../src/guestfs-actions.pod:4690 ../fish/guestfish-actions.pod:3616
11871 "This syncs the disk, so that any writes are flushed through to the "
11872 "underlying disk image."
11876 #: ../src/guestfs-actions.pod:4693 ../fish/guestfish-actions.pod:3619
11878 "You should always call this if you have modified a disk image, before "
11879 "closing the handle."
11883 #: ../src/guestfs-actions.pod:4698
11884 msgid "guestfs_tail"
11888 #: ../src/guestfs-actions.pod:4700
11891 " char **guestfs_tail (guestfs_h *g,\n"
11892 "\t\tconst char *path);\n"
11897 #: ../src/guestfs-actions.pod:4703 ../fish/guestfish-actions.pod:3626
11898 msgid "This command returns up to the last 10 lines of a file as a list of strings."
11902 #: ../src/guestfs-actions.pod:4713
11903 msgid "guestfs_tail_n"
11907 #: ../src/guestfs-actions.pod:4715
11910 " char **guestfs_tail_n (guestfs_h *g,\n"
11911 "\t\tint nrlines,\n"
11912 "\t\tconst char *path);\n"
11917 #: ../src/guestfs-actions.pod:4719 ../fish/guestfish-actions.pod:3636
11919 "If the parameter C<nrlines> is a positive number, this returns the last "
11920 "C<nrlines> lines of the file C<path>."
11924 #: ../src/guestfs-actions.pod:4722 ../fish/guestfish-actions.pod:3639
11926 "If the parameter C<nrlines> is a negative number, this returns lines from "
11927 "the file C<path>, starting with the C<-nrlines>th line."
11931 #: ../src/guestfs-actions.pod:4734
11932 msgid "guestfs_tar_in"
11936 #: ../src/guestfs-actions.pod:4736
11939 " int guestfs_tar_in (guestfs_h *g,\n"
11940 "\t\tconst char *tarfile,\n"
11941 "\t\tconst char *directory);\n"
11946 #: ../src/guestfs-actions.pod:4740 ../fish/guestfish-actions.pod:3651
11948 "This command uploads and unpacks local file C<tarfile> (an I<uncompressed> "
11949 "tar file) into C<directory>."
11953 #: ../src/guestfs-actions.pod:4743
11954 msgid "To upload a compressed tarball, use C<guestfs_tgz_in> or C<guestfs_txz_in>."
11958 #: ../src/guestfs-actions.pod:4748
11959 msgid "guestfs_tar_out"
11963 #: ../src/guestfs-actions.pod:4750
11966 " int guestfs_tar_out (guestfs_h *g,\n"
11967 "\t\tconst char *directory,\n"
11968 "\t\tconst char *tarfile);\n"
11973 #: ../src/guestfs-actions.pod:4754 ../fish/guestfish-actions.pod:3663
11975 "This command packs the contents of C<directory> and downloads it to local "
11980 #: ../src/guestfs-actions.pod:4757
11982 "To download a compressed tarball, use C<guestfs_tgz_out> or "
11983 "C<guestfs_txz_out>."
11987 #: ../src/guestfs-actions.pod:4762
11988 msgid "guestfs_tgz_in"
11992 #: ../src/guestfs-actions.pod:4764
11995 " int guestfs_tgz_in (guestfs_h *g,\n"
11996 "\t\tconst char *tarball,\n"
11997 "\t\tconst char *directory);\n"
12002 #: ../src/guestfs-actions.pod:4768 ../fish/guestfish-actions.pod:3675
12004 "This command uploads and unpacks local file C<tarball> (a I<gzip compressed> "
12005 "tar file) into C<directory>."
12009 #: ../src/guestfs-actions.pod:4771
12010 msgid "To upload an uncompressed tarball, use C<guestfs_tar_in>."
12014 #: ../src/guestfs-actions.pod:4775
12015 msgid "guestfs_tgz_out"
12019 #: ../src/guestfs-actions.pod:4777
12022 " int guestfs_tgz_out (guestfs_h *g,\n"
12023 "\t\tconst char *directory,\n"
12024 "\t\tconst char *tarball);\n"
12029 #: ../src/guestfs-actions.pod:4781 ../fish/guestfish-actions.pod:3686
12031 "This command packs the contents of C<directory> and downloads it to local "
12036 #: ../src/guestfs-actions.pod:4784
12037 msgid "To download an uncompressed tarball, use C<guestfs_tar_out>."
12041 #: ../src/guestfs-actions.pod:4788
12042 msgid "guestfs_touch"
12046 #: ../src/guestfs-actions.pod:4790
12049 " int guestfs_touch (guestfs_h *g,\n"
12050 "\t\tconst char *path);\n"
12055 #: ../src/guestfs-actions.pod:4793 ../fish/guestfish-actions.pod:3697
12057 "Touch acts like the L<touch(1)> command. It can be used to update the "
12058 "timestamps on a file, or, if the file does not exist, to create a new "
12059 "zero-length file."
12063 #: ../src/guestfs-actions.pod:4797 ../fish/guestfish-actions.pod:3701
12065 "This command only works on regular files, and will fail on other file types "
12066 "such as directories, symbolic links, block special etc."
12070 #: ../src/guestfs-actions.pod:4802
12071 msgid "guestfs_truncate"
12075 #: ../src/guestfs-actions.pod:4804
12078 " int guestfs_truncate (guestfs_h *g,\n"
12079 "\t\tconst char *path);\n"
12084 #: ../src/guestfs-actions.pod:4807 ../fish/guestfish-actions.pod:3708
12086 "This command truncates C<path> to a zero-length file. The file must exist "
12091 #: ../src/guestfs-actions.pod:4812
12092 msgid "guestfs_truncate_size"
12096 #: ../src/guestfs-actions.pod:4814
12099 " int guestfs_truncate_size (guestfs_h *g,\n"
12100 "\t\tconst char *path,\n"
12101 "\t\tint64_t size);\n"
12106 #: ../src/guestfs-actions.pod:4818 ../fish/guestfish-actions.pod:3715
12108 "This command truncates C<path> to size C<size> bytes. The file must exist "
12113 #: ../src/guestfs-actions.pod:4821
12115 "If the current file size is less than C<size> then the file is extended to "
12116 "the required size with zero bytes. This creates a sparse file (ie. disk "
12117 "blocks are not allocated for the file until you write to it). To create a "
12118 "non-sparse file of zeroes, use C<guestfs_fallocate64> instead."
12122 #: ../src/guestfs-actions.pod:4829
12123 msgid "guestfs_tune2fs_l"
12127 #: ../src/guestfs-actions.pod:4831
12130 " char **guestfs_tune2fs_l (guestfs_h *g,\n"
12131 "\t\tconst char *device);\n"
12136 #: ../src/guestfs-actions.pod:4834 ../fish/guestfish-actions.pod:3728
12138 "This returns the contents of the ext2, ext3 or ext4 filesystem superblock on "
12143 #: ../src/guestfs-actions.pod:4837 ../fish/guestfish-actions.pod:3731
12145 "It is the same as running C<tune2fs -l device>. See L<tune2fs(8)> manpage "
12146 "for more details. The list of fields returned isn't clearly defined, and "
12147 "depends on both the version of C<tune2fs> that libguestfs was built against, "
12148 "and the filesystem itself."
12152 #: ../src/guestfs-actions.pod:4848
12153 msgid "guestfs_txz_in"
12157 #: ../src/guestfs-actions.pod:4850
12160 " int guestfs_txz_in (guestfs_h *g,\n"
12161 "\t\tconst char *tarball,\n"
12162 "\t\tconst char *directory);\n"
12167 #: ../src/guestfs-actions.pod:4854 ../fish/guestfish-actions.pod:3740
12169 "This command uploads and unpacks local file C<tarball> (an I<xz compressed> "
12170 "tar file) into C<directory>."
12174 #: ../src/guestfs-actions.pod:4859
12175 msgid "guestfs_txz_out"
12179 #: ../src/guestfs-actions.pod:4861
12182 " int guestfs_txz_out (guestfs_h *g,\n"
12183 "\t\tconst char *directory,\n"
12184 "\t\tconst char *tarball);\n"
12189 #: ../src/guestfs-actions.pod:4865 ../fish/guestfish-actions.pod:3749
12191 "This command packs the contents of C<directory> and downloads it to local "
12192 "file C<tarball> (as an xz compressed tar archive)."
12196 #: ../src/guestfs-actions.pod:4870
12197 msgid "guestfs_umask"
12201 #: ../src/guestfs-actions.pod:4872
12204 " int guestfs_umask (guestfs_h *g,\n"
12210 #: ../src/guestfs-actions.pod:4875 ../fish/guestfish-actions.pod:3758
12212 "This function sets the mask used for creating new files and device nodes to "
12217 #: ../src/guestfs-actions.pod:4878 ../fish/guestfish-actions.pod:3761
12219 "Typical umask values would be C<022> which creates new files with "
12220 "permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and C<002> which creates "
12221 "new files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\"."
12225 #: ../src/guestfs-actions.pod:4883 ../fish/guestfish-actions.pod:3766
12227 "The default umask is C<022>. This is important because it means that "
12228 "directories and device nodes will be created with C<0644> or C<0755> mode "
12229 "even if you specify C<0777>."
12233 #: ../src/guestfs-actions.pod:4887
12235 "See also C<guestfs_get_umask>, L<umask(2)>, C<guestfs_mknod>, "
12236 "C<guestfs_mkdir>."
12240 #: ../src/guestfs-actions.pod:4890 ../fish/guestfish-actions.pod:3773
12241 msgid "This call returns the previous umask."
12245 #: ../src/guestfs-actions.pod:4894
12246 msgid "guestfs_umount"
12250 #: ../src/guestfs-actions.pod:4896
12253 " int guestfs_umount (guestfs_h *g,\n"
12254 "\t\tconst char *pathordevice);\n"
12259 #: ../src/guestfs-actions.pod:4899 ../fish/guestfish-actions.pod:3779
12261 "This unmounts the given filesystem. The filesystem may be specified either "
12262 "by its mountpoint (path) or the device which contains the filesystem."
12266 #: ../src/guestfs-actions.pod:4905
12267 msgid "guestfs_umount_all"
12271 #: ../src/guestfs-actions.pod:4907
12274 " int guestfs_umount_all (guestfs_h *g);\n"
12279 #: ../src/guestfs-actions.pod:4909 ../fish/guestfish-actions.pod:3787
12280 msgid "This unmounts all mounted filesystems."
12284 #: ../src/guestfs-actions.pod:4911 ../fish/guestfish-actions.pod:3789
12285 msgid "Some internal mounts are not unmounted by this call."
12289 #: ../src/guestfs-actions.pod:4915
12290 msgid "guestfs_upload"
12294 #: ../src/guestfs-actions.pod:4917
12297 " int guestfs_upload (guestfs_h *g,\n"
12298 "\t\tconst char *filename,\n"
12299 "\t\tconst char *remotefilename);\n"
12304 #: ../src/guestfs-actions.pod:4921 ../fish/guestfish-actions.pod:3795
12305 msgid "Upload local file C<filename> to C<remotefilename> on the filesystem."
12309 #: ../src/guestfs-actions.pod:4926
12310 msgid "See also C<guestfs_download>."
12314 #: ../src/guestfs-actions.pod:4930
12315 msgid "guestfs_utimens"
12319 #: ../src/guestfs-actions.pod:4932
12322 " int guestfs_utimens (guestfs_h *g,\n"
12323 "\t\tconst char *path,\n"
12324 "\t\tint64_t atsecs,\n"
12325 "\t\tint64_t atnsecs,\n"
12326 "\t\tint64_t mtsecs,\n"
12327 "\t\tint64_t mtnsecs);\n"
12332 #: ../src/guestfs-actions.pod:4939 ../fish/guestfish-actions.pod:3808
12333 msgid "This command sets the timestamps of a file with nanosecond precision."
12337 #: ../src/guestfs-actions.pod:4942 ../fish/guestfish-actions.pod:3811
12339 "C<atsecs, atnsecs> are the last access time (atime) in secs and nanoseconds "
12344 #: ../src/guestfs-actions.pod:4945 ../fish/guestfish-actions.pod:3814
12346 "C<mtsecs, mtnsecs> are the last modification time (mtime) in secs and "
12347 "nanoseconds from the epoch."
12351 #: ../src/guestfs-actions.pod:4948 ../fish/guestfish-actions.pod:3817
12353 "If the C<*nsecs> field contains the special value C<-1> then the "
12354 "corresponding timestamp is set to the current time. (The C<*secs> field is "
12355 "ignored in this case)."
12359 #: ../src/guestfs-actions.pod:4952 ../fish/guestfish-actions.pod:3821
12361 "If the C<*nsecs> field contains the special value C<-2> then the "
12362 "corresponding timestamp is left unchanged. (The C<*secs> field is ignored "
12367 #: ../src/guestfs-actions.pod:4958 ../src/guestfs-structs.pod:175
12368 msgid "guestfs_version"
12372 #: ../src/guestfs-actions.pod:4960
12375 " struct guestfs_version *guestfs_version (guestfs_h *g);\n"
12380 #: ../src/guestfs-actions.pod:4962 ../fish/guestfish-actions.pod:3829
12381 msgid "Return the libguestfs version number that the program is linked against."
12385 #: ../src/guestfs-actions.pod:4965 ../fish/guestfish-actions.pod:3832
12387 "Note that because of dynamic linking this is not necessarily the version of "
12388 "libguestfs that you compiled against. You can compile the program, and then "
12389 "at runtime dynamically link against a completely different C<libguestfs.so> "
12394 #: ../src/guestfs-actions.pod:4970 ../fish/guestfish-actions.pod:3837
12396 "This call was added in version C<1.0.58>. In previous versions of "
12397 "libguestfs there was no way to get the version number. From C code you can "
12398 "use dynamic linker functions to find out if this symbol exists (if it "
12399 "doesn't, then it's an earlier version)."
12403 #: ../src/guestfs-actions.pod:4976 ../fish/guestfish-actions.pod:3843
12405 "The call returns a structure with four elements. The first three (C<major>, "
12406 "C<minor> and C<release>) are numbers and correspond to the usual version "
12407 "triplet. The fourth element (C<extra>) is a string and is normally empty, "
12408 "but may be used for distro-specific information."
12412 #: ../src/guestfs-actions.pod:4982 ../fish/guestfish-actions.pod:3849
12413 msgid "To construct the original version string: C<$major.$minor.$release$extra>"
12417 #: ../src/guestfs-actions.pod:4985 ../fish/guestfish-actions.pod:3852
12418 msgid "See also: L<guestfs(3)/LIBGUESTFS VERSION NUMBERS>."
12422 #: ../src/guestfs-actions.pod:4987
12424 "I<Note:> Don't use this call to test for availability of features. In "
12425 "enterprise distributions we backport features from later versions into "
12426 "earlier versions, making this an unreliable way to test for features. Use "
12427 "C<guestfs_available> instead."
12431 #: ../src/guestfs-actions.pod:4993
12433 "This function returns a C<struct guestfs_version *>, or NULL if there was an "
12434 "error. I<The caller must call C<guestfs_free_version> after use>."
12438 #: ../src/guestfs-actions.pod:4997
12439 msgid "guestfs_vfs_label"
12443 #: ../src/guestfs-actions.pod:4999
12446 " char *guestfs_vfs_label (guestfs_h *g,\n"
12447 "\t\tconst char *device);\n"
12452 #: ../src/guestfs-actions.pod:5002 ../fish/guestfish-actions.pod:3864
12453 msgid "This returns the filesystem label of the filesystem on C<device>."
12457 #: ../src/guestfs-actions.pod:5005 ../fish/guestfish-actions.pod:3867
12458 msgid "If the filesystem is unlabeled, this returns the empty string."
12462 #: ../src/guestfs-actions.pod:5007
12463 msgid "To find a filesystem from the label, use C<guestfs_findfs_label>."
12467 #: ../src/guestfs-actions.pod:5012
12468 msgid "guestfs_vfs_type"
12472 #: ../src/guestfs-actions.pod:5014
12475 " char *guestfs_vfs_type (guestfs_h *g,\n"
12476 "\t\tconst char *device);\n"
12481 #: ../src/guestfs-actions.pod:5017 ../fish/guestfish-actions.pod:3875
12483 "This command gets the filesystem type corresponding to the filesystem on "
12488 #: ../src/guestfs-actions.pod:5020 ../fish/guestfish-actions.pod:3878
12490 "For most filesystems, the result is the name of the Linux VFS module which "
12491 "would be used to mount this filesystem if you mounted it without specifying "
12492 "the filesystem type. For example a string such as C<ext3> or C<ntfs>."
12496 #: ../src/guestfs-actions.pod:5028
12497 msgid "guestfs_vfs_uuid"
12501 #: ../src/guestfs-actions.pod:5030
12504 " char *guestfs_vfs_uuid (guestfs_h *g,\n"
12505 "\t\tconst char *device);\n"
12510 #: ../src/guestfs-actions.pod:5033 ../fish/guestfish-actions.pod:3887
12511 msgid "This returns the filesystem UUID of the filesystem on C<device>."
12515 #: ../src/guestfs-actions.pod:5036 ../fish/guestfish-actions.pod:3890
12516 msgid "If the filesystem does not have a UUID, this returns the empty string."
12520 #: ../src/guestfs-actions.pod:5038
12521 msgid "To find a filesystem from the UUID, use C<guestfs_findfs_uuid>."
12525 #: ../src/guestfs-actions.pod:5043
12526 msgid "guestfs_vg_activate"
12530 #: ../src/guestfs-actions.pod:5045
12533 " int guestfs_vg_activate (guestfs_h *g,\n"
12534 "\t\tint activate,\n"
12535 "\t\tchar *const *volgroups);\n"
12540 #: ../src/guestfs-actions.pod:5049 ../fish/guestfish-actions.pod:3898
12542 "This command activates or (if C<activate> is false) deactivates all logical "
12543 "volumes in the listed volume groups C<volgroups>. If activated, then they "
12544 "are made known to the kernel, ie. they appear as C</dev/mapper> devices. If "
12545 "deactivated, then those devices disappear."
12549 #: ../src/guestfs-actions.pod:5055 ../fish/guestfish-actions.pod:3904
12550 msgid "This command is the same as running C<vgchange -a y|n volgroups...>"
12554 #: ../src/guestfs-actions.pod:5057 ../fish/guestfish-actions.pod:3906
12556 "Note that if C<volgroups> is an empty list then B<all> volume groups are "
12557 "activated or deactivated."
12561 #: ../src/guestfs-actions.pod:5062
12562 msgid "guestfs_vg_activate_all"
12566 #: ../src/guestfs-actions.pod:5064
12569 " int guestfs_vg_activate_all (guestfs_h *g,\n"
12570 "\t\tint activate);\n"
12575 #: ../src/guestfs-actions.pod:5067 ../fish/guestfish-actions.pod:3913
12577 "This command activates or (if C<activate> is false) deactivates all logical "
12578 "volumes in all volume groups. If activated, then they are made known to the "
12579 "kernel, ie. they appear as C</dev/mapper> devices. If deactivated, then "
12580 "those devices disappear."
12584 #: ../src/guestfs-actions.pod:5073 ../fish/guestfish-actions.pod:3919
12585 msgid "This command is the same as running C<vgchange -a y|n>"
12589 #: ../src/guestfs-actions.pod:5077
12590 msgid "guestfs_vgcreate"
12594 #: ../src/guestfs-actions.pod:5079
12597 " int guestfs_vgcreate (guestfs_h *g,\n"
12598 "\t\tconst char *volgroup,\n"
12599 "\t\tchar *const *physvols);\n"
12604 #: ../src/guestfs-actions.pod:5083 ../fish/guestfish-actions.pod:3925
12606 "This creates an LVM volume group called C<volgroup> from the non-empty list "
12607 "of physical volumes C<physvols>."
12611 #: ../src/guestfs-actions.pod:5088
12612 msgid "guestfs_vglvuuids"
12616 #: ../src/guestfs-actions.pod:5090
12619 " char **guestfs_vglvuuids (guestfs_h *g,\n"
12620 "\t\tconst char *vgname);\n"
12625 #: ../src/guestfs-actions.pod:5093 ../fish/guestfish-actions.pod:3932
12627 "Given a VG called C<vgname>, this returns the UUIDs of all the logical "
12628 "volumes created in this volume group."
12632 #: ../src/guestfs-actions.pod:5096
12634 "You can use this along with C<guestfs_lvs> and C<guestfs_lvuuid> calls to "
12635 "associate logical volumes and volume groups."
12639 #: ../src/guestfs-actions.pod:5099
12640 msgid "See also C<guestfs_vgpvuuids>."
12644 #: ../src/guestfs-actions.pod:5105
12645 msgid "guestfs_vgpvuuids"
12649 #: ../src/guestfs-actions.pod:5107
12652 " char **guestfs_vgpvuuids (guestfs_h *g,\n"
12653 "\t\tconst char *vgname);\n"
12658 #: ../src/guestfs-actions.pod:5110 ../fish/guestfish-actions.pod:3944
12660 "Given a VG called C<vgname>, this returns the UUIDs of all the physical "
12661 "volumes that this volume group resides on."
12665 #: ../src/guestfs-actions.pod:5113
12667 "You can use this along with C<guestfs_pvs> and C<guestfs_pvuuid> calls to "
12668 "associate physical volumes and volume groups."
12672 #: ../src/guestfs-actions.pod:5116
12673 msgid "See also C<guestfs_vglvuuids>."
12677 #: ../src/guestfs-actions.pod:5122
12678 msgid "guestfs_vgremove"
12682 #: ../src/guestfs-actions.pod:5124
12685 " int guestfs_vgremove (guestfs_h *g,\n"
12686 "\t\tconst char *vgname);\n"
12691 #: ../src/guestfs-actions.pod:5127 ../fish/guestfish-actions.pod:3956
12692 msgid "Remove an LVM volume group C<vgname>, (for example C<VG>)."
12696 #: ../src/guestfs-actions.pod:5129 ../fish/guestfish-actions.pod:3958
12697 msgid "This also forcibly removes all logical volumes in the volume group (if any)."
12701 #: ../src/guestfs-actions.pod:5134
12702 msgid "guestfs_vgrename"
12706 #: ../src/guestfs-actions.pod:5136
12709 " int guestfs_vgrename (guestfs_h *g,\n"
12710 "\t\tconst char *volgroup,\n"
12711 "\t\tconst char *newvolgroup);\n"
12716 #: ../src/guestfs-actions.pod:5140 ../fish/guestfish-actions.pod:3965
12717 msgid "Rename a volume group C<volgroup> with the new name C<newvolgroup>."
12721 #: ../src/guestfs-actions.pod:5144
12722 msgid "guestfs_vgs"
12726 #: ../src/guestfs-actions.pod:5146
12729 " char **guestfs_vgs (guestfs_h *g);\n"
12734 #: ../src/guestfs-actions.pod:5148 ../fish/guestfish-actions.pod:3971
12736 "List all the volumes groups detected. This is the equivalent of the "
12737 "L<vgs(8)> command."
12741 #: ../src/guestfs-actions.pod:5151 ../fish/guestfish-actions.pod:3974
12743 "This returns a list of just the volume group names that were detected "
12744 "(eg. C<VolGroup00>)."
12748 #: ../src/guestfs-actions.pod:5154
12749 msgid "See also C<guestfs_vgs_full>."
12753 #: ../src/guestfs-actions.pod:5160
12754 msgid "guestfs_vgs_full"
12758 #: ../src/guestfs-actions.pod:5162
12761 " struct guestfs_lvm_vg_list *guestfs_vgs_full (guestfs_h *g);\n"
12766 #: ../src/guestfs-actions.pod:5164 ../fish/guestfish-actions.pod:3983
12768 "List all the volumes groups detected. This is the equivalent of the "
12769 "L<vgs(8)> command. The \"full\" version includes all fields."
12773 #: ../src/guestfs-actions.pod:5167
12775 "This function returns a C<struct guestfs_lvm_vg_list *> (see "
12776 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
12777 "must call C<guestfs_free_lvm_vg_list> after use>."
12781 #: ../src/guestfs-actions.pod:5172
12782 msgid "guestfs_vgscan"
12786 #: ../src/guestfs-actions.pod:5174
12789 " int guestfs_vgscan (guestfs_h *g);\n"
12794 #: ../src/guestfs-actions.pod:5176 ../fish/guestfish-actions.pod:3990
12796 "This rescans all block devices and rebuilds the list of LVM physical "
12797 "volumes, volume groups and logical volumes."
12801 #: ../src/guestfs-actions.pod:5181
12802 msgid "guestfs_vguuid"
12806 #: ../src/guestfs-actions.pod:5183
12809 " char *guestfs_vguuid (guestfs_h *g,\n"
12810 "\t\tconst char *vgname);\n"
12815 #: ../src/guestfs-actions.pod:5186 ../fish/guestfish-actions.pod:3997
12816 msgid "This command returns the UUID of the LVM VG named C<vgname>."
12820 #: ../src/guestfs-actions.pod:5191
12821 msgid "guestfs_wait_ready"
12825 #: ../src/guestfs-actions.pod:5193
12828 " int guestfs_wait_ready (guestfs_h *g);\n"
12833 #: ../src/guestfs-actions.pod:5195
12834 msgid "This function is a no op."
12838 #: ../src/guestfs-actions.pod:5197
12840 "In versions of the API E<lt> 1.0.71 you had to call this function just after "
12841 "calling C<guestfs_launch> to wait for the launch to complete. However this "
12842 "is no longer necessary because C<guestfs_launch> now does the waiting."
12846 #: ../src/guestfs-actions.pod:5202
12848 "If you see any calls to this function in code then you can just remove them, "
12849 "unless you want to retain compatibility with older versions of the API."
12853 #: ../src/guestfs-actions.pod:5208
12854 msgid "guestfs_wc_c"
12858 #: ../src/guestfs-actions.pod:5210
12861 " int guestfs_wc_c (guestfs_h *g,\n"
12862 "\t\tconst char *path);\n"
12867 #: ../src/guestfs-actions.pod:5213 ../fish/guestfish-actions.pod:4003
12869 "This command counts the characters in a file, using the C<wc -c> external "
12874 #: ../src/guestfs-actions.pod:5218
12875 msgid "guestfs_wc_l"
12879 #: ../src/guestfs-actions.pod:5220
12882 " int guestfs_wc_l (guestfs_h *g,\n"
12883 "\t\tconst char *path);\n"
12888 #: ../src/guestfs-actions.pod:5223 ../fish/guestfish-actions.pod:4010
12890 "This command counts the lines in a file, using the C<wc -l> external "
12895 #: ../src/guestfs-actions.pod:5228
12896 msgid "guestfs_wc_w"
12900 #: ../src/guestfs-actions.pod:5230
12903 " int guestfs_wc_w (guestfs_h *g,\n"
12904 "\t\tconst char *path);\n"
12909 #: ../src/guestfs-actions.pod:5233 ../fish/guestfish-actions.pod:4017
12911 "This command counts the words in a file, using the C<wc -w> external "
12916 #: ../src/guestfs-actions.pod:5238
12917 msgid "guestfs_write"
12921 #: ../src/guestfs-actions.pod:5240
12924 " int guestfs_write (guestfs_h *g,\n"
12925 "\t\tconst char *path,\n"
12926 "\t\tconst char *content,\n"
12927 "\t\tsize_t content_size);\n"
12932 #: ../src/guestfs-actions.pod:5245 ../fish/guestfish-actions.pod:4024
12934 "This call creates a file called C<path>. The content of the file is the "
12935 "string C<content> (which can contain any 8 bit data)."
12939 #: ../src/guestfs-actions.pod:5253
12940 msgid "guestfs_write_file"
12944 #: ../src/guestfs-actions.pod:5255
12947 " int guestfs_write_file (guestfs_h *g,\n"
12948 "\t\tconst char *path,\n"
12949 "\t\tconst char *content,\n"
12955 #: ../src/guestfs-actions.pod:5260 ../fish/guestfish-actions.pod:4034
12957 "This call creates a file called C<path>. The contents of the file is the "
12958 "string C<content> (which can contain any 8 bit data), with length C<size>."
12962 #: ../src/guestfs-actions.pod:5264 ../fish/guestfish-actions.pod:4038
12964 "As a special case, if C<size> is C<0> then the length is calculated using "
12965 "C<strlen> (so in this case the content cannot contain embedded ASCII NULs)."
12969 #: ../src/guestfs-actions.pod:5268 ../fish/guestfish-actions.pod:4042
12971 "I<NB.> Owing to a bug, writing content containing ASCII NUL characters does "
12972 "I<not> work, even if the length is specified."
12976 #: ../src/guestfs-actions.pod:5276 ../fish/guestfish-actions.pod:4048
12977 msgid "This function is deprecated. In new code, use the C<write> call instead."
12981 #: ../src/guestfs-actions.pod:5283
12982 msgid "guestfs_zegrep"
12986 #: ../src/guestfs-actions.pod:5285
12989 " char **guestfs_zegrep (guestfs_h *g,\n"
12990 "\t\tconst char *regex,\n"
12991 "\t\tconst char *path);\n"
12996 #: ../src/guestfs-actions.pod:5289 ../fish/guestfish-actions.pod:4059
12997 msgid "This calls the external C<zegrep> program and returns the matching lines."
13001 #: ../src/guestfs-actions.pod:5299
13002 msgid "guestfs_zegrepi"
13006 #: ../src/guestfs-actions.pod:5301
13009 " char **guestfs_zegrepi (guestfs_h *g,\n"
13010 "\t\tconst char *regex,\n"
13011 "\t\tconst char *path);\n"
13016 #: ../src/guestfs-actions.pod:5305 ../fish/guestfish-actions.pod:4069
13017 msgid "This calls the external C<zegrep -i> program and returns the matching lines."
13021 #: ../src/guestfs-actions.pod:5315
13022 msgid "guestfs_zero"
13026 #: ../src/guestfs-actions.pod:5317
13029 " int guestfs_zero (guestfs_h *g,\n"
13030 "\t\tconst char *device);\n"
13035 #: ../src/guestfs-actions.pod:5320 ../fish/guestfish-actions.pod:4079
13036 msgid "This command writes zeroes over the first few blocks of C<device>."
13040 #: ../src/guestfs-actions.pod:5322 ../fish/guestfish-actions.pod:4081
13042 "How many blocks are zeroed isn't specified (but it's I<not> enough to "
13043 "securely wipe the device). It should be sufficient to remove any partition "
13044 "tables, filesystem superblocks and so on."
13048 #: ../src/guestfs-actions.pod:5326
13049 msgid "See also: C<guestfs_zero_device>, C<guestfs_scrub_device>."
13053 #: ../src/guestfs-actions.pod:5335
13054 msgid "guestfs_zero_device"
13058 #: ../src/guestfs-actions.pod:5337
13061 " int guestfs_zero_device (guestfs_h *g,\n"
13062 "\t\tconst char *device);\n"
13067 #: ../src/guestfs-actions.pod:5340
13069 "This command writes zeroes over the entire C<device>. Compare with "
13070 "C<guestfs_zero> which just zeroes the first few blocks of a device."
13074 #: ../src/guestfs-actions.pod:5354
13075 msgid "guestfs_zerofree"
13079 #: ../src/guestfs-actions.pod:5356
13082 " int guestfs_zerofree (guestfs_h *g,\n"
13083 "\t\tconst char *device);\n"
13088 #: ../src/guestfs-actions.pod:5359 ../fish/guestfish-actions.pod:4102
13090 "This runs the I<zerofree> program on C<device>. This program claims to zero "
13091 "unused inodes and disk blocks on an ext2/3 filesystem, thus making it "
13092 "possible to compress the filesystem more effectively."
13096 #: ../src/guestfs-actions.pod:5364 ../fish/guestfish-actions.pod:4107
13097 msgid "You should B<not> run this program if the filesystem is mounted."
13101 #: ../src/guestfs-actions.pod:5367 ../fish/guestfish-actions.pod:4110
13103 "It is possible that using this program can damage the filesystem or data on "
13108 #: ../src/guestfs-actions.pod:5372
13109 msgid "guestfs_zfgrep"
13113 #: ../src/guestfs-actions.pod:5374
13116 " char **guestfs_zfgrep (guestfs_h *g,\n"
13117 "\t\tconst char *pattern,\n"
13118 "\t\tconst char *path);\n"
13123 #: ../src/guestfs-actions.pod:5378 ../fish/guestfish-actions.pod:4117
13124 msgid "This calls the external C<zfgrep> program and returns the matching lines."
13128 #: ../src/guestfs-actions.pod:5388
13129 msgid "guestfs_zfgrepi"
13133 #: ../src/guestfs-actions.pod:5390
13136 " char **guestfs_zfgrepi (guestfs_h *g,\n"
13137 "\t\tconst char *pattern,\n"
13138 "\t\tconst char *path);\n"
13143 #: ../src/guestfs-actions.pod:5394 ../fish/guestfish-actions.pod:4127
13144 msgid "This calls the external C<zfgrep -i> program and returns the matching lines."
13148 #: ../src/guestfs-actions.pod:5404
13149 msgid "guestfs_zfile"
13153 #: ../src/guestfs-actions.pod:5406
13156 " char *guestfs_zfile (guestfs_h *g,\n"
13157 "\t\tconst char *meth,\n"
13158 "\t\tconst char *path);\n"
13163 #: ../src/guestfs-actions.pod:5410 ../fish/guestfish-actions.pod:4137
13164 msgid "This command runs C<file> after first decompressing C<path> using C<method>."
13168 #: ../src/guestfs-actions.pod:5413 ../fish/guestfish-actions.pod:4140
13169 msgid "C<method> must be one of C<gzip>, C<compress> or C<bzip2>."
13173 #: ../src/guestfs-actions.pod:5415
13175 "Since 1.0.63, use C<guestfs_file> instead which can now process compressed "
13180 #: ../src/guestfs-actions.pod:5421 ../fish/guestfish-actions.pod:4145
13181 msgid "This function is deprecated. In new code, use the C<file> call instead."
13185 #: ../src/guestfs-actions.pod:5428
13186 msgid "guestfs_zgrep"
13190 #: ../src/guestfs-actions.pod:5430
13193 " char **guestfs_zgrep (guestfs_h *g,\n"
13194 "\t\tconst char *regex,\n"
13195 "\t\tconst char *path);\n"
13200 #: ../src/guestfs-actions.pod:5434 ../fish/guestfish-actions.pod:4156
13201 msgid "This calls the external C<zgrep> program and returns the matching lines."
13205 #: ../src/guestfs-actions.pod:5444
13206 msgid "guestfs_zgrepi"
13210 #: ../src/guestfs-actions.pod:5446
13213 " char **guestfs_zgrepi (guestfs_h *g,\n"
13214 "\t\tconst char *regex,\n"
13215 "\t\tconst char *path);\n"
13220 #: ../src/guestfs-actions.pod:5450 ../fish/guestfish-actions.pod:4166
13221 msgid "This calls the external C<zgrep -i> program and returns the matching lines."
13225 #: ../src/guestfs-availability.pod:3
13230 #: ../src/guestfs-availability.pod:5
13232 "The following functions: L</guestfs_aug_clear> L</guestfs_aug_close> "
13233 "L</guestfs_aug_defnode> L</guestfs_aug_defvar> L</guestfs_aug_get> "
13234 "L</guestfs_aug_init> L</guestfs_aug_insert> L</guestfs_aug_load> "
13235 "L</guestfs_aug_ls> L</guestfs_aug_match> L</guestfs_aug_mv> "
13236 "L</guestfs_aug_rm> L</guestfs_aug_save> L</guestfs_aug_set>"
13240 #: ../src/guestfs-availability.pod:21
13245 #: ../src/guestfs-availability.pod:23
13247 "The following functions: L</guestfs_inotify_add_watch> "
13248 "L</guestfs_inotify_close> L</guestfs_inotify_files> L</guestfs_inotify_init> "
13249 "L</guestfs_inotify_read> L</guestfs_inotify_rm_watch>"
13253 #: ../src/guestfs-availability.pod:31
13254 msgid "B<linuxfsuuid>"
13258 #: ../src/guestfs-availability.pod:33
13260 "The following functions: L</guestfs_mke2fs_JU> L</guestfs_mke2journal_U> "
13261 "L</guestfs_mkswap_U> L</guestfs_swapoff_uuid> L</guestfs_swapon_uuid>"
13265 #: ../src/guestfs-availability.pod:40
13266 msgid "B<linuxmodules>"
13270 #: ../src/guestfs-availability.pod:42
13271 msgid "The following functions: L</guestfs_modprobe>"
13275 #: ../src/guestfs-availability.pod:45
13276 msgid "B<linuxxattrs>"
13280 #: ../src/guestfs-availability.pod:47
13282 "The following functions: L</guestfs_getxattrs> L</guestfs_lgetxattrs> "
13283 "L</guestfs_lremovexattr> L</guestfs_lsetxattr> L</guestfs_lxattrlist> "
13284 "L</guestfs_removexattr> L</guestfs_setxattr>"
13288 #: ../src/guestfs-availability.pod:56
13293 #: ../src/guestfs-availability.pod:58
13295 "The following functions: L</guestfs_luks_add_key> L</guestfs_luks_close> "
13296 "L</guestfs_luks_format> L</guestfs_luks_format_cipher> "
13297 "L</guestfs_luks_kill_slot> L</guestfs_luks_open> L</guestfs_luks_open_ro>"
13301 #: ../src/guestfs-availability.pod:67
13306 #: ../src/guestfs-availability.pod:69
13308 "The following functions: L</guestfs_is_lv> L</guestfs_lvcreate> "
13309 "L</guestfs_lvm_remove_all> L</guestfs_lvm_set_filter> L</guestfs_lvremove> "
13310 "L</guestfs_lvresize> L</guestfs_lvresize_free> L</guestfs_lvs> "
13311 "L</guestfs_lvs_full> L</guestfs_pvcreate> L</guestfs_pvremove> "
13312 "L</guestfs_pvresize> L</guestfs_pvresize_size> L</guestfs_pvs> "
13313 "L</guestfs_pvs_full> L</guestfs_vg_activate> L</guestfs_vg_activate_all> "
13314 "L</guestfs_vgcreate> L</guestfs_vgremove> L</guestfs_vgs> "
13315 "L</guestfs_vgs_full>"
13319 #: ../src/guestfs-availability.pod:92
13324 #: ../src/guestfs-availability.pod:94
13326 "The following functions: L</guestfs_mkfifo> L</guestfs_mknod> "
13327 "L</guestfs_mknod_b> L</guestfs_mknod_c>"
13331 #: ../src/guestfs-availability.pod:100
13336 #: ../src/guestfs-availability.pod:102
13337 msgid "The following functions: L</guestfs_ntfs_3g_probe>"
13341 #: ../src/guestfs-availability.pod:105
13342 msgid "B<ntfsprogs>"
13346 #: ../src/guestfs-availability.pod:107
13347 msgid "The following functions: L</guestfs_ntfsresize> L</guestfs_ntfsresize_size>"
13351 #: ../src/guestfs-availability.pod:111
13352 msgid "B<realpath>"
13356 #: ../src/guestfs-availability.pod:113
13357 msgid "The following functions: L</guestfs_realpath>"
13361 #: ../src/guestfs-availability.pod:116
13366 #: ../src/guestfs-availability.pod:118
13368 "The following functions: L</guestfs_scrub_device> L</guestfs_scrub_file> "
13369 "L</guestfs_scrub_freespace>"
13373 #: ../src/guestfs-availability.pod:123
13378 #: ../src/guestfs-availability.pod:125
13379 msgid "The following functions: L</guestfs_getcon> L</guestfs_setcon>"
13383 #: ../src/guestfs-availability.pod:129
13388 #: ../src/guestfs-availability.pod:131
13389 msgid "The following functions: L</guestfs_txz_in> L</guestfs_txz_out>"
13393 #: ../src/guestfs-availability.pod:135
13394 msgid "B<zerofree>"
13398 #: ../src/guestfs-availability.pod:137
13399 msgid "The following functions: L</guestfs_zerofree>"
13403 #: ../src/guestfs-structs.pod:1
13404 msgid "guestfs_int_bool"
13408 #: ../src/guestfs-structs.pod:3
13411 " struct guestfs_int_bool {\n"
13419 #: ../src/guestfs-structs.pod:8
13422 " struct guestfs_int_bool_list {\n"
13423 " uint32_t len; /* Number of elements in list. */\n"
13424 " struct guestfs_int_bool *val; /* Elements. */\n"
13430 #: ../src/guestfs-structs.pod:13
13433 " void guestfs_free_int_bool (struct guestfs_free_int_bool *);\n"
13434 " void guestfs_free_int_bool_list (struct guestfs_free_int_bool_list *);\n"
13439 #: ../src/guestfs-structs.pod:16
13440 msgid "guestfs_lvm_pv"
13444 #: ../src/guestfs-structs.pod:18
13447 " struct guestfs_lvm_pv {\n"
13448 " char *pv_name;\n"
13449 " /* The next field is NOT nul-terminated, be careful when printing it: "
13451 " char pv_uuid[32];\n"
13453 " uint64_t pv_size;\n"
13454 " uint64_t dev_size;\n"
13455 " uint64_t pv_free;\n"
13456 " uint64_t pv_used;\n"
13457 " char *pv_attr;\n"
13458 " int64_t pv_pe_count;\n"
13459 " int64_t pv_pe_alloc_count;\n"
13460 " char *pv_tags;\n"
13461 " uint64_t pe_start;\n"
13462 " int64_t pv_mda_count;\n"
13463 " uint64_t pv_mda_free;\n"
13469 #: ../src/guestfs-structs.pod:36
13472 " struct guestfs_lvm_pv_list {\n"
13473 " uint32_t len; /* Number of elements in list. */\n"
13474 " struct guestfs_lvm_pv *val; /* Elements. */\n"
13480 #: ../src/guestfs-structs.pod:41
13483 " void guestfs_free_lvm_pv (struct guestfs_free_lvm_pv *);\n"
13484 " void guestfs_free_lvm_pv_list (struct guestfs_free_lvm_pv_list *);\n"
13489 #: ../src/guestfs-structs.pod:44
13490 msgid "guestfs_lvm_vg"
13494 #: ../src/guestfs-structs.pod:46
13497 " struct guestfs_lvm_vg {\n"
13498 " char *vg_name;\n"
13499 " /* The next field is NOT nul-terminated, be careful when printing it: "
13501 " char vg_uuid[32];\n"
13503 " char *vg_attr;\n"
13504 " uint64_t vg_size;\n"
13505 " uint64_t vg_free;\n"
13506 " char *vg_sysid;\n"
13507 " uint64_t vg_extent_size;\n"
13508 " int64_t vg_extent_count;\n"
13509 " int64_t vg_free_count;\n"
13510 " int64_t max_lv;\n"
13511 " int64_t max_pv;\n"
13512 " int64_t pv_count;\n"
13513 " int64_t lv_count;\n"
13514 " int64_t snap_count;\n"
13515 " int64_t vg_seqno;\n"
13516 " char *vg_tags;\n"
13517 " int64_t vg_mda_count;\n"
13518 " uint64_t vg_mda_free;\n"
13524 #: ../src/guestfs-structs.pod:69
13527 " struct guestfs_lvm_vg_list {\n"
13528 " uint32_t len; /* Number of elements in list. */\n"
13529 " struct guestfs_lvm_vg *val; /* Elements. */\n"
13535 #: ../src/guestfs-structs.pod:74
13538 " void guestfs_free_lvm_vg (struct guestfs_free_lvm_vg *);\n"
13539 " void guestfs_free_lvm_vg_list (struct guestfs_free_lvm_vg_list *);\n"
13544 #: ../src/guestfs-structs.pod:77
13545 msgid "guestfs_lvm_lv"
13549 #: ../src/guestfs-structs.pod:79
13552 " struct guestfs_lvm_lv {\n"
13553 " char *lv_name;\n"
13554 " /* The next field is NOT nul-terminated, be careful when printing it: "
13556 " char lv_uuid[32];\n"
13557 " char *lv_attr;\n"
13558 " int64_t lv_major;\n"
13559 " int64_t lv_minor;\n"
13560 " int64_t lv_kernel_major;\n"
13561 " int64_t lv_kernel_minor;\n"
13562 " uint64_t lv_size;\n"
13563 " int64_t seg_count;\n"
13565 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
13566 " float snap_percent;\n"
13567 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
13568 " float copy_percent;\n"
13569 " char *move_pv;\n"
13570 " char *lv_tags;\n"
13571 " char *mirror_log;\n"
13572 " char *modules;\n"
13578 #: ../src/guestfs-structs.pod:101
13581 " struct guestfs_lvm_lv_list {\n"
13582 " uint32_t len; /* Number of elements in list. */\n"
13583 " struct guestfs_lvm_lv *val; /* Elements. */\n"
13589 #: ../src/guestfs-structs.pod:106
13592 " void guestfs_free_lvm_lv (struct guestfs_free_lvm_lv *);\n"
13593 " void guestfs_free_lvm_lv_list (struct guestfs_free_lvm_lv_list *);\n"
13598 #: ../src/guestfs-structs.pod:111
13601 " struct guestfs_stat {\n"
13605 " int64_t nlink;\n"
13610 " int64_t blksize;\n"
13611 " int64_t blocks;\n"
13612 " int64_t atime;\n"
13613 " int64_t mtime;\n"
13614 " int64_t ctime;\n"
13620 #: ../src/guestfs-structs.pod:127
13623 " struct guestfs_stat_list {\n"
13624 " uint32_t len; /* Number of elements in list. */\n"
13625 " struct guestfs_stat *val; /* Elements. */\n"
13631 #: ../src/guestfs-structs.pod:132
13634 " void guestfs_free_stat (struct guestfs_free_stat *);\n"
13635 " void guestfs_free_stat_list (struct guestfs_free_stat_list *);\n"
13640 #: ../src/guestfs-structs.pod:137
13643 " struct guestfs_statvfs {\n"
13644 " int64_t bsize;\n"
13645 " int64_t frsize;\n"
13646 " int64_t blocks;\n"
13647 " int64_t bfree;\n"
13648 " int64_t bavail;\n"
13649 " int64_t files;\n"
13650 " int64_t ffree;\n"
13651 " int64_t favail;\n"
13654 " int64_t namemax;\n"
13660 #: ../src/guestfs-structs.pod:151
13663 " struct guestfs_statvfs_list {\n"
13664 " uint32_t len; /* Number of elements in list. */\n"
13665 " struct guestfs_statvfs *val; /* Elements. */\n"
13671 #: ../src/guestfs-structs.pod:156
13674 " void guestfs_free_statvfs (struct guestfs_free_statvfs *);\n"
13675 " void guestfs_free_statvfs_list (struct guestfs_free_statvfs_list *);\n"
13680 #: ../src/guestfs-structs.pod:159
13681 msgid "guestfs_dirent"
13685 #: ../src/guestfs-structs.pod:161
13688 " struct guestfs_dirent {\n"
13697 #: ../src/guestfs-structs.pod:167
13700 " struct guestfs_dirent_list {\n"
13701 " uint32_t len; /* Number of elements in list. */\n"
13702 " struct guestfs_dirent *val; /* Elements. */\n"
13708 #: ../src/guestfs-structs.pod:172
13711 " void guestfs_free_dirent (struct guestfs_free_dirent *);\n"
13712 " void guestfs_free_dirent_list (struct guestfs_free_dirent_list *);\n"
13717 #: ../src/guestfs-structs.pod:177
13720 " struct guestfs_version {\n"
13721 " int64_t major;\n"
13722 " int64_t minor;\n"
13723 " int64_t release;\n"
13730 #: ../src/guestfs-structs.pod:184
13733 " struct guestfs_version_list {\n"
13734 " uint32_t len; /* Number of elements in list. */\n"
13735 " struct guestfs_version *val; /* Elements. */\n"
13741 #: ../src/guestfs-structs.pod:189
13744 " void guestfs_free_version (struct guestfs_free_version *);\n"
13745 " void guestfs_free_version_list (struct guestfs_free_version_list *);\n"
13750 #: ../src/guestfs-structs.pod:192
13751 msgid "guestfs_xattr"
13755 #: ../src/guestfs-structs.pod:194
13758 " struct guestfs_xattr {\n"
13759 " char *attrname;\n"
13760 " /* The next two fields describe a byte array. */\n"
13761 " uint32_t attrval_len;\n"
13762 " char *attrval;\n"
13768 #: ../src/guestfs-structs.pod:201
13771 " struct guestfs_xattr_list {\n"
13772 " uint32_t len; /* Number of elements in list. */\n"
13773 " struct guestfs_xattr *val; /* Elements. */\n"
13779 #: ../src/guestfs-structs.pod:206
13782 " void guestfs_free_xattr (struct guestfs_free_xattr *);\n"
13783 " void guestfs_free_xattr_list (struct guestfs_free_xattr_list *);\n"
13788 #: ../src/guestfs-structs.pod:209
13789 msgid "guestfs_inotify_event"
13793 #: ../src/guestfs-structs.pod:211
13796 " struct guestfs_inotify_event {\n"
13797 " int64_t in_wd;\n"
13798 " uint32_t in_mask;\n"
13799 " uint32_t in_cookie;\n"
13800 " char *in_name;\n"
13806 #: ../src/guestfs-structs.pod:218
13809 " struct guestfs_inotify_event_list {\n"
13810 " uint32_t len; /* Number of elements in list. */\n"
13811 " struct guestfs_inotify_event *val; /* Elements. */\n"
13817 #: ../src/guestfs-structs.pod:223
13820 " void guestfs_free_inotify_event (struct guestfs_free_inotify_event *);\n"
13821 " void guestfs_free_inotify_event_list (struct "
13822 "guestfs_free_inotify_event_list *);\n"
13827 #: ../src/guestfs-structs.pod:226
13828 msgid "guestfs_partition"
13832 #: ../src/guestfs-structs.pod:228
13835 " struct guestfs_partition {\n"
13836 " int32_t part_num;\n"
13837 " uint64_t part_start;\n"
13838 " uint64_t part_end;\n"
13839 " uint64_t part_size;\n"
13845 #: ../src/guestfs-structs.pod:235
13848 " struct guestfs_partition_list {\n"
13849 " uint32_t len; /* Number of elements in list. */\n"
13850 " struct guestfs_partition *val; /* Elements. */\n"
13856 #: ../src/guestfs-structs.pod:240
13859 " void guestfs_free_partition (struct guestfs_free_partition *);\n"
13860 " void guestfs_free_partition_list (struct guestfs_free_partition_list *);\n"
13865 #: ../fish/guestfish.pod:5
13866 msgid "guestfish - the libguestfs Filesystem Interactive SHell"
13870 #: ../fish/guestfish.pod:9
13873 " guestfish [--options] [commands]\n"
13878 #: ../fish/guestfish.pod:11
13886 #: ../fish/guestfish.pod:13
13889 " guestfish -a disk.img\n"
13894 #: ../fish/guestfish.pod:15
13897 " guestfish -a disk.img -m dev[:mountpoint]\n"
13902 #: ../fish/guestfish.pod:17
13905 " guestfish -d libvirt-domain\n"
13910 #: ../fish/guestfish.pod:19
13913 " guestfish -a disk.img -i\n"
13918 #: ../fish/guestfish.pod:21
13921 " guestfish -d libvirt-domain -i\n"
13926 #: ../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
13931 #: ../fish/guestfish.pod:25
13933 "Using guestfish in read/write mode on live virtual machines can be "
13934 "dangerous, potentially causing disk corruption. Use the I<--ro> (read-only) "
13935 "option to use guestfish safely if the disk image or virtual machine might be "
13940 #: ../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
13945 #: ../fish/guestfish.pod:32
13946 msgid "As an interactive shell"
13950 #: ../fish/guestfish.pod:34
13958 #: ../fish/guestfish.pod:36
13961 " Welcome to guestfish, the libguestfs filesystem interactive shell for\n"
13962 " editing virtual machine filesystems.\n"
13967 #: ../fish/guestfish.pod:39
13970 " Type: 'help' for a list of commands\n"
13971 " 'man' to read the manual\n"
13972 " 'quit' to quit the shell\n"
13977 #: ../fish/guestfish.pod:43
13985 #: ../fish/guestfish.pod:45
13986 msgid "From shell scripts"
13990 #: ../fish/guestfish.pod:47
13991 msgid "Create a new C</etc/motd> file in a guest:"
13995 #: ../fish/guestfish.pod:49
13998 " guestfish <<_EOF_\n"
14001 " mount /dev/vg_guest/lv_root /\n"
14002 " write /etc/motd \"Welcome, new users\"\n"
14008 #: ../fish/guestfish.pod:56
14009 msgid "List the LVM logical volumes in a guest:"
14013 #: ../fish/guestfish.pod:58
14016 " guestfish -a disk.img --ro <<_EOF_\n"
14024 #: ../fish/guestfish.pod:63
14025 msgid "On one command line"
14029 #: ../fish/guestfish.pod:65
14030 msgid "Update C</etc/resolv.conf> in a guest:"
14034 #: ../fish/guestfish.pod:67
14038 " add disk.img : run : mount /dev/vg_guest/lv_root / : \\\n"
14039 " write /etc/resolv.conf \"nameserver 1.2.3.4\"\n"
14044 #: ../fish/guestfish.pod:71
14045 msgid "Edit C</boot/grub/grub.conf> interactively:"
14049 #: ../fish/guestfish.pod:73
14052 " guestfish --add disk.img \\\n"
14053 " --mount /dev/vg_guest/lv_root \\\n"
14054 " --mount /dev/sda1:/boot \\\n"
14055 " edit /boot/grub/grub.conf\n"
14060 #: ../fish/guestfish.pod:78
14061 msgid "Mount disks automatically"
14065 #: ../fish/guestfish.pod:80
14067 "Use the I<-i> option to automatically mount the disks from a virtual "
14072 #: ../fish/guestfish.pod:83
14075 " guestfish --ro -a disk.img -i cat /etc/group\n"
14080 #: ../fish/guestfish.pod:85
14083 " guestfish --ro -d libvirt-domain -i cat /etc/group\n"
14088 #: ../fish/guestfish.pod:87
14089 msgid "As a script interpreter"
14093 #: ../fish/guestfish.pod:89
14094 msgid "Create a 100MB disk containing an ext2-formatted partition:"
14098 #: ../fish/guestfish.pod:91
14101 " #!/usr/bin/guestfish -f\n"
14102 " sparse test1.img 100M\n"
14104 " part-disk /dev/sda mbr\n"
14105 " mkfs ext2 /dev/sda1\n"
14110 #: ../fish/guestfish.pod:97
14111 msgid "Start with a prepared disk"
14115 #: ../fish/guestfish.pod:99
14117 "An alternate way to create a 100MB disk called C<test1.img> containing a "
14118 "single ext2-formatted partition:"
14122 #: ../fish/guestfish.pod:102
14125 " guestfish -N fs\n"
14130 #: ../fish/guestfish.pod:104
14131 msgid "To list what is available do:"
14135 #: ../fish/guestfish.pod:106 ../fish/guestfish.pod:720
14138 " guestfish -N list | less\n"
14143 #: ../fish/guestfish.pod:108
14144 msgid "Remote control"
14148 #: ../fish/guestfish.pod:110
14151 " eval `guestfish --listen --ro`\n"
14152 " guestfish --remote add disk.img\n"
14153 " guestfish --remote run\n"
14154 " guestfish --remote lvs\n"
14159 #: ../fish/guestfish.pod:117
14161 "Guestfish is a shell and command-line tool for examining and modifying "
14162 "virtual machine filesystems. It uses libguestfs and exposes all of the "
14163 "functionality of the guestfs API, see L<guestfs(3)>."
14167 #: ../fish/guestfish.pod:121
14169 "Guestfish gives you structured access to the libguestfs API, from shell "
14170 "scripts or the command line or interactively. If you want to rescue a "
14171 "broken virtual machine image, you should look at the L<virt-rescue(1)> "
14176 #: ../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
14181 #: ../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
14186 #: ../fish/guestfish.pod:132
14187 msgid "Displays general help on options."
14191 #: ../fish/guestfish.pod:134
14192 msgid "B<-h> | B<--cmd-help>"
14196 #: ../fish/guestfish.pod:136
14197 msgid "Lists all available guestfish commands."
14201 #: ../fish/guestfish.pod:138
14202 msgid "B<-h cmd> | B<--cmd-help cmd>"
14206 #: ../fish/guestfish.pod:140
14207 msgid "Displays detailed help on a single command C<cmd>."
14211 #: ../fish/guestfish.pod:142 ../fuse/guestmount.pod:74
14212 msgid "B<-a image> | B<--add image>"
14216 #: ../fish/guestfish.pod:144
14217 msgid "Add a block device or virtual machine image to the shell."
14221 #: ../fish/guestfish.pod:146
14222 msgid "B<-c URI> | B<--connect URI>"
14226 #: ../fish/guestfish.pod:148
14228 "When used in conjunction with the I<-d> option, this specifies the libvirt "
14229 "URI to use. The default is to use the default libvirt connection."
14233 #: ../fish/guestfish.pod:152
14234 msgid "B<-d libvirt-domain> | B<--domain libvirt-domain>"
14238 #: ../fish/guestfish.pod:154
14240 "Add disks from the named libvirt domain. If the I<--ro> option is also "
14241 "used, then any libvirt domain can be used. However in write mode, only "
14242 "libvirt domains which are shut down can be named here."
14246 #: ../fish/guestfish.pod:158
14247 msgid "B<-D> | B<--no-dest-paths>"
14251 #: ../fish/guestfish.pod:160
14253 "Don't tab-complete paths on the guest filesystem. It is useful to be able "
14254 "to hit the tab key to complete paths on the guest filesystem, but this "
14255 "causes extra \"hidden\" guestfs calls to be made, so this option is here to "
14256 "allow this feature to be disabled."
14260 #: ../fish/guestfish.pod:165
14261 msgid "B<-f file> | B<--file file>"
14265 #: ../fish/guestfish.pod:167
14266 msgid "Read commands from C<file>. To write pure guestfish scripts, use:"
14270 #: ../fish/guestfish.pod:170
14273 " #!/usr/bin/guestfish -f\n"
14278 #: ../fish/guestfish.pod:172
14279 msgid "B<-i> | B<--inspector>"
14283 #: ../fish/guestfish.pod:174
14285 "Using L<virt-inspector(1)> code, inspect the disks looking for an operating "
14286 "system and mount filesystems as they would be mounted on the real virtual "
14291 #: ../fish/guestfish.pod:178
14292 msgid "Typical usage is either:"
14296 #: ../fish/guestfish.pod:180
14299 " guestfish -d myguest -i\n"
14304 #: ../fish/guestfish.pod:182
14305 msgid "(for an inactive libvirt domain called I<myguest>), or:"
14309 #: ../fish/guestfish.pod:184
14312 " guestfish --ro -d myguest -i\n"
14317 #: ../fish/guestfish.pod:186
14318 msgid "(for active domains, readonly), or specify the block device directly:"
14322 #: ../fish/guestfish.pod:188
14325 " guestfish -a /dev/Guests/MyGuest -i\n"
14330 #: ../fish/guestfish.pod:190
14332 "Note that the command line syntax changed slightly over older versions of "
14333 "guestfish. You can still use the old syntax:"
14337 #: ../fish/guestfish.pod:193
14340 " guestfish [--ro] -i disk.img\n"
14345 #: ../fish/guestfish.pod:195
14348 " guestfish [--ro] -i libvirt-domain\n"
14353 #: ../fish/guestfish.pod:197
14354 msgid "B<--keys-from-stdin>"
14358 #: ../fish/guestfish.pod:199
14360 "Read key or passphrase parameters from stdin. The default is to try to read "
14361 "passphrases from the user by opening C</dev/tty>."
14365 #: ../fish/guestfish.pod:202
14366 msgid "B<--listen>"
14370 #: ../fish/guestfish.pod:204
14372 "Fork into the background and listen for remote commands. See section "
14373 "L</REMOTE CONTROL GUESTFISH OVER A SOCKET> below."
14377 #: ../fish/guestfish.pod:207
14378 msgid "B<-m dev[:mountpoint]> | B<--mount dev[:mountpoint]>"
14382 #: ../fish/guestfish.pod:209
14383 msgid "Mount the named partition or logical volume on the given mountpoint."
14387 #: ../fish/guestfish.pod:211
14388 msgid "If the mountpoint is omitted, it defaults to C</>."
14392 #: ../fish/guestfish.pod:213
14393 msgid "You have to mount something on C</> before most commands will work."
14397 #: ../fish/guestfish.pod:215
14399 "If any I<-m> or I<--mount> options are given, the guest is automatically "
14404 #: ../fish/guestfish.pod:218
14406 "If you don't know what filesystems a disk image contains, you can either run "
14407 "guestfish without this option, then list the partitions and LVs available "
14408 "(see L</list-partitions> and L</lvs> commands), or you can use the "
14409 "L<virt-list-filesystems(1)> program."
14413 #: ../fish/guestfish.pod:223 ../fuse/guestmount.pod:106
14414 msgid "B<-n> | B<--no-sync>"
14418 #: ../fish/guestfish.pod:225
14420 "Disable autosync. This is enabled by default. See the discussion of "
14421 "autosync in the L<guestfs(3)> manpage."
14425 #: ../fish/guestfish.pod:228
14426 msgid "B<-N type> | B<--new type> | B<-N list>"
14430 #: ../fish/guestfish.pod:230
14432 "Prepare a fresh disk image formatted as \"type\". This is an alternative to "
14433 "the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a "
14434 "preformatted disk with a filesystem and adds it. See L</PREPARED DISK "
14439 #: ../fish/guestfish.pod:235
14440 msgid "B<--progress-bars>"
14444 #: ../fish/guestfish.pod:237
14445 msgid "Enable progress bars, even when guestfish is used non-interactively."
14449 #: ../fish/guestfish.pod:239
14451 "Progress bars are enabled by default when guestfish is used as an "
14452 "interactive shell."
14456 #: ../fish/guestfish.pod:242
14457 msgid "B<--no-progress-bars>"
14461 #: ../fish/guestfish.pod:244
14462 msgid "Disable progress bars."
14466 #: ../fish/guestfish.pod:246
14467 msgid "B<--remote[=pid]>"
14471 #: ../fish/guestfish.pod:248
14473 "Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section L</REMOTE "
14474 "CONTROL GUESTFISH OVER A SOCKET> below."
14478 #: ../fish/guestfish.pod:251 ../fuse/guestmount.pod:148
14479 msgid "B<-r> | B<--ro>"
14483 #: ../fish/guestfish.pod:253
14485 "This changes the I<-a> and I<-m> options so that disks are added and mounts "
14486 "are done read-only (see L<guestfs(3)/guestfs_mount_ro>)."
14490 #: ../fish/guestfish.pod:256 ../tools/virt-rescue.pl:162
14492 "The option must always be used if the disk image or virtual machine might be "
14493 "running, and is generally recommended in cases where you don't need write "
14494 "access to the disk."
14498 #: ../fish/guestfish.pod:260
14500 "Note that prepared disk images created with I<-N> are not affected by the "
14505 #: ../fish/guestfish.pod:263 ../fuse/guestmount.pod:158 ../tools/virt-rescue.pl:170
14506 msgid "B<--selinux>"
14510 #: ../fish/guestfish.pod:265
14511 msgid "Enable SELinux support for the guest. See L<guestfs(3)/SELINUX>."
14515 #: ../fish/guestfish.pod:267 ../fuse/guestmount.pod:168
14516 msgid "B<-v> | B<--verbose>"
14520 #: ../fish/guestfish.pod:269
14522 "Enable very verbose messages. This is particularly useful if you find a "
14527 #: ../fish/guestfish.pod:272 ../fuse/guestmount.pod:172
14528 msgid "B<-V> | B<--version>"
14532 #: ../fish/guestfish.pod:274
14533 msgid "Display the guestfish / libguestfs version number and exit."
14537 #: ../fish/guestfish.pod:276
14542 #: ../fish/guestfish.pod:278
14543 msgid "Echo each command before executing it."
14547 #: ../fish/guestfish.pod:282
14548 msgid "COMMANDS ON COMMAND LINE"
14552 #: ../fish/guestfish.pod:284
14553 msgid "Any additional (non-option) arguments are treated as commands to execute."
14557 #: ../fish/guestfish.pod:287
14559 "Commands to execute should be separated by a colon (C<:>), where the colon "
14560 "is a separate parameter. Thus:"
14564 #: ../fish/guestfish.pod:290
14567 " guestfish cmd [args...] : cmd [args...] : cmd [args...] ...\n"
14572 #: ../fish/guestfish.pod:292
14574 "If there are no additional arguments, then we enter a shell, either an "
14575 "interactive shell with a prompt (if the input is a terminal) or a "
14576 "non-interactive shell."
14580 #: ../fish/guestfish.pod:296
14582 "In either command line mode or non-interactive shell, the first command that "
14583 "gives an error causes the whole shell to exit. In interactive mode (with a "
14584 "prompt) if a command fails, you can continue to enter commands."
14588 #: ../fish/guestfish.pod:301
14589 msgid "USING launch (OR run)"
14593 #: ../fish/guestfish.pod:303
14595 "As with L<guestfs(3)>, you must first configure your guest by adding disks, "
14596 "then launch it, then mount any disks you need, and finally issue "
14597 "actions/commands. So the general order of the day is:"
14601 #: ../fish/guestfish.pod:311
14602 msgid "add or -a/--add"
14606 #: ../fish/guestfish.pod:315
14607 msgid "launch (aka run)"
14611 #: ../fish/guestfish.pod:319
14612 msgid "mount or -m/--mount"
14616 #: ../fish/guestfish.pod:323
14617 msgid "any other commands"
14621 #: ../fish/guestfish.pod:327
14623 "C<run> is a synonym for C<launch>. You must C<launch> (or C<run>) your "
14624 "guest before mounting or performing any other commands."
14628 #: ../fish/guestfish.pod:330
14630 "The only exception is that if the I<-m> or I<--mount> option was given, the "
14631 "guest is automatically run for you (simply because guestfish can't mount the "
14632 "disks you asked for without doing this)."
14636 #: ../fish/guestfish.pod:334
14641 #: ../fish/guestfish.pod:336
14643 "You can quote ordinary parameters using either single or double quotes. For "
14648 #: ../fish/guestfish.pod:339
14651 " add \"file with a space.img\"\n"
14656 #: ../fish/guestfish.pod:341
14659 " rm '/file name'\n"
14664 #: ../fish/guestfish.pod:343
14672 #: ../fish/guestfish.pod:345
14674 "A few commands require a list of strings to be passed. For these, use a "
14675 "whitespace-separated list, enclosed in quotes. Strings containing "
14676 "whitespace to be passed through must be enclosed in single quotes. A "
14677 "literal single quote must be escaped with a backslash."
14681 #: ../fish/guestfish.pod:350
14684 " vgcreate VG \"/dev/sda1 /dev/sdb1\"\n"
14685 " command \"/bin/echo 'foo bar'\"\n"
14686 " command \"/bin/echo \\'foo\\'\"\n"
14691 #: ../fish/guestfish.pod:354
14696 #: ../fish/guestfish.pod:356
14697 msgid "This section applies to all commands which can take integers as parameters."
14701 #: ../fish/guestfish.pod:359
14702 msgid "SIZE SUFFIX"
14706 #: ../fish/guestfish.pod:361
14708 "When the command takes a parameter measured in bytes, you can use one of the "
14709 "following suffixes to specify kilobytes, megabytes and larger sizes:"
14713 #: ../fish/guestfish.pod:367
14714 msgid "B<k> or B<K> or B<KiB>"
14718 #: ../fish/guestfish.pod:369
14719 msgid "The size in kilobytes (multiplied by 1024)."
14723 #: ../fish/guestfish.pod:371
14728 #: ../fish/guestfish.pod:373
14729 msgid "The size in SI 1000 byte units."
14733 #: ../fish/guestfish.pod:375
14734 msgid "B<M> or B<MiB>"
14738 #: ../fish/guestfish.pod:377
14739 msgid "The size in megabytes (multiplied by 1048576)."
14743 #: ../fish/guestfish.pod:379
14748 #: ../fish/guestfish.pod:381
14749 msgid "The size in SI 1000000 byte units."
14753 #: ../fish/guestfish.pod:383
14754 msgid "B<G> or B<GiB>"
14758 #: ../fish/guestfish.pod:385
14759 msgid "The size in gigabytes (multiplied by 2**30)."
14763 #: ../fish/guestfish.pod:387
14768 #: ../fish/guestfish.pod:389
14769 msgid "The size in SI 10**9 byte units."
14773 #: ../fish/guestfish.pod:391
14774 msgid "B<T> or B<TiB>"
14778 #: ../fish/guestfish.pod:393
14779 msgid "The size in terabytes (multiplied by 2**40)."
14783 #: ../fish/guestfish.pod:395
14788 #: ../fish/guestfish.pod:397
14789 msgid "The size in SI 10**12 byte units."
14793 #: ../fish/guestfish.pod:399
14794 msgid "B<P> or B<PiB>"
14798 #: ../fish/guestfish.pod:401
14799 msgid "The size in petabytes (multiplied by 2**50)."
14803 #: ../fish/guestfish.pod:403
14808 #: ../fish/guestfish.pod:405
14809 msgid "The size in SI 10**15 byte units."
14813 #: ../fish/guestfish.pod:407
14814 msgid "B<E> or B<EiB>"
14818 #: ../fish/guestfish.pod:409
14819 msgid "The size in exabytes (multiplied by 2**60)."
14823 #: ../fish/guestfish.pod:411
14828 #: ../fish/guestfish.pod:413
14829 msgid "The size in SI 10**18 byte units."
14833 #: ../fish/guestfish.pod:415
14834 msgid "B<Z> or B<ZiB>"
14838 #: ../fish/guestfish.pod:417
14839 msgid "The size in zettabytes (multiplied by 2**70)."
14843 #: ../fish/guestfish.pod:419
14848 #: ../fish/guestfish.pod:421
14849 msgid "The size in SI 10**21 byte units."
14853 #: ../fish/guestfish.pod:423
14854 msgid "B<Y> or B<YiB>"
14858 #: ../fish/guestfish.pod:425
14859 msgid "The size in yottabytes (multiplied by 2**80)."
14863 #: ../fish/guestfish.pod:427
14868 #: ../fish/guestfish.pod:429
14869 msgid "The size in SI 10**24 byte units."
14873 #: ../fish/guestfish.pod:433
14874 msgid "For example:"
14878 #: ../fish/guestfish.pod:435
14881 " truncate-size /file 1G\n"
14886 #: ../fish/guestfish.pod:437
14887 msgid "would truncate the file to 1 gigabyte."
14891 #: ../fish/guestfish.pod:439
14893 "Be careful because a few commands take sizes in kilobytes or megabytes "
14894 "(eg. the parameter to L</memsize> is specified in megabytes already). "
14895 "Adding a suffix will probably not do what you expect."
14899 #: ../fish/guestfish.pod:443
14900 msgid "OCTAL AND HEXADECIMAL NUMBERS"
14904 #: ../fish/guestfish.pod:445
14906 "For specifying the radix (base) use the C convention: C<0> to prefix an "
14907 "octal number or C<0x> to prefix a hexadecimal number. For example:"
14911 #: ../fish/guestfish.pod:448
14914 " 1234 decimal number 1234\n"
14915 " 02322 octal number, equivalent to decimal 1234\n"
14916 " 0x4d2 hexadecimal number, equivalent to decimal 1234\n"
14921 #: ../fish/guestfish.pod:452
14923 "When using the C<chmod> command, you almost always want to specify an octal "
14924 "number for the mode, and you must prefix it with C<0> (unlike the Unix "
14925 "L<chmod(1)> program):"
14929 #: ../fish/guestfish.pod:456
14932 " chmod 0777 /public # OK\n"
14933 " chmod 777 /public # WRONG! This is mode 777 decimal = 01411 octal.\n"
14938 #: ../fish/guestfish.pod:459
14940 "Commands that return numbers usually print them in decimal, but some "
14941 "commands print numbers in other radices (eg. C<umask> prints the mode in "
14942 "octal, preceeded by C<0>)."
14946 #: ../fish/guestfish.pod:463
14947 msgid "WILDCARDS AND GLOBBING"
14951 #: ../fish/guestfish.pod:465
14953 "Neither guestfish nor the underlying guestfs API performs wildcard expansion "
14954 "(globbing) by default. So for example the following will not do what you "
14959 #: ../fish/guestfish.pod:469
14967 #: ../fish/guestfish.pod:471
14969 "Assuming you don't have a directory literally called C</home/*> then the "
14970 "above command will return an error."
14974 #: ../fish/guestfish.pod:474
14975 msgid "To perform wildcard expansion, use the C<glob> command."
14979 #: ../fish/guestfish.pod:476
14982 " glob rm-rf /home/*\n"
14987 #: ../fish/guestfish.pod:478
14989 "runs C<rm-rf> on each path that matches (ie. potentially running the command "
14990 "many times), equivalent to:"
14994 #: ../fish/guestfish.pod:481
14997 " rm-rf /home/jim\n"
14998 " rm-rf /home/joe\n"
14999 " rm-rf /home/mary\n"
15004 #: ../fish/guestfish.pod:485
15005 msgid "C<glob> only works on simple guest paths and not on device names."
15009 #: ../fish/guestfish.pod:487
15011 "If you have several parameters, each containing a wildcard, then glob will "
15012 "perform a cartesian product."
15016 #: ../fish/guestfish.pod:490
15021 #: ../fish/guestfish.pod:492
15023 "Any line which starts with a I<#> character is treated as a comment and "
15024 "ignored. The I<#> can optionally be preceeded by whitespace, but B<not> by "
15025 "a command. For example:"
15029 #: ../fish/guestfish.pod:496
15032 " # this is a comment\n"
15033 " # this is a comment\n"
15034 " foo # NOT a comment\n"
15039 #: ../fish/guestfish.pod:500
15040 msgid "Blank lines are also ignored."
15044 #: ../fish/guestfish.pod:502
15045 msgid "RUNNING COMMANDS LOCALLY"
15049 #: ../fish/guestfish.pod:504
15051 "Any line which starts with a I<!> character is treated as a command sent to "
15052 "the local shell (C</bin/sh> or whatever L<system(3)> uses). For example:"
15056 #: ../fish/guestfish.pod:508
15060 " tgz-out /remote local/remote-data.tar.gz\n"
15065 #: ../fish/guestfish.pod:511
15067 "will create a directory C<local> on the host, and then export the contents "
15068 "of C</remote> on the mounted filesystem to C<local/remote-data.tar.gz>. "
15069 "(See C<tgz-out>)."
15073 #: ../fish/guestfish.pod:515
15075 "To change the local directory, use the C<lcd> command. C<!cd> will have no "
15076 "effect, due to the way that subprocesses work in Unix."
15080 #: ../fish/guestfish.pod:518
15085 #: ../fish/guestfish.pod:520
15087 "Use C<command E<lt>spaceE<gt> | command> to pipe the output of the first "
15088 "command (a guestfish command) to the second command (any host command). For "
15093 #: ../fish/guestfish.pod:524
15096 " cat /etc/passwd | awk -F: '$3 == 0 { print }'\n"
15101 #: ../fish/guestfish.pod:526
15103 "(where C<cat> is the guestfish cat command, but C<awk> is the host awk "
15104 "program). The above command would list all accounts in the guest filesystem "
15105 "which have UID 0, ie. root accounts including backdoors. Other examples:"
15109 #: ../fish/guestfish.pod:531
15112 " hexdump /bin/ls | head\n"
15113 " list-devices | tail -1\n"
15114 " tgz-out / - | tar ztf -\n"
15119 #: ../fish/guestfish.pod:535
15121 "The space before the pipe symbol is required, any space after the pipe "
15122 "symbol is optional. Everything after the pipe symbol is just passed "
15123 "straight to the host shell, so it can contain redirections, globs and "
15124 "anything else that makes sense on the host side."
15128 #: ../fish/guestfish.pod:540
15130 "To use a literal argument which begins with a pipe symbol, you have to quote "
15135 #: ../fish/guestfish.pod:543
15143 #: ../fish/guestfish.pod:545
15144 msgid "HOME DIRECTORIES"
15148 #: ../fish/guestfish.pod:547
15150 "If a parameter starts with the character C<~> then the tilde may be expanded "
15151 "as a home directory path (either C<~> for the current user's home directory, "
15152 "or C<~user> for another user)."
15156 #: ../fish/guestfish.pod:551
15158 "Note that home directory expansion happens for users known I<on the host>, "
15159 "not in the guest filesystem."
15163 #: ../fish/guestfish.pod:554
15165 "To use a literal argument which begins with a tilde, you have to quote it, "
15170 #: ../fish/guestfish.pod:557
15178 #: ../fish/guestfish.pod:561
15180 "Libguestfs has some support for Linux guests encrypted according to the "
15181 "Linux Unified Key Setup (LUKS) standard, which includes nearly all whole "
15182 "disk encryption systems used by modern Linux guests. Currently only "
15183 "LVM-on-LUKS is supported."
15187 #: ../fish/guestfish.pod:566
15188 msgid "Identify encrypted block devices and partitions using L</vfs-type>:"
15192 #: ../fish/guestfish.pod:568
15195 " ><fs> vfs-type /dev/sda2\n"
15201 #: ../fish/guestfish.pod:571
15203 "Then open those devices using L</luks-open>. This creates a device-mapper "
15204 "device called C</dev/mapper/luksdev>."
15208 #: ../fish/guestfish.pod:574
15211 " ><fs> luks-open /dev/sda2 luksdev\n"
15212 " Enter key or passphrase (\"key\"): <enter the passphrase>\n"
15217 #: ../fish/guestfish.pod:577
15219 "Finally you have to tell LVM to scan for volume groups on the newly created "
15224 #: ../fish/guestfish.pod:580
15228 " ><fs> vg-activate-all true\n"
15233 #: ../fish/guestfish.pod:583
15234 msgid "The logical volume(s) can now be mounted in the usual way."
15238 #: ../fish/guestfish.pod:585
15240 "Before closing a LUKS device you must unmount any logical volumes on it and "
15241 "deactivate the volume groups by calling C<vg-activate false VG> on each "
15242 "one. Then you can close the mapper device:"
15246 #: ../fish/guestfish.pod:589
15249 " ><fs> vg-activate false /dev/VG\n"
15250 " ><fs> luks-close /dev/mapper/luksdev\n"
15255 #: ../fish/guestfish.pod:592
15256 msgid "WINDOWS PATHS"
15260 #: ../fish/guestfish.pod:594
15262 "If a path is prefixed with C<win:> then you can use Windows-style paths "
15263 "(with some limitations). The following commands are equivalent:"
15267 #: ../fish/guestfish.pod:597
15270 " file /WINDOWS/system32/config/system.LOG\n"
15275 #: ../fish/guestfish.pod:599
15278 " file win:/windows/system32/config/system.log\n"
15283 #: ../fish/guestfish.pod:601
15286 " file win:\\windows\\system32\\config\\system.log\n"
15291 #: ../fish/guestfish.pod:603
15294 " file WIN:C:\\Windows\\SYSTEM32\\conFIG\\SYSTEM.LOG\n"
15299 #: ../fish/guestfish.pod:605
15301 "This syntax implicitly calls C<case-sensitive-path> (q.v.) so it also "
15302 "handles case insensitivity like Windows would. This only works in argument "
15303 "positions that expect a path."
15307 #: ../fish/guestfish.pod:609
15308 msgid "UPLOADING AND DOWNLOADING FILES"
15312 #: ../fish/guestfish.pod:611
15314 "For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and "
15315 "others which upload from or download to a local file, you can use the "
15316 "special filename C<-> to mean \"from stdin\" or \"to stdout\". For example:"
15320 #: ../fish/guestfish.pod:615
15328 #: ../fish/guestfish.pod:617
15329 msgid "reads stdin and creates from that a file C</foo> in the disk image, and:"
15333 #: ../fish/guestfish.pod:620
15336 " tar-out /etc - | tar tf -\n"
15341 #: ../fish/guestfish.pod:622
15343 "writes the tarball to stdout and then pipes that into the external \"tar\" "
15344 "command (see L</PIPES>)."
15348 #: ../fish/guestfish.pod:625
15350 "When using C<-> to read from stdin, the input is read up to the end of "
15351 "stdin. You can also use a special \"heredoc\"-like syntax to read up to "
15352 "some arbitrary end marker:"
15356 #: ../fish/guestfish.pod:629
15359 " upload -<<END /foo\n"
15368 #: ../fish/guestfish.pod:635
15370 "Any string of characters can be used instead of C<END>. The end marker must "
15371 "appear on a line of its own, without any preceeding or following characters "
15372 "(not even spaces)."
15376 #: ../fish/guestfish.pod:639
15378 "Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to "
15379 "upload local files (so-called \"FileIn\" parameters in the generator)."
15383 #: ../fish/guestfish.pod:642
15384 msgid "EXIT ON ERROR BEHAVIOUR"
15388 #: ../fish/guestfish.pod:644
15390 "By default, guestfish will ignore any errors when in interactive mode "
15391 "(ie. taking commands from a human over a tty), and will exit on the first "
15392 "error in non-interactive mode (scripts, commands given on the command line)."
15396 #: ../fish/guestfish.pod:649
15398 "If you prefix a command with a I<-> character, then that command will not "
15399 "cause guestfish to exit, even if that (one) command returns an error."
15403 #: ../fish/guestfish.pod:653
15404 msgid "REMOTE CONTROL GUESTFISH OVER A SOCKET"
15408 #: ../fish/guestfish.pod:655
15410 "Guestfish can be remote-controlled over a socket. This is useful "
15411 "particularly in shell scripts where you want to make several different "
15412 "changes to a filesystem, but you don't want the overhead of starting up a "
15413 "guestfish process each time."
15417 #: ../fish/guestfish.pod:660
15418 msgid "Start a guestfish server process using:"
15422 #: ../fish/guestfish.pod:662
15425 " eval `guestfish --listen`\n"
15430 #: ../fish/guestfish.pod:664
15431 msgid "and then send it commands by doing:"
15435 #: ../fish/guestfish.pod:666
15438 " guestfish --remote cmd [...]\n"
15443 #: ../fish/guestfish.pod:668
15444 msgid "To cause the server to exit, send it the exit command:"
15448 #: ../fish/guestfish.pod:670
15451 " guestfish --remote exit\n"
15456 #: ../fish/guestfish.pod:672
15458 "Note that the server will normally exit if there is an error in a command. "
15459 "You can change this in the usual way. See section L</EXIT ON ERROR "
15464 #: ../fish/guestfish.pod:676
15465 msgid "CONTROLLING MULTIPLE GUESTFISH PROCESSES"
15469 #: ../fish/guestfish.pod:678
15471 "The C<eval> statement sets the environment variable C<$GUESTFISH_PID>, which "
15472 "is how the I<--remote> option knows where to send the commands. You can "
15473 "have several guestfish listener processes running using:"
15477 #: ../fish/guestfish.pod:682
15480 " eval `guestfish --listen`\n"
15481 " pid1=$GUESTFISH_PID\n"
15482 " eval `guestfish --listen`\n"
15483 " pid2=$GUESTFISH_PID\n"
15485 " guestfish --remote=$pid1 cmd\n"
15486 " guestfish --remote=$pid2 cmd\n"
15491 #: ../fish/guestfish.pod:690
15492 msgid "REMOTE CONTROL DETAILS"
15496 #: ../fish/guestfish.pod:692
15498 "Remote control happens over a Unix domain socket called "
15499 "C</tmp/.guestfish-$UID/socket-$PID>, where C<$UID> is the effective user ID "
15500 "of the process, and C<$PID> is the process ID of the server."
15504 #: ../fish/guestfish.pod:696
15505 msgid "Guestfish client and server versions must match exactly."
15509 #: ../fish/guestfish.pod:698
15510 msgid "PREPARED DISK IMAGES"
15514 #: ../fish/guestfish.pod:700
15516 "Use the I<-N type> or I<--new type> parameter to select one of a set of "
15517 "preformatted disk images that guestfish can make for you to save typing. "
15518 "This is particularly useful for testing purposes. This option is used "
15519 "instead of the I<-a> option, and like I<-a> can appear multiple times (and "
15520 "can be mixed with I<-a>)."
15524 #: ../fish/guestfish.pod:706
15526 "The new disk is called C<test1.img> for the first I<-N>, C<test2.img> for "
15527 "the second and so on. Existing files in the current directory are "
15532 #: ../fish/guestfish.pod:710
15534 "The type briefly describes how the disk should be sized, partitioned, how "
15535 "filesystem(s) should be created, and how content should be added. "
15536 "Optionally the type can be followed by extra parameters, separated by C<:> "
15537 "(colon) characters. For example, I<-N fs> creates a default 100MB, "
15538 "sparsely-allocated disk, containing a single partition, with the partition "
15539 "formatted as ext2. I<-N fs:ext4:1G> is the same, but for an ext4 filesystem "
15540 "on a 1GB disk instead."
15544 #: ../fish/guestfish.pod:718
15545 msgid "To list the available types and any extra parameters they take, run:"
15549 #: ../fish/guestfish.pod:722
15551 "Note that the prepared filesystem is not mounted. You would usually have to "
15552 "use the C<mount /dev/sda1 /> command or add the I<-m /dev/sda1> option."
15556 #: ../fish/guestfish.pod:726
15558 "If any I<-N> or I<--new> options are given, the guest is automatically "
15563 #: ../fish/guestfish.pod:731
15564 msgid "Create a 100MB disk with an ext4-formatted partition:"
15568 #: ../fish/guestfish.pod:733
15571 " guestfish -N fs:ext4\n"
15576 #: ../fish/guestfish.pod:735
15577 msgid "Create a 32MB disk with a VFAT-formatted partition, and mount it:"
15581 #: ../fish/guestfish.pod:737
15584 " guestfish -N fs:vfat:32M -m /dev/sda1\n"
15589 #: ../fish/guestfish.pod:739
15590 msgid "Create a blank 200MB disk:"
15594 #: ../fish/guestfish.pod:741
15597 " guestfish -N disk:200M\n"
15602 #: ../fish/guestfish.pod:743
15603 msgid "PROGRESS BARS"
15607 #: ../fish/guestfish.pod:745
15609 "Some (not all) long-running commands send progress notification messages as "
15610 "they are running. Guestfish turns these messages into progress bars."
15614 #: ../fish/guestfish.pod:749
15616 "When a command that supports progress bars takes longer than two seconds to "
15617 "run, and if progress bars are enabled, then you will see one appearing below "
15622 #: ../fish/guestfish.pod:753
15625 " ><fs> copy-size /large-file /another-file 2048M\n"
15626 " / 10% [#####-----------------------------------------] 00:30\n"
15631 #: ../fish/guestfish.pod:756
15633 "The spinner on the left hand side moves round once for every progress "
15634 "notification received from the backend. This is a (reasonably) golden "
15635 "assurance that the command is \"doing something\" even if the progress bar "
15636 "is not moving, because the command is able to send the progress "
15637 "notifications. When the bar reaches 100% and the command finishes, the "
15638 "spinner disappears."
15642 #: ../fish/guestfish.pod:763
15644 "Progress bars are enabled by default when guestfish is used interactively. "
15645 "You can enable them even for non-interactive modes using I<--progress-bars>, "
15646 "and you can disable them completely using I<--no-progress-bars>."
15650 #: ../fish/guestfish.pod:768
15651 msgid "GUESTFISH COMMANDS"
15655 #: ../fish/guestfish.pod:770
15657 "The commands in this section are guestfish convenience commands, in other "
15658 "words, they are not part of the L<guestfs(3)> API."
15662 #: ../fish/guestfish.pod:773
15663 msgid "alloc | allocate"
15667 #: ../fish/guestfish.pod:775
15670 " alloc filename size\n"
15675 #: ../fish/guestfish.pod:777
15677 "This creates an empty (zeroed) file of the given size, and then adds so it "
15678 "can be further examined."
15682 #: ../fish/guestfish.pod:780 ../fish/guestfish.pod:875
15683 msgid "For more advanced image creation, see L<qemu-img(1)> utility."
15687 #: ../fish/guestfish.pod:782 ../fish/guestfish.pod:877
15688 msgid "Size can be specified using standard suffixes, eg. C<1M>."
15692 #: ../fish/guestfish.pod:784
15697 #: ../fish/guestfish.pod:786
15700 " echo [params ...]\n"
15705 #: ../fish/guestfish.pod:788
15706 msgid "This echos the parameters to the terminal."
15710 #: ../fish/guestfish.pod:790
15711 msgid "edit | vi | emacs"
15715 #: ../fish/guestfish.pod:792
15723 #: ../fish/guestfish.pod:794
15725 "This is used to edit a file. It downloads the file, edits it locally using "
15726 "your editor, then uploads the result."
15730 #: ../fish/guestfish.pod:797
15732 "The editor is C<$EDITOR>. However if you use the alternate commands C<vi> "
15733 "or C<emacs> you will get those corresponding editors."
15737 #: ../fish/guestfish.pod:801 ../fish/guestfish.pod:847
15739 "NOTE: This will not work reliably for large files (> 2 MB) or binary files "
15740 "containing \\0 bytes."
15744 #: ../fish/guestfish.pod:804
15749 #: ../fish/guestfish.pod:806
15752 " glob command args...\n"
15757 #: ../fish/guestfish.pod:808
15759 "Expand wildcards in any paths in the args list, and run C<command> "
15760 "repeatedly on each matching path."
15764 #: ../fish/guestfish.pod:811
15765 msgid "See section WILDCARDS AND GLOBBING."
15769 #: ../fish/guestfish.pod:813
15774 #: ../fish/guestfish.pod:815
15783 #: ../fish/guestfish.pod:818
15785 "Without any parameter, this lists all commands. With a C<cmd> parameter, "
15786 "this displays detailed help for a command."
15790 #: ../fish/guestfish.pod:821
15795 #: ../fish/guestfish.pod:823
15803 #: ../fish/guestfish.pod:825
15804 msgid "Change the local directory, ie. the current directory of guestfish itself."
15808 #: ../fish/guestfish.pod:828
15809 msgid "Note that C<!cd> won't do what you might expect."
15813 #: ../fish/guestfish.pod:830
15814 msgid "man | manual"
15818 #: ../fish/guestfish.pod:832
15826 #: ../fish/guestfish.pod:834
15827 msgid "Opens the manual page for guestfish."
15831 #: ../fish/guestfish.pod:836
15832 msgid "more | less"
15836 #: ../fish/guestfish.pod:838
15844 #: ../fish/guestfish.pod:840
15852 #: ../fish/guestfish.pod:842
15853 msgid "This is used to view a file."
15857 #: ../fish/guestfish.pod:844
15859 "The default viewer is C<$PAGER>. However if you use the alternate command "
15860 "C<less> you will get the C<less> command specifically."
15864 #: ../fish/guestfish.pod:850
15865 msgid "quit | exit"
15869 #: ../fish/guestfish.pod:852
15870 msgid "This exits guestfish. You can also use C<^D> key."
15874 #: ../fish/guestfish.pod:854
15879 #: ../fish/guestfish.pod:856
15887 #: ../fish/guestfish.pod:858
15889 "Close and reopen the libguestfs handle. It is not necessary to use this "
15890 "normally, because the handle is closed properly when guestfish exits. "
15891 "However this is occasionally useful for testing."
15895 #: ../fish/guestfish.pod:862
15900 #: ../fish/guestfish.pod:864
15903 " sparse filename size\n"
15908 #: ../fish/guestfish.pod:866
15910 "This creates an empty sparse file of the given size, and then adds so it can "
15911 "be further examined."
15915 #: ../fish/guestfish.pod:869
15917 "In all respects it works the same as the C<alloc> command, except that the "
15918 "image file is allocated sparsely, which means that disk blocks are not "
15919 "assigned to the file until they are needed. Sparse disk files only use "
15920 "space when written to, but they are slower and there is a danger you could "
15921 "run out of real disk space during a write operation."
15925 #: ../fish/guestfish.pod:879
15930 #: ../fish/guestfish.pod:881
15938 #: ../fish/guestfish.pod:883
15940 "This command returns a list of the optional groups known to the daemon, and "
15941 "indicates which ones are supported by this build of the libguestfs "
15946 #: ../fish/guestfish.pod:887
15947 msgid "See also L<guestfs(3)/AVAILABILITY>."
15951 #: ../fish/guestfish.pod:889
15956 #: ../fish/guestfish.pod:891
15959 " time command args...\n"
15964 #: ../fish/guestfish.pod:893
15966 "Run the command as usual, but print the elapsed time afterwards. This can "
15967 "be useful for benchmarking operations."
15971 #: ../fish/guestfish.pod:896
15976 #: ../fish/guestfish.pod:900 ../test-tool/libguestfs-test-tool.pod:83
15981 #: ../fish/guestfish.pod:902
15983 "guestfish returns 0 if the commands completed without error, or 1 if there "
15988 #: ../fish/guestfish.pod:909
15993 #: ../fish/guestfish.pod:911
15995 "The C<edit> command uses C<$EDITOR> as the editor. If not set, it uses "
16000 #: ../fish/guestfish.pod:914
16001 msgid "GUESTFISH_PID"
16005 #: ../fish/guestfish.pod:916
16007 "Used with the I<--remote> option to specify the remote guestfish process to "
16008 "control. See section L</REMOTE CONTROL GUESTFISH OVER A SOCKET>."
16012 #: ../fish/guestfish.pod:920
16017 #: ../fish/guestfish.pod:922
16019 "If compiled with GNU readline support, various files in the home directory "
16020 "can be used. See L</FILES>."
16024 #: ../fish/guestfish.pod:931
16026 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
16027 "effect as using the B<-v> option."
16031 #: ../fish/guestfish.pod:943
16033 "Set the path that guestfish uses to search for kernel and initrd.img. See "
16034 "the discussion of paths in L<guestfs(3)>."
16038 #: ../fish/guestfish.pod:954
16039 msgid "Set C<LIBGUESTFS_TRACE=1> to enable command traces."
16043 #: ../fish/guestfish.pod:956
16048 #: ../fish/guestfish.pod:958
16050 "The C<more> command uses C<$PAGER> as the pager. If not set, it uses "
16055 #: ../fish/guestfish.pod:973 ../test-tool/libguestfs-test-tool.pod:88
16060 #: ../fish/guestfish.pod:977
16061 msgid "$HOME/.guestfish"
16065 #: ../fish/guestfish.pod:979
16067 "If compiled with GNU readline support, then the command history is saved in "
16072 #: ../fish/guestfish.pod:982
16073 msgid "$HOME/.inputrc"
16077 #: ../fish/guestfish.pod:984
16078 msgid "/etc/inputrc"
16082 #: ../fish/guestfish.pod:986
16084 "If compiled with GNU readline support, then these files can be used to "
16085 "configure readline. For further information, please see "
16086 "L<readline(3)/INITIALIZATION FILE>."
16090 #: ../fish/guestfish.pod:990
16091 msgid "To write rules which only apply to guestfish, use:"
16095 #: ../fish/guestfish.pod:992
16105 #: ../fish/guestfish.pod:996
16107 "Variables that you can set in inputrc that change the behaviour of guestfish "
16108 "in useful ways include:"
16112 #: ../fish/guestfish.pod:1001
16113 msgid "completion-ignore-case (default: on)"
16117 #: ../fish/guestfish.pod:1003
16119 "By default, guestfish will ignore case when tab-completing paths on the "
16124 #: ../fish/guestfish.pod:1006
16127 " set completion-ignore-case off\n"
16132 #: ../fish/guestfish.pod:1008
16133 msgid "to make guestfish case sensitive."
16137 #: ../fish/guestfish.pod:1012
16142 #: ../fish/guestfish.pod:1014
16143 msgid "test2.img (etc)"
16147 #: ../fish/guestfish.pod:1016
16149 "When using the C<-N> or C<--new> option, the prepared disk or filesystem "
16150 "will be created in the file C<test1.img> in the current directory. The "
16151 "second use of C<-N> will use C<test2.img> and so on. Any existing file with "
16152 "the same name will be overwritten."
16156 #: ../fish/guestfish.pod:1025
16158 "L<guestfs(3)>, L<http://libguestfs.org/>, L<virt-cat(1)>, L<virt-df(1)>, "
16159 "L<virt-edit(1)>, L<virt-list-filesystems(1)>, L<virt-list-partitions(1)>, "
16160 "L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-resize(1)>, "
16161 "L<virt-tar(1)>, L<virt-win-reg(1)>."
16165 #: ../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
16167 "This program is free software; you can redistribute it and/or modify it "
16168 "under the terms of the GNU General Public License as published by the Free "
16169 "Software Foundation; either version 2 of the License, or (at your option) "
16170 "any later version."
16174 #: ../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
16176 "This program is distributed in the hope that it will be useful, but WITHOUT "
16177 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
16178 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for "
16183 #: ../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
16185 "You should have received a copy of the GNU General Public License along with "
16186 "this program; if not, write to the Free Software Foundation, Inc., 675 Mass "
16187 "Ave, Cambridge, MA 02139, USA."
16191 #: ../fish/guestfish-actions.pod:1
16192 msgid "add-cdrom | cdrom"
16196 #: ../fish/guestfish-actions.pod:3
16199 " add-cdrom filename\n"
16204 #: ../fish/guestfish-actions.pod:15
16206 "This call checks for the existence of C<filename>. This stops you from "
16207 "specifying other types of drive which are supported by qemu such as C<nbd:> "
16208 "and C<http:> URLs. To specify those, use the general C<config> call "
16213 #: ../fish/guestfish-actions.pod:22
16215 "If you just want to add an ISO file (often you use this as an efficient way "
16216 "to transfer large files into the guest), then you should probably use "
16217 "C<add-drive-ro> instead."
16221 #: ../fish/guestfish-actions.pod:28
16222 msgid "add-drive | add"
16226 #: ../fish/guestfish-actions.pod:30
16229 " add-drive filename\n"
16234 #: ../fish/guestfish-actions.pod:49 ../fish/guestfish-actions.pod:75
16236 "C<if=...> is set at compile time by the configuration option C<./configure "
16237 "--with-drive-if=...>. In the rare case where you might need to change this "
16238 "at run time, use C<add-drive-with-if> or C<add-drive-ro-with-if>."
16242 #: ../fish/guestfish-actions.pod:54 ../fish/guestfish-actions.pod:80
16244 "Note that this call checks for the existence of C<filename>. This stops you "
16245 "from specifying other types of drive which are supported by qemu such as "
16246 "C<nbd:> and C<http:> URLs. To specify those, use the general C<config> call "
16251 #: ../fish/guestfish-actions.pod:59
16252 msgid "add-drive-ro | add-ro"
16256 #: ../fish/guestfish-actions.pod:61
16259 " add-drive-ro filename\n"
16264 #: ../fish/guestfish-actions.pod:85
16265 msgid "add-drive-ro-with-if"
16269 #: ../fish/guestfish-actions.pod:87
16272 " add-drive-ro-with-if filename iface\n"
16277 #: ../fish/guestfish-actions.pod:89
16279 "This is the same as C<add-drive-ro> but it allows you to specify the QEMU "
16280 "interface emulation to use at run time."
16284 #: ../fish/guestfish-actions.pod:92
16285 msgid "add-drive-with-if"
16289 #: ../fish/guestfish-actions.pod:94
16292 " add-drive-with-if filename iface\n"
16297 #: ../fish/guestfish-actions.pod:96
16299 "This is the same as C<add-drive> but it allows you to specify the QEMU "
16300 "interface emulation to use at run time."
16304 #: ../fish/guestfish-actions.pod:99
16309 #: ../fish/guestfish-actions.pod:101
16312 " aug-clear augpath\n"
16317 #: ../fish/guestfish-actions.pod:106
16322 #: ../fish/guestfish-actions.pod:108
16330 #: ../fish/guestfish-actions.pod:110
16332 "Close the current Augeas handle and free up any resources used by it. After "
16333 "calling this, you have to call C<aug-init> again before you can use any "
16334 "other Augeas functions."
16338 #: ../fish/guestfish-actions.pod:115
16339 msgid "aug-defnode"
16343 #: ../fish/guestfish-actions.pod:117
16346 " aug-defnode name expr val\n"
16351 #: ../fish/guestfish-actions.pod:122
16353 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
16354 "calling C<aug-set> C<expr>, C<value>. C<name> will be the nodeset "
16355 "containing that single node."
16359 #: ../fish/guestfish-actions.pod:130
16364 #: ../fish/guestfish-actions.pod:132
16367 " aug-defvar name expr\n"
16372 #: ../fish/guestfish-actions.pod:141
16377 #: ../fish/guestfish-actions.pod:143
16380 " aug-get augpath\n"
16385 #: ../fish/guestfish-actions.pod:148
16390 #: ../fish/guestfish-actions.pod:150
16393 " aug-init root flags\n"
16398 #: ../fish/guestfish-actions.pod:156
16399 msgid "You must call this before using any other C<aug-*> commands."
16403 #: ../fish/guestfish-actions.pod:191
16404 msgid "Do not load the tree in C<aug-init>."
16408 #: ../fish/guestfish-actions.pod:195
16409 msgid "To close the handle, you can call C<aug-close>."
16413 #: ../fish/guestfish-actions.pod:199
16418 #: ../fish/guestfish-actions.pod:201
16421 " aug-insert augpath label true|false\n"
16426 #: ../fish/guestfish-actions.pod:211
16431 #: ../fish/guestfish-actions.pod:213
16439 #: ../fish/guestfish-actions.pod:220
16444 #: ../fish/guestfish-actions.pod:222
16447 " aug-ls augpath\n"
16452 #: ../fish/guestfish-actions.pod:224
16454 "This is just a shortcut for listing C<aug-match> C<path/*> and sorting the "
16455 "resulting nodes into alphabetical order."
16459 #: ../fish/guestfish-actions.pod:227
16464 #: ../fish/guestfish-actions.pod:229
16467 " aug-match augpath\n"
16472 #: ../fish/guestfish-actions.pod:235
16477 #: ../fish/guestfish-actions.pod:237
16480 " aug-mv src dest\n"
16485 #: ../fish/guestfish-actions.pod:242
16490 #: ../fish/guestfish-actions.pod:244
16493 " aug-rm augpath\n"
16498 #: ../fish/guestfish-actions.pod:250
16503 #: ../fish/guestfish-actions.pod:252
16511 #: ../fish/guestfish-actions.pod:256
16513 "The flags which were passed to C<aug-init> affect exactly how files are "
16518 #: ../fish/guestfish-actions.pod:259
16523 #: ../fish/guestfish-actions.pod:261
16526 " aug-set augpath val\n"
16531 #: ../fish/guestfish-actions.pod:265
16533 "In the Augeas API, it is possible to clear a node by setting the value to "
16534 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
16535 "this call. Instead you must use the C<aug-clear> call."
16539 #: ../fish/guestfish-actions.pod:270
16544 #: ../fish/guestfish-actions.pod:272
16547 " available 'groups ...'\n"
16552 #: ../fish/guestfish-actions.pod:278
16554 "The libguestfs groups, and the functions that those groups correspond to, "
16555 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
16556 "runtime by calling C<available-all-groups>."
16560 #: ../fish/guestfish-actions.pod:302
16561 msgid "You must call C<launch> before calling this function."
16565 #: ../fish/guestfish-actions.pod:324
16567 "This call was added in version C<1.0.80>. In previous versions of "
16568 "libguestfs all you could do would be to speculatively execute a command to "
16569 "find out if the daemon implemented it. See also C<version>."
16573 #: ../fish/guestfish-actions.pod:331
16574 msgid "available-all-groups"
16578 #: ../fish/guestfish-actions.pod:333
16581 " available-all-groups\n"
16586 #: ../fish/guestfish-actions.pod:335
16588 "This command returns a list of all optional groups that this daemon knows "
16589 "about. Note this returns both supported and unsupported groups. To find "
16590 "out which ones the daemon can actually support you have to call C<available> "
16591 "on each member of the returned list."
16595 #: ../fish/guestfish-actions.pod:341
16596 msgid "See also C<available> and L<guestfs(3)/AVAILABILITY>."
16600 #: ../fish/guestfish-actions.pod:343
16605 #: ../fish/guestfish-actions.pod:345
16608 " base64-in (base64file|-) filename\n"
16613 #: ../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
16614 msgid "Use C<-> instead of a filename to read/write from stdin/stdout."
16618 #: ../fish/guestfish-actions.pod:352
16623 #: ../fish/guestfish-actions.pod:354
16626 " base64-out filename (base64file|-)\n"
16631 #: ../fish/guestfish-actions.pod:361
16632 msgid "blockdev-flushbufs"
16636 #: ../fish/guestfish-actions.pod:363
16639 " blockdev-flushbufs device\n"
16644 #: ../fish/guestfish-actions.pod:370
16645 msgid "blockdev-getbsz"
16649 #: ../fish/guestfish-actions.pod:372
16652 " blockdev-getbsz device\n"
16657 #: ../fish/guestfish-actions.pod:381
16658 msgid "blockdev-getro"
16662 #: ../fish/guestfish-actions.pod:383
16665 " blockdev-getro device\n"
16670 #: ../fish/guestfish-actions.pod:390
16671 msgid "blockdev-getsize64"
16675 #: ../fish/guestfish-actions.pod:392
16678 " blockdev-getsize64 device\n"
16683 #: ../fish/guestfish-actions.pod:396
16684 msgid "See also C<blockdev-getsz>."
16688 #: ../fish/guestfish-actions.pod:400
16689 msgid "blockdev-getss"
16693 #: ../fish/guestfish-actions.pod:402
16696 " blockdev-getss device\n"
16701 #: ../fish/guestfish-actions.pod:407
16702 msgid "(Note, this is not the size in sectors, use C<blockdev-getsz> for that)."
16706 #: ../fish/guestfish-actions.pod:412
16707 msgid "blockdev-getsz"
16711 #: ../fish/guestfish-actions.pod:414
16714 " blockdev-getsz device\n"
16719 #: ../fish/guestfish-actions.pod:419
16721 "See also C<blockdev-getss> for the real sector size of the device, and "
16722 "C<blockdev-getsize64> for the more useful I<size in bytes>."
16726 #: ../fish/guestfish-actions.pod:425
16727 msgid "blockdev-rereadpt"
16731 #: ../fish/guestfish-actions.pod:427
16734 " blockdev-rereadpt device\n"
16739 #: ../fish/guestfish-actions.pod:433
16740 msgid "blockdev-setbsz"
16744 #: ../fish/guestfish-actions.pod:435
16747 " blockdev-setbsz device blocksize\n"
16752 #: ../fish/guestfish-actions.pod:444
16753 msgid "blockdev-setro"
16757 #: ../fish/guestfish-actions.pod:446
16760 " blockdev-setro device\n"
16765 #: ../fish/guestfish-actions.pod:452
16766 msgid "blockdev-setrw"
16770 #: ../fish/guestfish-actions.pod:454
16773 " blockdev-setrw device\n"
16778 #: ../fish/guestfish-actions.pod:460
16779 msgid "case-sensitive-path"
16783 #: ../fish/guestfish-actions.pod:462
16786 " case-sensitive-path path\n"
16791 #: ../fish/guestfish-actions.pod:486
16793 "Thus C<case-sensitive-path> (\"/Windows/System32\") might return "
16794 "C<\"/WINDOWS/system32\"> (the exact return value would depend on details of "
16795 "how the directories were originally created under Windows)."
16799 #: ../fish/guestfish-actions.pod:494
16800 msgid "See also C<realpath>."
16804 #: ../fish/guestfish-actions.pod:496
16809 #: ../fish/guestfish-actions.pod:498
16817 #: ../fish/guestfish-actions.pod:502
16819 "Note that this function cannot correctly handle binary files (specifically, "
16820 "files containing C<\\0> character which is treated as end of string). For "
16821 "those you need to use the C<read-file> or C<download> functions which have a "
16822 "more complex interface."
16826 #: ../fish/guestfish-actions.pod:510
16831 #: ../fish/guestfish-actions.pod:512
16834 " checksum csumtype path\n"
16839 #: ../fish/guestfish-actions.pod:555
16840 msgid "To get the checksum for a device, use C<checksum-device>."
16844 #: ../fish/guestfish-actions.pod:557
16845 msgid "To get the checksums for many files, use C<checksums-out>."
16849 #: ../fish/guestfish-actions.pod:559
16850 msgid "checksum-device"
16854 #: ../fish/guestfish-actions.pod:561
16857 " checksum-device csumtype device\n"
16862 #: ../fish/guestfish-actions.pod:563
16864 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
16865 "device named C<device>. For the types of checksums supported see the "
16866 "C<checksum> command."
16870 #: ../fish/guestfish-actions.pod:567
16871 msgid "checksums-out"
16875 #: ../fish/guestfish-actions.pod:569
16878 " checksums-out csumtype directory (sumsfile|-)\n"
16883 #: ../fish/guestfish-actions.pod:585
16888 #: ../fish/guestfish-actions.pod:587
16891 " chmod mode path\n"
16896 #: ../fish/guestfish-actions.pod:598
16901 #: ../fish/guestfish-actions.pod:600
16904 " chown owner group path\n"
16909 #: ../fish/guestfish-actions.pod:608
16914 #: ../fish/guestfish-actions.pod:610
16917 " command 'arguments ...'\n"
16922 #: ../fish/guestfish-actions.pod:617
16924 "The single parameter is an argv-style list of arguments. The first element "
16925 "is the name of the program to run. Subsequent elements are parameters. The "
16926 "list must be non-empty (ie. must contain a program name). Note that the "
16927 "command runs directly, and is I<not> invoked via the shell (see C<sh>)."
16931 #: ../fish/guestfish-actions.pod:645
16932 msgid "command-lines"
16936 #: ../fish/guestfish-actions.pod:647
16939 " command-lines 'arguments ...'\n"
16944 #: ../fish/guestfish-actions.pod:649
16945 msgid "This is the same as C<command>, but splits the result into a list of lines."
16949 #: ../fish/guestfish-actions.pod:652
16950 msgid "See also: C<sh-lines>"
16954 #: ../fish/guestfish-actions.pod:657
16959 #: ../fish/guestfish-actions.pod:659
16962 " config qemuparam qemuvalue\n"
16967 #: ../fish/guestfish-actions.pod:670
16972 #: ../fish/guestfish-actions.pod:672
16975 " copy-size src dest size\n"
16980 #: ../fish/guestfish-actions.pod:680
16985 #: ../fish/guestfish-actions.pod:682
16993 #: ../fish/guestfish-actions.pod:687
16998 #: ../fish/guestfish-actions.pod:689
17006 #: ../fish/guestfish-actions.pod:694
17011 #: ../fish/guestfish-actions.pod:696
17019 #: ../fish/guestfish-actions.pod:703
17021 "If the destination is a device, it must be as large or larger than the "
17022 "source file or device, otherwise the copy will fail. This command cannot do "
17023 "partial copies (see C<copy-size>)."
17027 #: ../fish/guestfish-actions.pod:707
17032 #: ../fish/guestfish-actions.pod:709
17035 " debug subcmd 'extraargs ...'\n"
17040 #: ../fish/guestfish-actions.pod:711
17042 "The C<debug> command exposes some internals of C<guestfsd> (the guestfs "
17043 "daemon) that runs inside the qemu subprocess."
17047 #: ../fish/guestfish-actions.pod:719
17048 msgid "debug-upload"
17052 #: ../fish/guestfish-actions.pod:721
17055 " debug-upload (filename|-) tmpname mode\n"
17060 #: ../fish/guestfish-actions.pod:723
17061 msgid "The C<debug-upload> command uploads a file to the libguestfs appliance."
17065 #: ../fish/guestfish-actions.pod:732
17070 #: ../fish/guestfish-actions.pod:734
17078 #: ../fish/guestfish-actions.pod:742
17083 #: ../fish/guestfish-actions.pod:744
17091 #: ../fish/guestfish-actions.pod:753
17096 #: ../fish/guestfish-actions.pod:755
17104 #: ../fish/guestfish-actions.pod:761
17106 "Another way to get the same information is to enable verbose messages with "
17107 "C<set-verbose> or by setting the environment variable C<LIBGUESTFS_DEBUG=1> "
17108 "before running the program."
17112 #: ../fish/guestfish-actions.pod:766
17117 #: ../fish/guestfish-actions.pod:768
17120 " download remotefilename (filename|-)\n"
17125 #: ../fish/guestfish-actions.pod:775
17126 msgid "See also C<upload>, C<cat>."
17130 #: ../fish/guestfish-actions.pod:779
17131 msgid "drop-caches"
17135 #: ../fish/guestfish-actions.pod:781
17138 " drop-caches whattodrop\n"
17143 #: ../fish/guestfish-actions.pod:793
17148 #: ../fish/guestfish-actions.pod:795
17156 #: ../fish/guestfish-actions.pod:807
17161 #: ../fish/guestfish-actions.pod:809
17164 " e2fsck-f device\n"
17169 #: ../fish/guestfish-actions.pod:815
17171 "This command is only needed because of C<resize2fs> (q.v.). Normally you "
17172 "should use C<fsck>."
17176 #: ../fish/guestfish-actions.pod:818
17177 msgid "echo-daemon"
17181 #: ../fish/guestfish-actions.pod:820
17184 " echo-daemon 'words ...'\n"
17189 #: ../fish/guestfish-actions.pod:827
17190 msgid "See also C<ping-daemon>."
17194 #: ../fish/guestfish-actions.pod:829
17199 #: ../fish/guestfish-actions.pod:831
17202 " egrep regex path\n"
17207 #: ../fish/guestfish-actions.pod:839
17212 #: ../fish/guestfish-actions.pod:841
17215 " egrepi regex path\n"
17220 #: ../fish/guestfish-actions.pod:849
17225 #: ../fish/guestfish-actions.pod:851
17228 " equal file1 file2\n"
17233 #: ../fish/guestfish-actions.pod:858
17238 #: ../fish/guestfish-actions.pod:860
17246 #: ../fish/guestfish-actions.pod:865
17247 msgid "See also C<is-file>, C<is-dir>, C<stat>."
17251 #: ../fish/guestfish-actions.pod:867
17256 #: ../fish/guestfish-actions.pod:869
17259 " fallocate path len\n"
17264 #: ../fish/guestfish-actions.pod:886
17265 msgid "fallocate64"
17269 #: ../fish/guestfish-actions.pod:888
17272 " fallocate64 path len\n"
17277 #: ../fish/guestfish-actions.pod:894
17279 "Note that this call allocates disk blocks for the file. To create a sparse "
17280 "file use C<truncate-size> instead."
17284 #: ../fish/guestfish-actions.pod:897
17286 "The deprecated call C<fallocate> does the same, but owing to an oversight it "
17287 "only allowed 30 bit lengths to be specified, effectively limiting the "
17288 "maximum size of files created through that call to 1GB."
17292 #: ../fish/guestfish-actions.pod:906
17297 #: ../fish/guestfish-actions.pod:908
17300 " fgrep pattern path\n"
17305 #: ../fish/guestfish-actions.pod:916
17310 #: ../fish/guestfish-actions.pod:918
17313 " fgrepi pattern path\n"
17318 #: ../fish/guestfish-actions.pod:926
17323 #: ../fish/guestfish-actions.pod:928
17331 #: ../fish/guestfish-actions.pod:940
17333 "This command can also be used on C</dev/> devices (and partitions, LV "
17334 "names). You can for example use this to determine if a device contains a "
17335 "filesystem, although it's usually better to use C<vfs-type>."
17339 #: ../fish/guestfish-actions.pod:950
17340 msgid "file-architecture"
17344 #: ../fish/guestfish-actions.pod:952
17347 " file-architecture filename\n"
17352 #: ../fish/guestfish-actions.pod:1055
17357 #: ../fish/guestfish-actions.pod:1057
17365 #: ../fish/guestfish-actions.pod:1061
17367 "To get other stats about a file, use C<stat>, C<lstat>, C<is-dir>, "
17368 "C<is-file> etc. To get the size of block devices, use "
17369 "C<blockdev-getsize64>."
17373 #: ../fish/guestfish-actions.pod:1065
17378 #: ../fish/guestfish-actions.pod:1067
17381 " fill c len path\n"
17386 #: ../fish/guestfish-actions.pod:1073
17388 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
17389 "C<truncate-size>. To create a file with a pattern of repeating bytes use "
17394 #: ../fish/guestfish-actions.pod:1078
17395 msgid "fill-pattern"
17399 #: ../fish/guestfish-actions.pod:1080
17402 " fill-pattern pattern len path\n"
17407 #: ../fish/guestfish-actions.pod:1082
17409 "This function is like C<fill> except that it creates a new file of length "
17410 "C<len> containing the repeating pattern of bytes in C<pattern>. The pattern "
17411 "is truncated if necessary to ensure the length of the file is exactly C<len> "
17416 #: ../fish/guestfish-actions.pod:1087
17421 #: ../fish/guestfish-actions.pod:1089
17424 " find directory\n"
17429 #: ../fish/guestfish-actions.pod:1103
17430 msgid "then the returned list from C<find> C</tmp> would be 4 elements:"
17434 #: ../fish/guestfish-actions.pod:1116
17435 msgid "See also C<find0>."
17439 #: ../fish/guestfish-actions.pod:1121
17444 #: ../fish/guestfish-actions.pod:1123
17447 " find0 directory (files|-)\n"
17452 #: ../fish/guestfish-actions.pod:1129
17453 msgid "This command works the same way as C<find> with the following exceptions:"
17457 #: ../fish/guestfish-actions.pod:1156
17458 msgid "findfs-label"
17462 #: ../fish/guestfish-actions.pod:1158
17465 " findfs-label label\n"
17470 #: ../fish/guestfish-actions.pod:1164
17471 msgid "To find the label of a filesystem, use C<vfs-label>."
17475 #: ../fish/guestfish-actions.pod:1166
17476 msgid "findfs-uuid"
17480 #: ../fish/guestfish-actions.pod:1168
17483 " findfs-uuid uuid\n"
17488 #: ../fish/guestfish-actions.pod:1174
17489 msgid "To find the UUID of a filesystem, use C<vfs-uuid>."
17493 #: ../fish/guestfish-actions.pod:1176
17498 #: ../fish/guestfish-actions.pod:1178
17501 " fsck fstype device\n"
17506 #: ../fish/guestfish-actions.pod:1208
17511 #: ../fish/guestfish-actions.pod:1210
17519 #: ../fish/guestfish-actions.pod:1217
17520 msgid "get-autosync"
17524 #: ../fish/guestfish-actions.pod:1219
17532 #: ../fish/guestfish-actions.pod:1223
17537 #: ../fish/guestfish-actions.pod:1225
17545 #: ../fish/guestfish-actions.pod:1229
17546 msgid "get-e2label"
17550 #: ../fish/guestfish-actions.pod:1231
17553 " get-e2label device\n"
17558 #: ../fish/guestfish-actions.pod:1243
17563 #: ../fish/guestfish-actions.pod:1245
17566 " get-e2uuid device\n"
17571 #: ../fish/guestfish-actions.pod:1257
17572 msgid "get-memsize"
17576 #: ../fish/guestfish-actions.pod:1259
17584 #: ../fish/guestfish-actions.pod:1264
17586 "If C<set-memsize> was not called on this handle, and if "
17587 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
17588 "value for memsize."
17592 #: ../fish/guestfish-actions.pod:1271
17593 msgid "get-network"
17597 #: ../fish/guestfish-actions.pod:1273
17605 #: ../fish/guestfish-actions.pod:1277
17610 #: ../fish/guestfish-actions.pod:1279
17618 #: ../fish/guestfish-actions.pod:1286
17619 msgid "get-pid | pid"
17623 #: ../fish/guestfish-actions.pod:1288
17631 #: ../fish/guestfish-actions.pod:1295
17636 #: ../fish/guestfish-actions.pod:1297
17644 #: ../fish/guestfish-actions.pod:1304
17645 msgid "get-recovery-proc"
17649 #: ../fish/guestfish-actions.pod:1306
17652 " get-recovery-proc\n"
17657 #: ../fish/guestfish-actions.pod:1310
17658 msgid "get-selinux"
17662 #: ../fish/guestfish-actions.pod:1312
17670 #: ../fish/guestfish-actions.pod:1314
17672 "This returns the current setting of the selinux flag which is passed to the "
17673 "appliance at boot time. See C<set-selinux>."
17677 #: ../fish/guestfish-actions.pod:1320
17682 #: ../fish/guestfish-actions.pod:1322
17690 #: ../fish/guestfish-actions.pod:1329
17695 #: ../fish/guestfish-actions.pod:1331
17703 #: ../fish/guestfish-actions.pod:1335
17708 #: ../fish/guestfish-actions.pod:1337
17716 #: ../fish/guestfish-actions.pod:1339
17718 "Return the current umask. By default the umask is C<022> unless it has been "
17719 "set by calling C<umask>."
17723 #: ../fish/guestfish-actions.pod:1342
17724 msgid "get-verbose"
17728 #: ../fish/guestfish-actions.pod:1344
17736 #: ../fish/guestfish-actions.pod:1348
17741 #: ../fish/guestfish-actions.pod:1350
17749 #: ../fish/guestfish-actions.pod:1354
17750 msgid "See the documentation about SELINUX in L<guestfs(3)>, and C<setcon>"
17754 #: ../fish/guestfish-actions.pod:1357
17759 #: ../fish/guestfish-actions.pod:1359
17762 " getxattrs path\n"
17767 #: ../fish/guestfish-actions.pod:1367
17768 msgid "See also: C<lgetxattrs>, L<attr(5)>."
17772 #: ../fish/guestfish-actions.pod:1369
17773 msgid "glob-expand"
17777 #: ../fish/guestfish-actions.pod:1371
17780 " glob-expand pattern\n"
17785 #: ../fish/guestfish-actions.pod:1384
17790 #: ../fish/guestfish-actions.pod:1386
17793 " grep regex path\n"
17798 #: ../fish/guestfish-actions.pod:1394
17803 #: ../fish/guestfish-actions.pod:1396
17806 " grepi regex path\n"
17811 #: ../fish/guestfish-actions.pod:1404
17812 msgid "grub-install"
17816 #: ../fish/guestfish-actions.pod:1406
17819 " grub-install root device\n"
17824 #: ../fish/guestfish-actions.pod:1422
17829 #: ../fish/guestfish-actions.pod:1424
17837 #: ../fish/guestfish-actions.pod:1432
17842 #: ../fish/guestfish-actions.pod:1434
17845 " head-n nrlines path\n"
17850 #: ../fish/guestfish-actions.pod:1447
17855 #: ../fish/guestfish-actions.pod:1449
17863 #: ../fish/guestfish-actions.pod:1457
17868 #: ../fish/guestfish-actions.pod:1459
17871 " initrd-cat initrdpath filename\n"
17876 #: ../fish/guestfish-actions.pod:1471
17877 msgid "See also C<initrd-list>."
17881 #: ../fish/guestfish-actions.pod:1476
17882 msgid "initrd-list"
17886 #: ../fish/guestfish-actions.pod:1478
17889 " initrd-list path\n"
17894 #: ../fish/guestfish-actions.pod:1490
17895 msgid "inotify-add-watch"
17899 #: ../fish/guestfish-actions.pod:1492
17902 " inotify-add-watch path mask\n"
17907 #: ../fish/guestfish-actions.pod:1504
17908 msgid "inotify-close"
17912 #: ../fish/guestfish-actions.pod:1506
17920 #: ../fish/guestfish-actions.pod:1512
17921 msgid "inotify-files"
17925 #: ../fish/guestfish-actions.pod:1514
17933 #: ../fish/guestfish-actions.pod:1516
17935 "This function is a helpful wrapper around C<inotify-read> which just returns "
17936 "a list of pathnames of objects that were touched. The returned pathnames "
17937 "are sorted and deduplicated."
17941 #: ../fish/guestfish-actions.pod:1520
17942 msgid "inotify-init"
17946 #: ../fish/guestfish-actions.pod:1522
17949 " inotify-init maxevents\n"
17954 #: ../fish/guestfish-actions.pod:1528
17956 "C<maxevents> is the maximum number of events which will be queued up between "
17957 "calls to C<inotify-read> or C<inotify-files>. If this is passed as C<0>, "
17958 "then the kernel (or previously set) default is used. For Linux 2.6.29 the "
17959 "default was 16384 events. Beyond this limit, the kernel throws away events, "
17960 "but records the fact that it threw them away by setting a flag "
17961 "C<IN_Q_OVERFLOW> in the returned structure list (see C<inotify-read>)."
17965 #: ../fish/guestfish-actions.pod:1538
17967 "Before any events are generated, you have to add some watches to the "
17968 "internal watch list. See: C<inotify-add-watch>, C<inotify-rm-watch> and "
17969 "C<inotify-watch-all>."
17973 #: ../fish/guestfish-actions.pod:1544
17975 "Queued up events should be read periodically by calling C<inotify-read> (or "
17976 "C<inotify-files> which is just a helpful wrapper around C<inotify-read>). "
17977 "If you don't read the events out often enough then you risk the internal "
17978 "queue overflowing."
17982 #: ../fish/guestfish-actions.pod:1551
17984 "The handle should be closed after use by calling C<inotify-close>. This "
17985 "also removes any watches automatically."
17989 #: ../fish/guestfish-actions.pod:1560
17990 msgid "inotify-read"
17994 #: ../fish/guestfish-actions.pod:1562
18002 #: ../fish/guestfish-actions.pod:1575
18003 msgid "inotify-rm-watch"
18007 #: ../fish/guestfish-actions.pod:1577
18010 " inotify-rm-watch wd\n"
18015 #: ../fish/guestfish-actions.pod:1579
18016 msgid "Remove a previously defined inotify watch. See C<inotify-add-watch>."
18020 #: ../fish/guestfish-actions.pod:1582
18021 msgid "inspect-get-arch"
18025 #: ../fish/guestfish-actions.pod:1584
18028 " inspect-get-arch root\n"
18033 #: ../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
18035 "This function should only be called with a root device string as returned by "
18040 #: ../fish/guestfish-actions.pod:1589
18042 "This returns the architecture of the inspected operating system. The "
18043 "possible return values are listed under C<file-architecture>."
18047 #: ../fish/guestfish-actions.pod:1598
18048 msgid "inspect-get-distro"
18052 #: ../fish/guestfish-actions.pod:1600
18055 " inspect-get-distro root\n"
18060 #: ../fish/guestfish-actions.pod:1644
18061 msgid "inspect-get-filesystems"
18065 #: ../fish/guestfish-actions.pod:1646
18068 " inspect-get-filesystems root\n"
18073 #: ../fish/guestfish-actions.pod:1659
18075 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
18076 "C<inspect-get-mountpoints>."
18080 #: ../fish/guestfish-actions.pod:1662
18081 msgid "inspect-get-major-version"
18085 #: ../fish/guestfish-actions.pod:1664
18088 " inspect-get-major-version root\n"
18093 #: ../fish/guestfish-actions.pod:1683
18094 msgid "inspect-get-minor-version"
18098 #: ../fish/guestfish-actions.pod:1685
18101 " inspect-get-minor-version root\n"
18106 #: ../fish/guestfish-actions.pod:1695
18108 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
18109 "C<inspect-get-major-version>."
18113 #: ../fish/guestfish-actions.pod:1698
18114 msgid "inspect-get-mountpoints"
18118 #: ../fish/guestfish-actions.pod:1700
18121 " inspect-get-mountpoints root\n"
18126 #: ../fish/guestfish-actions.pod:1718
18128 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
18129 "C<inspect-get-filesystems>."
18133 #: ../fish/guestfish-actions.pod:1721
18134 msgid "inspect-get-product-name"
18138 #: ../fish/guestfish-actions.pod:1723
18141 " inspect-get-product-name root\n"
18146 #: ../fish/guestfish-actions.pod:1738
18147 msgid "inspect-get-type"
18151 #: ../fish/guestfish-actions.pod:1740
18154 " inspect-get-type root\n"
18159 #: ../fish/guestfish-actions.pod:1769
18164 #: ../fish/guestfish-actions.pod:1771
18172 #: ../fish/guestfish-actions.pod:1786
18174 "You can pass the root string(s) returned to other C<inspect-get-*> functions "
18175 "in order to query further information about each operating system, such as "
18176 "the name and version."
18180 #: ../fish/guestfish-actions.pod:1791
18182 "This function uses other libguestfs features such as C<mount-ro> and "
18183 "C<umount-all> in order to mount and unmount filesystems and look at the "
18184 "contents. This should be called with no disks currently mounted. The "
18185 "function may also use Augeas, so any existing Augeas handle will be closed."
18189 #: ../fish/guestfish-actions.pod:1803
18194 #: ../fish/guestfish-actions.pod:1805
18202 #: ../fish/guestfish-actions.pod:1812
18207 #: ../fish/guestfish-actions.pod:1814
18215 #: ../fish/guestfish-actions.pod:1821
18220 #: ../fish/guestfish-actions.pod:1823
18228 #: ../fish/guestfish-actions.pod:1829 ../fish/guestfish-actions.pod:1839
18229 msgid "See also C<stat>."
18233 #: ../fish/guestfish-actions.pod:1831
18238 #: ../fish/guestfish-actions.pod:1833
18246 #: ../fish/guestfish-actions.pod:1841
18247 msgid "is-launching"
18251 #: ../fish/guestfish-actions.pod:1843
18259 #: ../fish/guestfish-actions.pod:1850
18264 #: ../fish/guestfish-actions.pod:1852
18272 #: ../fish/guestfish-actions.pod:1857
18277 #: ../fish/guestfish-actions.pod:1859
18285 #: ../fish/guestfish-actions.pod:1866
18286 msgid "kill-subprocess"
18290 #: ../fish/guestfish-actions.pod:1868
18293 " kill-subprocess\n"
18298 #: ../fish/guestfish-actions.pod:1872
18299 msgid "launch | run"
18303 #: ../fish/guestfish-actions.pod:1874
18311 #: ../fish/guestfish-actions.pod:1882
18316 #: ../fish/guestfish-actions.pod:1884
18319 " lchown owner group path\n"
18324 #: ../fish/guestfish-actions.pod:1886
18326 "Change the file owner to C<owner> and group to C<group>. This is like "
18327 "C<chown> but if C<path> is a symlink then the link itself is changed, not "
18332 #: ../fish/guestfish-actions.pod:1894
18337 #: ../fish/guestfish-actions.pod:1896
18340 " lgetxattrs path\n"
18345 #: ../fish/guestfish-actions.pod:1898
18347 "This is the same as C<getxattrs>, but if C<path> is a symbolic link, then it "
18348 "returns the extended attributes of the link itself."
18352 #: ../fish/guestfish-actions.pod:1902
18353 msgid "list-devices"
18357 #: ../fish/guestfish-actions.pod:1904
18365 #: ../fish/guestfish-actions.pod:1910
18366 msgid "list-partitions"
18370 #: ../fish/guestfish-actions.pod:1912
18373 " list-partitions\n"
18378 #: ../fish/guestfish-actions.pod:1918
18380 "This does not return logical volumes. For that you will need to call "
18385 #: ../fish/guestfish-actions.pod:1921
18390 #: ../fish/guestfish-actions.pod:1923
18398 #: ../fish/guestfish-actions.pod:1931
18403 #: ../fish/guestfish-actions.pod:1933
18406 " ln target linkname\n"
18411 #: ../fish/guestfish-actions.pod:1937
18416 #: ../fish/guestfish-actions.pod:1939
18419 " ln-f target linkname\n"
18424 #: ../fish/guestfish-actions.pod:1944
18429 #: ../fish/guestfish-actions.pod:1946
18432 " ln-s target linkname\n"
18437 #: ../fish/guestfish-actions.pod:1950
18442 #: ../fish/guestfish-actions.pod:1952
18445 " ln-sf target linkname\n"
18450 #: ../fish/guestfish-actions.pod:1957
18451 msgid "lremovexattr"
18455 #: ../fish/guestfish-actions.pod:1959
18458 " lremovexattr xattr path\n"
18463 #: ../fish/guestfish-actions.pod:1961
18465 "This is the same as C<removexattr>, but if C<path> is a symbolic link, then "
18466 "it removes an extended attribute of the link itself."
18470 #: ../fish/guestfish-actions.pod:1965
18475 #: ../fish/guestfish-actions.pod:1967
18483 #: ../fish/guestfish-actions.pod:1973
18485 "This command is mostly useful for interactive sessions. Programs should "
18486 "probably use C<readdir> instead."
18490 #: ../fish/guestfish-actions.pod:1976
18495 #: ../fish/guestfish-actions.pod:1978
18498 " lsetxattr xattr val vallen path\n"
18503 #: ../fish/guestfish-actions.pod:1980
18505 "This is the same as C<setxattr>, but if C<path> is a symbolic link, then it "
18506 "sets an extended attribute of the link itself."
18510 #: ../fish/guestfish-actions.pod:1984
18515 #: ../fish/guestfish-actions.pod:1986
18523 #: ../fish/guestfish-actions.pod:1990
18525 "This is the same as C<stat> except that if C<path> is a symbolic link, then "
18526 "the link is stat-ed, not the file it refers to."
18530 #: ../fish/guestfish-actions.pod:1996
18535 #: ../fish/guestfish-actions.pod:1998
18538 " lstatlist path 'names ...'\n"
18543 #: ../fish/guestfish-actions.pod:2000
18545 "This call allows you to perform the C<lstat> operation on multiple files, "
18546 "where all files are in the directory C<path>. C<names> is the list of files "
18547 "from this directory."
18551 #: ../fish/guestfish-actions.pod:2009
18553 "This call is intended for programs that want to efficiently list a directory "
18554 "contents without making many round-trips. See also C<lxattrlist> for a "
18555 "similarly efficient call for getting extended attributes. Very long "
18556 "directory listings might cause the protocol message size to be exceeded, "
18557 "causing this call to fail. The caller must split up such requests into "
18558 "smaller groups of names."
18562 #: ../fish/guestfish-actions.pod:2017
18563 msgid "luks-add-key"
18567 #: ../fish/guestfish-actions.pod:2019
18570 " luks-add-key device keyslot\n"
18575 #: ../fish/guestfish-actions.pod:2026
18577 "Note that if C<keyslot> already contains a key, then this command will "
18578 "fail. You have to use C<luks-kill-slot> first to remove that key."
18582 #: ../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
18584 "This command has one or more key or passphrase parameters. Guestfish will "
18585 "prompt for these separately."
18589 #: ../fish/guestfish-actions.pod:2033
18594 #: ../fish/guestfish-actions.pod:2035
18597 " luks-close device\n"
18602 #: ../fish/guestfish-actions.pod:2037
18604 "This closes a LUKS device that was created earlier by C<luks-open> or "
18605 "C<luks-open-ro>. The C<device> parameter must be the name of the LUKS "
18606 "mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
18607 "underlying block device."
18611 #: ../fish/guestfish-actions.pod:2043
18612 msgid "luks-format"
18616 #: ../fish/guestfish-actions.pod:2045
18619 " luks-format device keyslot\n"
18624 #: ../fish/guestfish-actions.pod:2058
18625 msgid "luks-format-cipher"
18629 #: ../fish/guestfish-actions.pod:2060
18632 " luks-format-cipher device keyslot cipher\n"
18637 #: ../fish/guestfish-actions.pod:2062
18639 "This command is the same as C<luks-format> but it also allows you to set the "
18644 #: ../fish/guestfish-actions.pod:2071
18645 msgid "luks-kill-slot"
18649 #: ../fish/guestfish-actions.pod:2073
18652 " luks-kill-slot device keyslot\n"
18657 #: ../fish/guestfish-actions.pod:2082
18662 #: ../fish/guestfish-actions.pod:2084
18665 " luks-open device mapname\n"
18670 #: ../fish/guestfish-actions.pod:2098
18672 "If this block device contains LVM volume groups, then calling C<vgscan> "
18673 "followed by C<vg-activate-all> will make them visible."
18677 #: ../fish/guestfish-actions.pod:2105
18678 msgid "luks-open-ro"
18682 #: ../fish/guestfish-actions.pod:2107
18685 " luks-open-ro device mapname\n"
18690 #: ../fish/guestfish-actions.pod:2109
18691 msgid "This is the same as C<luks-open> except that a read-only mapping is created."
18695 #: ../fish/guestfish-actions.pod:2115
18700 #: ../fish/guestfish-actions.pod:2117
18703 " lvcreate logvol volgroup mbytes\n"
18708 #: ../fish/guestfish-actions.pod:2122
18709 msgid "lvm-clear-filter"
18713 #: ../fish/guestfish-actions.pod:2124
18716 " lvm-clear-filter\n"
18721 #: ../fish/guestfish-actions.pod:2126
18723 "This undoes the effect of C<lvm-set-filter>. LVM will be able to see every "
18728 #: ../fish/guestfish-actions.pod:2132
18729 msgid "lvm-remove-all"
18733 #: ../fish/guestfish-actions.pod:2134
18736 " lvm-remove-all\n"
18741 #: ../fish/guestfish-actions.pod:2142
18742 msgid "lvm-set-filter"
18746 #: ../fish/guestfish-actions.pod:2144
18749 " lvm-set-filter 'devices ...'\n"
18754 #: ../fish/guestfish-actions.pod:2169
18759 #: ../fish/guestfish-actions.pod:2171
18762 " lvremove device\n"
18767 #: ../fish/guestfish-actions.pod:2179
18772 #: ../fish/guestfish-actions.pod:2181
18775 " lvrename logvol newlogvol\n"
18780 #: ../fish/guestfish-actions.pod:2185
18785 #: ../fish/guestfish-actions.pod:2187
18788 " lvresize device mbytes\n"
18793 #: ../fish/guestfish-actions.pod:2193
18794 msgid "lvresize-free"
18798 #: ../fish/guestfish-actions.pod:2195
18801 " lvresize-free lv percent\n"
18806 #: ../fish/guestfish-actions.pod:2203
18811 #: ../fish/guestfish-actions.pod:2205
18819 #: ../fish/guestfish-actions.pod:2213
18820 msgid "See also C<lvs-full>."
18824 #: ../fish/guestfish-actions.pod:2215
18829 #: ../fish/guestfish-actions.pod:2217
18837 #: ../fish/guestfish-actions.pod:2222
18842 #: ../fish/guestfish-actions.pod:2224
18850 #: ../fish/guestfish-actions.pod:2228
18855 #: ../fish/guestfish-actions.pod:2230
18858 " lxattrlist path 'names ...'\n"
18863 #: ../fish/guestfish-actions.pod:2246
18865 "This call is intended for programs that want to efficiently list a directory "
18866 "contents without making many round-trips. See also C<lstatlist> for a "
18867 "similarly efficient call for getting standard stats. Very long directory "
18868 "listings might cause the protocol message size to be exceeded, causing this "
18869 "call to fail. The caller must split up such requests into smaller groups of "
18874 #: ../fish/guestfish-actions.pod:2254
18879 #: ../fish/guestfish-actions.pod:2256
18887 #: ../fish/guestfish-actions.pod:2260
18892 #: ../fish/guestfish-actions.pod:2262
18895 " mkdir-mode path mode\n"
18900 #: ../fish/guestfish-actions.pod:2271
18901 msgid "See also C<mkdir>, C<umask>"
18905 #: ../fish/guestfish-actions.pod:2273
18910 #: ../fish/guestfish-actions.pod:2275
18918 #: ../fish/guestfish-actions.pod:2280
18923 #: ../fish/guestfish-actions.pod:2282
18926 " mkdtemp template\n"
18931 #: ../fish/guestfish-actions.pod:2303
18936 #: ../fish/guestfish-actions.pod:2305
18939 " mke2fs-J fstype blocksize device journal\n"
18944 #: ../fish/guestfish-actions.pod:2313
18945 msgid "See also C<mke2journal>."
18949 #: ../fish/guestfish-actions.pod:2315
18954 #: ../fish/guestfish-actions.pod:2317
18957 " mke2fs-JL fstype blocksize device label\n"
18962 #: ../fish/guestfish-actions.pod:2322
18963 msgid "See also C<mke2journal-L>."
18967 #: ../fish/guestfish-actions.pod:2324
18972 #: ../fish/guestfish-actions.pod:2326
18975 " mke2fs-JU fstype blocksize device uuid\n"
18980 #: ../fish/guestfish-actions.pod:2331
18981 msgid "See also C<mke2journal-U>."
18985 #: ../fish/guestfish-actions.pod:2333
18986 msgid "mke2journal"
18990 #: ../fish/guestfish-actions.pod:2335
18993 " mke2journal blocksize device\n"
18998 #: ../fish/guestfish-actions.pod:2342
18999 msgid "mke2journal-L"
19003 #: ../fish/guestfish-actions.pod:2344
19006 " mke2journal-L blocksize label device\n"
19011 #: ../fish/guestfish-actions.pod:2348
19012 msgid "mke2journal-U"
19016 #: ../fish/guestfish-actions.pod:2350
19019 " mke2journal-U blocksize uuid device\n"
19024 #: ../fish/guestfish-actions.pod:2354
19029 #: ../fish/guestfish-actions.pod:2356
19032 " mkfifo mode path\n"
19037 #: ../fish/guestfish-actions.pod:2358
19039 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
19040 "is just a convenient wrapper around C<mknod>."
19044 #: ../fish/guestfish-actions.pod:2364
19049 #: ../fish/guestfish-actions.pod:2366
19052 " mkfs fstype device\n"
19057 #: ../fish/guestfish-actions.pod:2372
19062 #: ../fish/guestfish-actions.pod:2374
19065 " mkfs-b fstype blocksize device\n"
19070 #: ../fish/guestfish-actions.pod:2376
19072 "This call is similar to C<mkfs>, but it allows you to control the block size "
19073 "of the resulting filesystem. Supported block sizes depend on the filesystem "
19074 "type, but typically they are C<1024>, C<2048> or C<4096> only."
19078 #: ../fish/guestfish-actions.pod:2384
19079 msgid "mkmountpoint"
19083 #: ../fish/guestfish-actions.pod:2386
19086 " mkmountpoint exemptpath\n"
19091 #: ../fish/guestfish-actions.pod:2388
19093 "C<mkmountpoint> and C<rmmountpoint> are specialized calls that can be used "
19094 "to create extra mountpoints before mounting the first filesystem."
19098 #: ../fish/guestfish-actions.pod:2412
19103 #: ../fish/guestfish-actions.pod:2414
19106 " mknod mode devmajor devminor path\n"
19111 #: ../fish/guestfish-actions.pod:2424
19113 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
19114 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
19115 "regular file). These constants are available in the standard Linux header "
19116 "files, or you can use C<mknod-b>, C<mknod-c> or C<mkfifo> which are wrappers "
19117 "around this command which bitwise OR in the appropriate constant for you."
19121 #: ../fish/guestfish-actions.pod:2434
19126 #: ../fish/guestfish-actions.pod:2436
19129 " mknod-b mode devmajor devminor path\n"
19134 #: ../fish/guestfish-actions.pod:2438
19136 "This call creates a block device node called C<path> with mode C<mode> and "
19137 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
19138 "wrapper around C<mknod>."
19142 #: ../fish/guestfish-actions.pod:2444
19147 #: ../fish/guestfish-actions.pod:2446
19150 " mknod-c mode devmajor devminor path\n"
19155 #: ../fish/guestfish-actions.pod:2448
19157 "This call creates a char device node called C<path> with mode C<mode> and "
19158 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
19159 "wrapper around C<mknod>."
19163 #: ../fish/guestfish-actions.pod:2454
19168 #: ../fish/guestfish-actions.pod:2456
19176 #: ../fish/guestfish-actions.pod:2460
19181 #: ../fish/guestfish-actions.pod:2462
19184 " mkswap-L label device\n"
19189 #: ../fish/guestfish-actions.pod:2470
19194 #: ../fish/guestfish-actions.pod:2472
19197 " mkswap-U uuid device\n"
19202 #: ../fish/guestfish-actions.pod:2476
19203 msgid "mkswap-file"
19207 #: ../fish/guestfish-actions.pod:2478
19210 " mkswap-file path\n"
19215 #: ../fish/guestfish-actions.pod:2482
19217 "This command just writes a swap file signature to an existing file. To "
19218 "create the file itself, use something like C<fallocate>."
19222 #: ../fish/guestfish-actions.pod:2485
19227 #: ../fish/guestfish-actions.pod:2487
19230 " modprobe modulename\n"
19235 #: ../fish/guestfish-actions.pod:2494
19240 #: ../fish/guestfish-actions.pod:2496
19243 " mount device mountpoint\n"
19248 #: ../fish/guestfish-actions.pod:2512
19250 "B<Important note:> When you use this call, the filesystem options C<sync> "
19251 "and C<noatime> are set implicitly. This was originally done because we "
19252 "thought it would improve reliability, but it turns out that I<-o sync> has a "
19253 "very large negative performance impact and negligible effect on "
19254 "reliability. Therefore we recommend that you avoid using C<mount> in any "
19255 "code that needs performance, and instead use C<mount-options> (use an empty "
19256 "string for the first parameter if you don't want any options)."
19260 #: ../fish/guestfish-actions.pod:2522
19265 #: ../fish/guestfish-actions.pod:2524
19268 " mount-loop file mountpoint\n"
19273 #: ../fish/guestfish-actions.pod:2530
19274 msgid "mount-options"
19278 #: ../fish/guestfish-actions.pod:2532
19281 " mount-options options device mountpoint\n"
19286 #: ../fish/guestfish-actions.pod:2534
19288 "This is the same as the C<mount> command, but it allows you to set the mount "
19289 "options as for the L<mount(8)> I<-o> flag."
19293 #: ../fish/guestfish-actions.pod:2542
19298 #: ../fish/guestfish-actions.pod:2544
19301 " mount-ro device mountpoint\n"
19306 #: ../fish/guestfish-actions.pod:2546
19308 "This is the same as the C<mount> command, but it mounts the filesystem with "
19309 "the read-only (I<-o ro>) flag."
19313 #: ../fish/guestfish-actions.pod:2549
19318 #: ../fish/guestfish-actions.pod:2551
19321 " mount-vfs options vfstype device mountpoint\n"
19326 #: ../fish/guestfish-actions.pod:2553
19328 "This is the same as the C<mount> command, but it allows you to set both the "
19329 "mount options and the vfstype as for the L<mount(8)> I<-o> and I<-t> flags."
19333 #: ../fish/guestfish-actions.pod:2557
19334 msgid "mountpoints"
19338 #: ../fish/guestfish-actions.pod:2559
19346 #: ../fish/guestfish-actions.pod:2561
19348 "This call is similar to C<mounts>. That call returns a list of devices. "
19349 "This one returns a hash table (map) of device name to directory where the "
19350 "device is mounted."
19354 #: ../fish/guestfish-actions.pod:2565
19359 #: ../fish/guestfish-actions.pod:2567
19367 #: ../fish/guestfish-actions.pod:2574
19368 msgid "See also: C<mountpoints>"
19372 #: ../fish/guestfish-actions.pod:2576
19377 #: ../fish/guestfish-actions.pod:2578
19385 #: ../fish/guestfish-actions.pod:2583
19386 msgid "ntfs-3g-probe"
19390 #: ../fish/guestfish-actions.pod:2585
19393 " ntfs-3g-probe true|false device\n"
19398 #: ../fish/guestfish-actions.pod:2599
19403 #: ../fish/guestfish-actions.pod:2601
19406 " ntfsresize device\n"
19411 #: ../fish/guestfish-actions.pod:2607
19412 msgid "ntfsresize-size"
19416 #: ../fish/guestfish-actions.pod:2609
19419 " ntfsresize-size device size\n"
19424 #: ../fish/guestfish-actions.pod:2611
19426 "This command is the same as C<ntfsresize> except that it allows you to "
19427 "specify the new size (in bytes) explicitly."
19431 #: ../fish/guestfish-actions.pod:2614
19436 #: ../fish/guestfish-actions.pod:2616
19439 " part-add device prlogex startsect endsect\n"
19444 #: ../fish/guestfish-actions.pod:2618
19446 "This command adds a partition to C<device>. If there is no partition table "
19447 "on the device, call C<part-init> first."
19451 #: ../fish/guestfish-actions.pod:2630
19453 "Creating a partition which covers the whole disk is not so easy. Use "
19454 "C<part-disk> to do that."
19458 #: ../fish/guestfish-actions.pod:2633
19463 #: ../fish/guestfish-actions.pod:2635
19466 " part-del device partnum\n"
19471 #: ../fish/guestfish-actions.pod:2643
19476 #: ../fish/guestfish-actions.pod:2645
19479 " part-disk device parttype\n"
19484 #: ../fish/guestfish-actions.pod:2647
19486 "This command is simply a combination of C<part-init> followed by C<part-add> "
19487 "to create a single primary partition covering the whole disk."
19491 #: ../fish/guestfish-actions.pod:2651
19493 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
19494 "possible values are described in C<part-init>."
19498 #: ../fish/guestfish-actions.pod:2657
19499 msgid "part-get-bootable"
19503 #: ../fish/guestfish-actions.pod:2659
19506 " part-get-bootable device partnum\n"
19511 #: ../fish/guestfish-actions.pod:2664
19512 msgid "See also C<part-set-bootable>."
19516 #: ../fish/guestfish-actions.pod:2666
19517 msgid "part-get-mbr-id"
19521 #: ../fish/guestfish-actions.pod:2668
19524 " part-get-mbr-id device partnum\n"
19529 #: ../fish/guestfish-actions.pod:2673 ../fish/guestfish-actions.pod:2811
19531 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
19532 "undefined results for other partition table types (see "
19533 "C<part-get-parttype>)."
19537 #: ../fish/guestfish-actions.pod:2677
19538 msgid "part-get-parttype"
19542 #: ../fish/guestfish-actions.pod:2679
19545 " part-get-parttype device\n"
19550 #: ../fish/guestfish-actions.pod:2684
19552 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
19553 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
19554 "possible, although unusual. See C<part-init> for a full list."
19558 #: ../fish/guestfish-actions.pod:2689
19563 #: ../fish/guestfish-actions.pod:2691
19566 " part-init device parttype\n"
19571 #: ../fish/guestfish-actions.pod:2697
19573 "Initially there are no partitions. Following this, you should call "
19574 "C<part-add> for each partition required."
19578 #: ../fish/guestfish-actions.pod:2760
19583 #: ../fish/guestfish-actions.pod:2762
19586 " part-list device\n"
19591 #: ../fish/guestfish-actions.pod:2777
19593 "Start of the partition I<in bytes>. To get sectors you have to divide by "
19594 "the device's sector size, see C<blockdev-getss>."
19598 #: ../fish/guestfish-actions.pod:2790
19599 msgid "part-set-bootable"
19603 #: ../fish/guestfish-actions.pod:2792
19606 " part-set-bootable device partnum true|false\n"
19611 #: ../fish/guestfish-actions.pod:2801
19612 msgid "part-set-mbr-id"
19616 #: ../fish/guestfish-actions.pod:2803
19619 " part-set-mbr-id device partnum idbyte\n"
19624 #: ../fish/guestfish-actions.pod:2815
19625 msgid "part-set-name"
19629 #: ../fish/guestfish-actions.pod:2817
19632 " part-set-name device partnum name\n"
19637 #: ../fish/guestfish-actions.pod:2825
19638 msgid "ping-daemon"
19642 #: ../fish/guestfish-actions.pod:2827
19650 #: ../fish/guestfish-actions.pod:2834
19655 #: ../fish/guestfish-actions.pod:2836
19658 " pread path count offset\n"
19663 #: ../fish/guestfish-actions.pod:2844
19664 msgid "See also C<pwrite>."
19668 #: ../fish/guestfish-actions.pod:2849
19673 #: ../fish/guestfish-actions.pod:2851
19676 " pvcreate device\n"
19681 #: ../fish/guestfish-actions.pod:2857
19686 #: ../fish/guestfish-actions.pod:2859
19689 " pvremove device\n"
19694 #: ../fish/guestfish-actions.pod:2868
19699 #: ../fish/guestfish-actions.pod:2870
19702 " pvresize device\n"
19707 #: ../fish/guestfish-actions.pod:2875
19708 msgid "pvresize-size"
19712 #: ../fish/guestfish-actions.pod:2877
19715 " pvresize-size device size\n"
19720 #: ../fish/guestfish-actions.pod:2879
19722 "This command is the same as C<pvresize> except that it allows you to specify "
19723 "the new size (in bytes) explicitly."
19727 #: ../fish/guestfish-actions.pod:2882
19732 #: ../fish/guestfish-actions.pod:2884
19740 #: ../fish/guestfish-actions.pod:2892
19741 msgid "See also C<pvs-full>."
19745 #: ../fish/guestfish-actions.pod:2894
19750 #: ../fish/guestfish-actions.pod:2896
19758 #: ../fish/guestfish-actions.pod:2901
19763 #: ../fish/guestfish-actions.pod:2903
19771 #: ../fish/guestfish-actions.pod:2907
19776 #: ../fish/guestfish-actions.pod:2909
19779 " pwrite path content offset\n"
19784 #: ../fish/guestfish-actions.pod:2920
19785 msgid "See also C<pread>."
19789 #: ../fish/guestfish-actions.pod:2925
19794 #: ../fish/guestfish-actions.pod:2927
19797 " read-file path\n"
19802 #: ../fish/guestfish-actions.pod:2932
19804 "Unlike C<cat>, this function can correctly handle files that contain "
19805 "embedded ASCII NUL characters. However unlike C<download>, this function is "
19806 "limited in the total size of file that can be handled."
19810 #: ../fish/guestfish-actions.pod:2940
19815 #: ../fish/guestfish-actions.pod:2942
19818 " read-lines path\n"
19823 #: ../fish/guestfish-actions.pod:2949
19825 "Note that this function cannot correctly handle binary files (specifically, "
19826 "files containing C<\\0> character which is treated as end of line). For "
19827 "those you need to use the C<read-file> function which has a more complex "
19832 #: ../fish/guestfish-actions.pod:2954
19837 #: ../fish/guestfish-actions.pod:2956
19845 #: ../fish/guestfish-actions.pod:3008
19847 "This function is primarily intended for use by programs. To get a simple "
19848 "list of names, use C<ls>. To get a printable directory for human "
19849 "consumption, use C<ll>."
19853 #: ../fish/guestfish-actions.pod:3012
19858 #: ../fish/guestfish-actions.pod:3014
19866 #: ../fish/guestfish-actions.pod:3018
19867 msgid "readlinklist"
19871 #: ../fish/guestfish-actions.pod:3020
19874 " readlinklist path 'names ...'\n"
19879 #: ../fish/guestfish-actions.pod:3044
19884 #: ../fish/guestfish-actions.pod:3046
19892 #: ../fish/guestfish-actions.pod:3051
19893 msgid "removexattr"
19897 #: ../fish/guestfish-actions.pod:3053
19900 " removexattr xattr path\n"
19905 #: ../fish/guestfish-actions.pod:3058
19906 msgid "See also: C<lremovexattr>, L<attr(5)>."
19910 #: ../fish/guestfish-actions.pod:3060
19915 #: ../fish/guestfish-actions.pod:3062
19918 " resize2fs device\n"
19923 #: ../fish/guestfish-actions.pod:3067
19925 "I<Note:> It is sometimes required that you run C<e2fsck-f> on the C<device> "
19926 "before calling this command. For unknown reasons C<resize2fs> sometimes "
19927 "gives an error about this and sometimes not. In any case, it is always safe "
19928 "to call C<e2fsck-f> before calling this function."
19932 #: ../fish/guestfish-actions.pod:3073
19933 msgid "resize2fs-size"
19937 #: ../fish/guestfish-actions.pod:3075
19940 " resize2fs-size device size\n"
19945 #: ../fish/guestfish-actions.pod:3077
19947 "This command is the same as C<resize2fs> except that it allows you to "
19948 "specify the new size (in bytes) explicitly."
19952 #: ../fish/guestfish-actions.pod:3080
19957 #: ../fish/guestfish-actions.pod:3082
19965 #: ../fish/guestfish-actions.pod:3086
19970 #: ../fish/guestfish-actions.pod:3088
19978 #: ../fish/guestfish-actions.pod:3094
19983 #: ../fish/guestfish-actions.pod:3096
19991 #: ../fish/guestfish-actions.pod:3100
19992 msgid "rmmountpoint"
19996 #: ../fish/guestfish-actions.pod:3102
19999 " rmmountpoint exemptpath\n"
20004 #: ../fish/guestfish-actions.pod:3104
20006 "This calls removes a mountpoint that was previously created with "
20007 "C<mkmountpoint>. See C<mkmountpoint> for full details."
20011 #: ../fish/guestfish-actions.pod:3108
20012 msgid "scrub-device"
20016 #: ../fish/guestfish-actions.pod:3110
20019 " scrub-device device\n"
20024 #: ../fish/guestfish-actions.pod:3121
20029 #: ../fish/guestfish-actions.pod:3123
20032 " scrub-file file\n"
20037 #: ../fish/guestfish-actions.pod:3133
20038 msgid "scrub-freespace"
20042 #: ../fish/guestfish-actions.pod:3135
20045 " scrub-freespace dir\n"
20050 #: ../fish/guestfish-actions.pod:3137
20052 "This command creates the directory C<dir> and then fills it with files until "
20053 "the filesystem is full, and scrubs the files as for C<scrub-file>, and "
20054 "deletes them. The intention is to scrub any free space on the partition "
20055 "containing C<dir>."
20059 #: ../fish/guestfish-actions.pod:3146
20060 msgid "set-append | append"
20064 #: ../fish/guestfish-actions.pod:3148
20067 " set-append append\n"
20072 #: ../fish/guestfish-actions.pod:3159
20073 msgid "set-autosync | autosync"
20077 #: ../fish/guestfish-actions.pod:3161
20080 " set-autosync true|false\n"
20085 #: ../fish/guestfish-actions.pod:3163
20087 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
20088 "effort attempt to run C<umount-all> followed by C<sync> when the handle is "
20089 "closed (also if the program exits without closing handles)."
20093 #: ../fish/guestfish-actions.pod:3171
20094 msgid "set-direct | direct"
20098 #: ../fish/guestfish-actions.pod:3173
20101 " set-direct true|false\n"
20106 #: ../fish/guestfish-actions.pod:3179
20108 "One consequence of this is that log messages aren't caught by the library "
20109 "and handled by C<set-log-message-callback>, but go straight to stdout."
20113 #: ../fish/guestfish-actions.pod:3188
20114 msgid "set-e2label"
20118 #: ../fish/guestfish-actions.pod:3190
20121 " set-e2label device label\n"
20126 #: ../fish/guestfish-actions.pod:3196
20128 "You can use either C<tune2fs-l> or C<get-e2label> to return the existing "
20129 "label on a filesystem."
20133 #: ../fish/guestfish-actions.pod:3199
20138 #: ../fish/guestfish-actions.pod:3201
20141 " set-e2uuid device uuid\n"
20146 #: ../fish/guestfish-actions.pod:3208
20148 "You can use either C<tune2fs-l> or C<get-e2uuid> to return the existing UUID "
20153 #: ../fish/guestfish-actions.pod:3211
20154 msgid "set-memsize | memsize"
20158 #: ../fish/guestfish-actions.pod:3213
20161 " set-memsize memsize\n"
20166 #: ../fish/guestfish-actions.pod:3215
20168 "This sets the memory size in megabytes allocated to the qemu subprocess. "
20169 "This only has any effect if called before C<launch>."
20173 #: ../fish/guestfish-actions.pod:3226
20174 msgid "set-network | network"
20178 #: ../fish/guestfish-actions.pod:3228
20181 " set-network true|false\n"
20186 #: ../fish/guestfish-actions.pod:3236
20187 msgid "You must call this before calling C<launch>, otherwise it has no effect."
20191 #: ../fish/guestfish-actions.pod:3239
20192 msgid "set-path | path"
20196 #: ../fish/guestfish-actions.pod:3241
20199 " set-path searchpath\n"
20204 #: ../fish/guestfish-actions.pod:3250
20205 msgid "set-qemu | qemu"
20209 #: ../fish/guestfish-actions.pod:3252
20217 #: ../fish/guestfish-actions.pod:3272
20218 msgid "set-recovery-proc | recovery-proc"
20222 #: ../fish/guestfish-actions.pod:3274
20225 " set-recovery-proc true|false\n"
20230 #: ../fish/guestfish-actions.pod:3276
20232 "If this is called with the parameter C<false> then C<launch> does not create "
20233 "a recovery process. The purpose of the recovery process is to stop runaway "
20234 "qemu processes in the case where the main program aborts abruptly."
20238 #: ../fish/guestfish-actions.pod:3281
20240 "This only has any effect if called before C<launch>, and the default is "
20245 #: ../fish/guestfish-actions.pod:3290
20246 msgid "set-selinux | selinux"
20250 #: ../fish/guestfish-actions.pod:3292
20253 " set-selinux true|false\n"
20258 #: ../fish/guestfish-actions.pod:3303
20259 msgid "set-trace | trace"
20263 #: ../fish/guestfish-actions.pod:3305
20266 " set-trace true|false\n"
20271 #: ../fish/guestfish-actions.pod:3321
20272 msgid "set-verbose | verbose"
20276 #: ../fish/guestfish-actions.pod:3323
20279 " set-verbose true|false\n"
20284 #: ../fish/guestfish-actions.pod:3330
20289 #: ../fish/guestfish-actions.pod:3332
20292 " setcon context\n"
20297 #: ../fish/guestfish-actions.pod:3339
20302 #: ../fish/guestfish-actions.pod:3341
20305 " setxattr xattr val vallen path\n"
20310 #: ../fish/guestfish-actions.pod:3347
20311 msgid "See also: C<lsetxattr>, L<attr(5)>."
20315 #: ../fish/guestfish-actions.pod:3349
20320 #: ../fish/guestfish-actions.pod:3351
20323 " sfdisk device cyls heads sectors 'lines ...'\n"
20328 #: ../fish/guestfish-actions.pod:3373
20329 msgid "See also: C<sfdisk-l>, C<sfdisk-N>, C<part-init>"
20333 #: ../fish/guestfish-actions.pod:3379
20338 #: ../fish/guestfish-actions.pod:3381
20341 " sfdiskM device 'lines ...'\n"
20346 #: ../fish/guestfish-actions.pod:3383
20348 "This is a simplified interface to the C<sfdisk> command, where partition "
20349 "sizes are specified in megabytes only (rounded to the nearest cylinder) and "
20350 "you don't need to specify the cyls, heads and sectors parameters which were "
20351 "rarely if ever used anyway."
20355 #: ../fish/guestfish-actions.pod:3389
20356 msgid "See also: C<sfdisk>, the L<sfdisk(8)> manpage and C<part-disk>"
20360 #: ../fish/guestfish-actions.pod:3395
20365 #: ../fish/guestfish-actions.pod:3397
20368 " sfdisk-N device partnum cyls heads sectors line\n"
20373 #: ../fish/guestfish-actions.pod:3402
20375 "For other parameters, see C<sfdisk>. You should usually pass C<0> for the "
20376 "cyls/heads/sectors parameters."
20380 #: ../fish/guestfish-actions.pod:3405
20381 msgid "See also: C<part-add>"
20385 #: ../fish/guestfish-actions.pod:3410
20386 msgid "sfdisk-disk-geometry"
20390 #: ../fish/guestfish-actions.pod:3412
20393 " sfdisk-disk-geometry device\n"
20398 #: ../fish/guestfish-actions.pod:3414
20400 "This displays the disk geometry of C<device> read from the partition table. "
20401 "Especially in the case where the underlying block device has been resized, "
20402 "this can be different from the kernel's idea of the geometry (see "
20403 "C<sfdisk-kernel-geometry>)."
20407 #: ../fish/guestfish-actions.pod:3422
20408 msgid "sfdisk-kernel-geometry"
20412 #: ../fish/guestfish-actions.pod:3424
20415 " sfdisk-kernel-geometry device\n"
20420 #: ../fish/guestfish-actions.pod:3431
20425 #: ../fish/guestfish-actions.pod:3433
20428 " sfdisk-l device\n"
20433 #: ../fish/guestfish-actions.pod:3439
20434 msgid "See also: C<part-list>"
20438 #: ../fish/guestfish-actions.pod:3441
20443 #: ../fish/guestfish-actions.pod:3443
20451 #: ../fish/guestfish-actions.pod:3448
20452 msgid "This is like C<command>, but passes the command to:"
20456 #: ../fish/guestfish-actions.pod:3456
20457 msgid "All the provisos about C<command> apply to this call."
20461 #: ../fish/guestfish-actions.pod:3458
20466 #: ../fish/guestfish-actions.pod:3460
20469 " sh-lines command\n"
20474 #: ../fish/guestfish-actions.pod:3462
20475 msgid "This is the same as C<sh>, but splits the result into a list of lines."
20479 #: ../fish/guestfish-actions.pod:3465
20480 msgid "See also: C<command-lines>"
20484 #: ../fish/guestfish-actions.pod:3467
20489 #: ../fish/guestfish-actions.pod:3469
20497 #: ../fish/guestfish-actions.pod:3473
20502 #: ../fish/guestfish-actions.pod:3475
20510 #: ../fish/guestfish-actions.pod:3481
20515 #: ../fish/guestfish-actions.pod:3483
20523 #: ../fish/guestfish-actions.pod:3491
20528 #: ../fish/guestfish-actions.pod:3493
20536 #: ../fish/guestfish-actions.pod:3501
20541 #: ../fish/guestfish-actions.pod:3503
20544 " strings-e encoding path\n"
20549 #: ../fish/guestfish-actions.pod:3505
20551 "This is like the C<strings> command, but allows you to specify the encoding "
20552 "of strings that are looked for in the source file C<path>."
20556 #: ../fish/guestfish-actions.pod:3515
20558 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
20559 "ISO-8859-X (this is what C<strings> uses)."
20563 #: ../fish/guestfish-actions.pod:3547
20564 msgid "swapoff-device"
20568 #: ../fish/guestfish-actions.pod:3549
20571 " swapoff-device device\n"
20576 #: ../fish/guestfish-actions.pod:3551
20578 "This command disables the libguestfs appliance swap device or partition "
20579 "named C<device>. See C<swapon-device>."
20583 #: ../fish/guestfish-actions.pod:3555
20584 msgid "swapoff-file"
20588 #: ../fish/guestfish-actions.pod:3557
20591 " swapoff-file file\n"
20596 #: ../fish/guestfish-actions.pod:3561
20597 msgid "swapoff-label"
20601 #: ../fish/guestfish-actions.pod:3563
20604 " swapoff-label label\n"
20609 #: ../fish/guestfish-actions.pod:3568
20610 msgid "swapoff-uuid"
20614 #: ../fish/guestfish-actions.pod:3570
20617 " swapoff-uuid uuid\n"
20622 #: ../fish/guestfish-actions.pod:3575
20623 msgid "swapon-device"
20627 #: ../fish/guestfish-actions.pod:3577
20630 " swapon-device device\n"
20635 #: ../fish/guestfish-actions.pod:3579
20637 "This command enables the libguestfs appliance to use the swap device or "
20638 "partition named C<device>. The increased memory is made available for all "
20639 "commands, for example those run using C<command> or C<sh>."
20643 #: ../fish/guestfish-actions.pod:3591
20644 msgid "swapon-file"
20648 #: ../fish/guestfish-actions.pod:3593
20651 " swapon-file file\n"
20656 #: ../fish/guestfish-actions.pod:3595
20657 msgid "This command enables swap to a file. See C<swapon-device> for other notes."
20661 #: ../fish/guestfish-actions.pod:3598
20662 msgid "swapon-label"
20666 #: ../fish/guestfish-actions.pod:3600
20669 " swapon-label label\n"
20674 #: ../fish/guestfish-actions.pod:3602
20676 "This command enables swap to a labeled swap partition. See C<swapon-device> "
20681 #: ../fish/guestfish-actions.pod:3605
20682 msgid "swapon-uuid"
20686 #: ../fish/guestfish-actions.pod:3607
20689 " swapon-uuid uuid\n"
20694 #: ../fish/guestfish-actions.pod:3609
20696 "This command enables swap to a swap partition with the given UUID. See "
20697 "C<swapon-device> for other notes."
20701 #: ../fish/guestfish-actions.pod:3612
20706 #: ../fish/guestfish-actions.pod:3614
20714 #: ../fish/guestfish-actions.pod:3622
20719 #: ../fish/guestfish-actions.pod:3624
20727 #: ../fish/guestfish-actions.pod:3632
20732 #: ../fish/guestfish-actions.pod:3634
20735 " tail-n nrlines path\n"
20740 #: ../fish/guestfish-actions.pod:3647
20745 #: ../fish/guestfish-actions.pod:3649
20748 " tar-in (tarfile|-) directory\n"
20753 #: ../fish/guestfish-actions.pod:3654
20754 msgid "To upload a compressed tarball, use C<tgz-in> or C<txz-in>."
20758 #: ../fish/guestfish-actions.pod:3659
20763 #: ../fish/guestfish-actions.pod:3661
20766 " tar-out directory (tarfile|-)\n"
20771 #: ../fish/guestfish-actions.pod:3666
20772 msgid "To download a compressed tarball, use C<tgz-out> or C<txz-out>."
20776 #: ../fish/guestfish-actions.pod:3671
20781 #: ../fish/guestfish-actions.pod:3673
20784 " tgz-in (tarball|-) directory\n"
20789 #: ../fish/guestfish-actions.pod:3678
20790 msgid "To upload an uncompressed tarball, use C<tar-in>."
20794 #: ../fish/guestfish-actions.pod:3682
20799 #: ../fish/guestfish-actions.pod:3684
20802 " tgz-out directory (tarball|-)\n"
20807 #: ../fish/guestfish-actions.pod:3689
20808 msgid "To download an uncompressed tarball, use C<tar-out>."
20812 #: ../fish/guestfish-actions.pod:3693
20817 #: ../fish/guestfish-actions.pod:3695
20825 #: ../fish/guestfish-actions.pod:3704
20830 #: ../fish/guestfish-actions.pod:3706
20838 #: ../fish/guestfish-actions.pod:3711
20839 msgid "truncate-size"
20843 #: ../fish/guestfish-actions.pod:3713
20846 " truncate-size path size\n"
20851 #: ../fish/guestfish-actions.pod:3718
20853 "If the current file size is less than C<size> then the file is extended to "
20854 "the required size with zero bytes. This creates a sparse file (ie. disk "
20855 "blocks are not allocated for the file until you write to it). To create a "
20856 "non-sparse file of zeroes, use C<fallocate64> instead."
20860 #: ../fish/guestfish-actions.pod:3724
20865 #: ../fish/guestfish-actions.pod:3726
20868 " tune2fs-l device\n"
20873 #: ../fish/guestfish-actions.pod:3736
20878 #: ../fish/guestfish-actions.pod:3738
20881 " txz-in (tarball|-) directory\n"
20886 #: ../fish/guestfish-actions.pod:3745
20891 #: ../fish/guestfish-actions.pod:3747
20894 " txz-out directory (tarball|-)\n"
20899 #: ../fish/guestfish-actions.pod:3754
20904 #: ../fish/guestfish-actions.pod:3756
20912 #: ../fish/guestfish-actions.pod:3770
20913 msgid "See also C<get-umask>, L<umask(2)>, C<mknod>, C<mkdir>."
20917 #: ../fish/guestfish-actions.pod:3775
20918 msgid "umount | unmount"
20922 #: ../fish/guestfish-actions.pod:3777
20925 " umount pathordevice\n"
20930 #: ../fish/guestfish-actions.pod:3783
20931 msgid "umount-all | unmount-all"
20935 #: ../fish/guestfish-actions.pod:3785
20943 #: ../fish/guestfish-actions.pod:3791
20948 #: ../fish/guestfish-actions.pod:3793
20951 " upload (filename|-) remotefilename\n"
20956 #: ../fish/guestfish-actions.pod:3800
20957 msgid "See also C<download>."
20961 #: ../fish/guestfish-actions.pod:3804
20966 #: ../fish/guestfish-actions.pod:3806
20969 " utimens path atsecs atnsecs mtsecs mtnsecs\n"
20974 #: ../fish/guestfish-actions.pod:3825
20979 #: ../fish/guestfish-actions.pod:3827
20987 #: ../fish/guestfish-actions.pod:3854
20989 "I<Note:> Don't use this call to test for availability of features. In "
20990 "enterprise distributions we backport features from later versions into "
20991 "earlier versions, making this an unreliable way to test for features. Use "
20992 "C<available> instead."
20996 #: ../fish/guestfish-actions.pod:3860
21001 #: ../fish/guestfish-actions.pod:3862
21004 " vfs-label device\n"
21009 #: ../fish/guestfish-actions.pod:3869
21010 msgid "To find a filesystem from the label, use C<findfs-label>."
21014 #: ../fish/guestfish-actions.pod:3871
21019 #: ../fish/guestfish-actions.pod:3873
21022 " vfs-type device\n"
21027 #: ../fish/guestfish-actions.pod:3883
21032 #: ../fish/guestfish-actions.pod:3885
21035 " vfs-uuid device\n"
21040 #: ../fish/guestfish-actions.pod:3892
21041 msgid "To find a filesystem from the UUID, use C<findfs-uuid>."
21045 #: ../fish/guestfish-actions.pod:3894
21046 msgid "vg-activate"
21050 #: ../fish/guestfish-actions.pod:3896
21053 " vg-activate true|false 'volgroups ...'\n"
21058 #: ../fish/guestfish-actions.pod:3909
21059 msgid "vg-activate-all"
21063 #: ../fish/guestfish-actions.pod:3911
21066 " vg-activate-all true|false\n"
21071 #: ../fish/guestfish-actions.pod:3921
21076 #: ../fish/guestfish-actions.pod:3923
21079 " vgcreate volgroup 'physvols ...'\n"
21084 #: ../fish/guestfish-actions.pod:3928
21089 #: ../fish/guestfish-actions.pod:3930
21092 " vglvuuids vgname\n"
21097 #: ../fish/guestfish-actions.pod:3935
21099 "You can use this along with C<lvs> and C<lvuuid> calls to associate logical "
21100 "volumes and volume groups."
21104 #: ../fish/guestfish-actions.pod:3938
21105 msgid "See also C<vgpvuuids>."
21109 #: ../fish/guestfish-actions.pod:3940
21114 #: ../fish/guestfish-actions.pod:3942
21117 " vgpvuuids vgname\n"
21122 #: ../fish/guestfish-actions.pod:3947
21124 "You can use this along with C<pvs> and C<pvuuid> calls to associate physical "
21125 "volumes and volume groups."
21129 #: ../fish/guestfish-actions.pod:3950
21130 msgid "See also C<vglvuuids>."
21134 #: ../fish/guestfish-actions.pod:3952
21139 #: ../fish/guestfish-actions.pod:3954
21142 " vgremove vgname\n"
21147 #: ../fish/guestfish-actions.pod:3961
21152 #: ../fish/guestfish-actions.pod:3963
21155 " vgrename volgroup newvolgroup\n"
21160 #: ../fish/guestfish-actions.pod:3967
21165 #: ../fish/guestfish-actions.pod:3969
21173 #: ../fish/guestfish-actions.pod:3977
21174 msgid "See also C<vgs-full>."
21178 #: ../fish/guestfish-actions.pod:3979
21183 #: ../fish/guestfish-actions.pod:3981
21191 #: ../fish/guestfish-actions.pod:3986
21196 #: ../fish/guestfish-actions.pod:3988
21204 #: ../fish/guestfish-actions.pod:3993
21209 #: ../fish/guestfish-actions.pod:3995
21217 #: ../fish/guestfish-actions.pod:3999
21222 #: ../fish/guestfish-actions.pod:4001
21230 #: ../fish/guestfish-actions.pod:4006
21235 #: ../fish/guestfish-actions.pod:4008
21243 #: ../fish/guestfish-actions.pod:4013
21248 #: ../fish/guestfish-actions.pod:4015
21256 #: ../fish/guestfish-actions.pod:4020
21261 #: ../fish/guestfish-actions.pod:4022
21264 " write path content\n"
21269 #: ../fish/guestfish-actions.pod:4030
21274 #: ../fish/guestfish-actions.pod:4032
21277 " write-file path content size\n"
21282 #: ../fish/guestfish-actions.pod:4055
21287 #: ../fish/guestfish-actions.pod:4057
21290 " zegrep regex path\n"
21295 #: ../fish/guestfish-actions.pod:4065
21300 #: ../fish/guestfish-actions.pod:4067
21303 " zegrepi regex path\n"
21308 #: ../fish/guestfish-actions.pod:4075
21313 #: ../fish/guestfish-actions.pod:4077
21321 #: ../fish/guestfish-actions.pod:4085
21322 msgid "See also: C<zero-device>, C<scrub-device>."
21326 #: ../fish/guestfish-actions.pod:4087
21327 msgid "zero-device"
21331 #: ../fish/guestfish-actions.pod:4089
21334 " zero-device device\n"
21339 #: ../fish/guestfish-actions.pod:4091
21341 "This command writes zeroes over the entire C<device>. Compare with C<zero> "
21342 "which just zeroes the first few blocks of a device."
21346 #: ../fish/guestfish-actions.pod:4098
21351 #: ../fish/guestfish-actions.pod:4100
21354 " zerofree device\n"
21359 #: ../fish/guestfish-actions.pod:4113
21364 #: ../fish/guestfish-actions.pod:4115
21367 " zfgrep pattern path\n"
21372 #: ../fish/guestfish-actions.pod:4123
21377 #: ../fish/guestfish-actions.pod:4125
21380 " zfgrepi pattern path\n"
21385 #: ../fish/guestfish-actions.pod:4133
21390 #: ../fish/guestfish-actions.pod:4135
21393 " zfile meth path\n"
21398 #: ../fish/guestfish-actions.pod:4142
21399 msgid "Since 1.0.63, use C<file> instead which can now process compressed files."
21403 #: ../fish/guestfish-actions.pod:4152
21408 #: ../fish/guestfish-actions.pod:4154
21411 " zgrep regex path\n"
21416 #: ../fish/guestfish-actions.pod:4162
21421 #: ../fish/guestfish-actions.pod:4164
21424 " zgrepi regex path\n"
21429 #: ../test-tool/libguestfs-test-tool.pod:5
21430 msgid "libguestfs-test-tool - End user tests for libguestfs"
21434 #: ../test-tool/libguestfs-test-tool.pod:9
21437 " libguestfs-test-tool [--options]\n"
21442 #: ../test-tool/libguestfs-test-tool.pod:13
21444 "libguestfs-test-tool is a test program shipped with libguestfs to end users "
21445 "and developers, to allow them to check basic libguestfs functionality is "
21446 "working. This is needed because libguestfs occasionally breaks for reasons "
21447 "beyond our control: usually because of changes in the underlying qemu or "
21448 "kernel packages, or the host environment."
21452 #: ../test-tool/libguestfs-test-tool.pod:20
21453 msgid "If you suspect a problem in libguestfs, then just run:"
21457 #: ../test-tool/libguestfs-test-tool.pod:22
21460 " libguestfs-test-tool\n"
21465 #: ../test-tool/libguestfs-test-tool.pod:24
21466 msgid "It will print lots of diagnostic messages."
21470 #: ../test-tool/libguestfs-test-tool.pod:26
21471 msgid "If it runs to completion successfully, you will see this near the end:"
21475 #: ../test-tool/libguestfs-test-tool.pod:28
21478 " ===== TEST FINISHED OK =====\n"
21483 #: ../test-tool/libguestfs-test-tool.pod:30
21484 msgid "and the test tool will exit with code 0."
21488 #: ../test-tool/libguestfs-test-tool.pod:32
21490 "If it fails (and/or exits with non-zero error code), please paste the "
21491 "B<complete, unedited> output of the test tool into a bug report. More "
21492 "information about reporting bugs can be found on the "
21493 "L<http://libguestfs.org/> website."
21497 #: ../test-tool/libguestfs-test-tool.pod:41
21502 #: ../test-tool/libguestfs-test-tool.pod:43
21503 msgid "Display short usage information and exit."
21507 #: ../test-tool/libguestfs-test-tool.pod:45
21508 msgid "I<--helper /path/to/libguestfs-test-tool-helper>"
21512 #: ../test-tool/libguestfs-test-tool.pod:47
21514 "Pass an alternate name for the helper program. libguestfs-test-tool will "
21515 "normally look in the C<$libexec> directory that was configured when the tool "
21520 #: ../test-tool/libguestfs-test-tool.pod:51
21521 msgid "I<--qemu qemu_binary>"
21525 #: ../test-tool/libguestfs-test-tool.pod:53
21527 "If you have downloaded another qemu binary, point this option at the full "
21528 "path of the binary to try it."
21532 #: ../test-tool/libguestfs-test-tool.pod:56
21533 msgid "I<--qemudir qemu_source_dir>"
21537 #: ../test-tool/libguestfs-test-tool.pod:58
21539 "If you have compiled qemu from source, point this option at the source "
21540 "directory to try it."
21544 #: ../test-tool/libguestfs-test-tool.pod:61
21545 msgid "I<--timeout N>"
21549 #: ../test-tool/libguestfs-test-tool.pod:63
21551 "Set the launch timeout to C<N> seconds. The default is 120 seconds which "
21552 "does not usually need to be adjusted unless your machine is very slow."
21556 #: ../test-tool/libguestfs-test-tool.pod:69
21557 msgid "TRYING OUT A DIFFERENT VERSION OF QEMU"
21561 #: ../test-tool/libguestfs-test-tool.pod:71
21563 "If you have compiled another version of qemu from source and would like to "
21564 "try that, then you can use the I<--qemudir> option to point to the qemu "
21565 "source directory."
21569 #: ../test-tool/libguestfs-test-tool.pod:75
21571 "If you have downloaded a qemu binary from somewhere, use the I<--qemu> "
21572 "option to point to the binary."
21576 #: ../test-tool/libguestfs-test-tool.pod:78
21578 "When using an alternate qemu with libguestfs, usually you would need to "
21579 "write a qemu wrapper script (see section I<QEMU WRAPPERS> in "
21580 "L<guestfs(3)>). libguestfs-test-tool writes a temporary qemu wrapper script "
21581 "when you use either of the I<--qemudir> or I<--qemu> options."
21585 #: ../test-tool/libguestfs-test-tool.pod:85
21587 "libguestfs-test-tool returns I<0> if the tests completed without error, or "
21588 "I<1> if there was an error."
21592 #: ../test-tool/libguestfs-test-tool.pod:92
21593 msgid "/usr/libexec/libguestfs-test-tool-helper"
21597 #: ../test-tool/libguestfs-test-tool.pod:94
21599 "This helper program is run inside the appliance and provides additional "
21604 #: ../test-tool/libguestfs-test-tool.pod:97
21605 msgid "/usr/bin/mkisofs"
21609 #: ../test-tool/libguestfs-test-tool.pod:99
21611 "The C<mkisofs> command is required in order to construct a CD-ROM ISO file "
21612 "which is used as part of the tests."
21616 #: ../test-tool/libguestfs-test-tool.pod:106
21618 "For the full list of environment variables which may affect libguestfs, "
21619 "please see the L<guestfs(3)> manual page."
21623 #: ../test-tool/libguestfs-test-tool.pod:111
21624 msgid "L<guestfs(3)>, L<http://libguestfs.org/>, L<http://qemu.org/>."
21628 #: ../test-tool/libguestfs-test-tool.pod:121 ../fuse/guestmount.pod:195
21629 msgid "Copyright (C) 2009 Red Hat Inc. L<http://libguestfs.org/>"
21633 #: ../fuse/guestmount.pod:5
21634 msgid "guestmount - Mount a guest filesystem on the host using FUSE and libguestfs"
21638 #: ../fuse/guestmount.pod:9
21641 " guestmount [--options] -a disk.img -m device [--ro] mountpoint\n"
21646 #: ../fuse/guestmount.pod:13
21648 "You must I<not> use C<guestmount> in read-write mode on live virtual "
21649 "machines. If you do this, you risk disk corruption in the VM."
21653 #: ../fuse/guestmount.pod:18
21655 "The guestmount program can be used to mount virtual machine filesystems and "
21656 "other disk images on the host. It uses libguestfs for access to the guest "
21657 "filesystem, and FUSE (the \"filesystem in userspace\") to make it appear as "
21658 "a mountable device."
21662 #: ../fuse/guestmount.pod:23
21664 "Along with other options, you have to give at least one device (I<-a> "
21665 "option) and at least one mountpoint (I<-m> option). How this works is "
21666 "better explained in the L<guestfish(1)> manual page, or you can use "
21667 "L<virt-inspector(1)> and/or the wrapper script C<guestmount-wrapper> to help "
21672 #: ../fuse/guestmount.pod:29
21674 "FUSE lets you mount filesystems as non-root. The mountpoint must be owned "
21675 "by you, and the filesystem will not be visible to any other users unless you "
21676 "make certain global configuration changes to C</etc/fuse.conf>. To unmount "
21677 "the filesystem, use the C<fusermount -u> command."
21681 #: ../fuse/guestmount.pod:37
21683 "For a typical Windows guest which has its main filesystem on the first "
21688 #: ../fuse/guestmount.pod:40
21691 " guestmount -a windows.img -m /dev/sda1 --ro /mnt\n"
21696 #: ../fuse/guestmount.pod:42
21698 "For a typical Linux guest which has a /boot filesystem on the first "
21699 "partition, and the root filesystem on a logical volume:"
21703 #: ../fuse/guestmount.pod:45
21706 " guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot --ro /mnt\n"
21711 #: ../fuse/guestmount.pod:47
21713 "To get L<virt-inspector(1)> to do the hard work of detecting guest "
21714 "mountpoints for you:"
21718 #: ../fuse/guestmount.pod:50
21721 " guestmount $(virt-inspector --ro-fish MyGuest) /mnt\n"
21726 #: ../fuse/guestmount.pod:52
21728 "(or use --fish if you don't want it to be a read only mount). The option is "
21729 "called I<--ro-fish> or I<--fish> because these parameters are compatible "
21730 "with L<guestfish(1)>."
21734 #: ../fuse/guestmount.pod:56
21736 "If you don't know what filesystems are contained in a guest or disk image, "
21737 "use L<virt-list-filesystems(1)> first:"
21741 #: ../fuse/guestmount.pod:59
21744 " virt-list-filesystems MyGuest\n"
21749 #: ../fuse/guestmount.pod:61
21751 "If you want to trace the libguestfs calls but without excessive debugging, "
21756 #: ../fuse/guestmount.pod:64
21759 " guestmount [-a ... -m ...] --trace /mnt\n"
21764 #: ../fuse/guestmount.pod:66
21765 msgid "If you want to debug the program, we recommend:"
21769 #: ../fuse/guestmount.pod:68
21772 " guestmount [-a ... -m ...] --trace --verbose /mnt\n"
21777 #: ../fuse/guestmount.pod:76
21778 msgid "Add a block device or virtual machine image."
21782 #: ../fuse/guestmount.pod:78
21783 msgid "B<--dir-cache-timeout N>"
21787 #: ../fuse/guestmount.pod:80
21789 "Set the readdir cache timeout to I<N> seconds, the default being 60 "
21790 "seconds. The readdir cache [actually, there are several semi-independent "
21791 "caches] is populated after a readdir(2) call with the stat and extended "
21792 "attributes of the files in the directory, in anticipation that they will be "
21793 "requested soon after."
21797 #: ../fuse/guestmount.pod:86
21799 "There is also a different attribute cache implemented by FUSE (see the FUSE "
21800 "option I<-o attr_timeout>), but the FUSE cache does not anticipate future "
21801 "requests, only cache existing ones."
21805 #: ../fuse/guestmount.pod:90
21806 msgid "B<--fuse-help>"
21810 #: ../fuse/guestmount.pod:92
21811 msgid "Display help on special FUSE options (see I<-o> below)."
21815 #: ../fuse/guestmount.pod:96
21816 msgid "Display brief help and exit."
21820 #: ../fuse/guestmount.pod:98
21821 msgid "B<-m dev[:mnt]> | B<--mount dev[:mnt]>"
21825 #: ../fuse/guestmount.pod:100
21827 "Mount the named partition or logical volume on the given mountpoint B<in the "
21828 "guest> (this has nothing to do with mountpoints in the host)."
21832 #: ../fuse/guestmount.pod:103
21834 "If the mountpoint is omitted, it defaults to C</>. You have to mount "
21835 "something on C</>."
21839 #: ../fuse/guestmount.pod:108
21841 "By default, we attempt to sync the guest disk when the FUSE mountpoint is "
21842 "unmounted. If you specify this option, then we don't attempt to sync the "
21843 "disk. See the discussion of autosync in the L<guestfs(3)> manpage."
21847 #: ../fuse/guestmount.pod:113
21848 msgid "B<-o option> | B<--option option>"
21852 #: ../fuse/guestmount.pod:115
21853 msgid "Pass extra options to FUSE."
21857 #: ../fuse/guestmount.pod:117
21859 "To get a list of all the extra options supported by FUSE, use the command "
21860 "below. Note that only the FUSE I<-o> options can be passed, and only some "
21861 "of them are a good idea."
21865 #: ../fuse/guestmount.pod:121
21868 " guestmount --fuse-help\n"
21873 #: ../fuse/guestmount.pod:123
21874 msgid "Some potentially useful FUSE options:"
21878 #: ../fuse/guestmount.pod:127
21879 msgid "B<-o allow_other>"
21883 #: ../fuse/guestmount.pod:129
21884 msgid "Allow other users to see the filesystem."
21888 #: ../fuse/guestmount.pod:131
21889 msgid "B<-o attr_timeout=N>"
21893 #: ../fuse/guestmount.pod:133
21894 msgid "Enable attribute caching by FUSE, and set the timeout to I<N> seconds."
21898 #: ../fuse/guestmount.pod:135
21899 msgid "B<-o kernel_cache>"
21903 #: ../fuse/guestmount.pod:137
21905 "Allow the kernel to cache files (reduces the number of reads that have to go "
21906 "through the L<guestfs(3)> API). This is generally a good idea if you can "
21907 "afford the extra memory usage."
21911 #: ../fuse/guestmount.pod:141
21912 msgid "B<-o uid=N> B<-o gid=N>"
21916 #: ../fuse/guestmount.pod:143
21918 "Use these options to map all UIDs and GIDs inside the guest filesystem to "
21919 "the chosen values."
21923 #: ../fuse/guestmount.pod:150
21925 "Add devices and mount everything read-only. Also disallow writes and make "
21926 "the disk appear read-only to FUSE."
21930 #: ../fuse/guestmount.pod:153
21932 "This is highly recommended if you are not going to edit the guest disk. If "
21933 "the guest is running and this option is I<not> supplied, then there is a "
21934 "strong risk of disk corruption in the guest. We try to prevent this from "
21935 "happening, but it is not always possible."
21939 #: ../fuse/guestmount.pod:160
21940 msgid "Enable SELinux support for the guest."
21944 #: ../fuse/guestmount.pod:162
21949 #: ../fuse/guestmount.pod:164
21950 msgid "Trace libguestfs calls (to stderr)."
21954 #: ../fuse/guestmount.pod:166
21955 msgid "This also stops the daemon from forking into the background."
21959 #: ../fuse/guestmount.pod:170
21960 msgid "Enable verbose messages from underlying libguestfs."
21964 #: ../fuse/guestmount.pod:174
21965 msgid "Display the program version and exit."
21969 #: ../fuse/guestmount.pod:180
21971 "L<guestfish(1)>, L<virt-inspector(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
21972 "L<virt-tar(1)>, L<guestfs(3)>, L<http://libguestfs.org/>, "
21973 "L<http://fuse.sf.net/>."
21977 #: ../inspector/virt-inspector.pl:40
21979 "virt-inspector - Display OS version, kernel, drivers, mount points, "
21980 "applications, etc. in a virtual machine"
21984 #: ../inspector/virt-inspector.pl:44
21987 " virt-inspector [--connect URI] domname\n"
21992 #: ../inspector/virt-inspector.pl:46
21995 " virt-inspector guest.img [guest.img ...]\n"
22000 #: ../inspector/virt-inspector.pl:50
22002 "B<virt-inspector> examines a virtual machine and tries to determine the "
22003 "version of the OS, the kernel version, what drivers are installed, whether "
22004 "the virtual machine is fully virtualized (FV) or para-virtualized (PV), what "
22005 "applications are installed and more."
22009 #: ../inspector/virt-inspector.pl:55
22011 "Virt-inspector can produce output in several formats, including a readable "
22012 "text report, and XML for feeding into other programs."
22016 #: ../inspector/virt-inspector.pl:58
22018 "In the normal usage, use C<virt-inspector domname> where C<domname> is the "
22019 "libvirt domain (see: C<virsh list --all>)."
22023 #: ../inspector/virt-inspector.pl:61
22025 "You can also run virt-inspector directly on disk images from a single "
22026 "virtual machine. Use C<virt-inspector guest.img>. In rare cases a domain "
22027 "has several block devices, in which case you should list them one after "
22028 "another, with the first corresponding to the guest's C</dev/sda>, the second "
22029 "to the guest's C</dev/sdb> and so on."
22033 #: ../inspector/virt-inspector.pl:67
22035 "Virt-inspector can only inspect and report upon I<one domain at a time>. To "
22036 "inspect several virtual machines, you have to run virt-inspector several "
22037 "times (for example, from a shell script for-loop)."
22041 #: ../inspector/virt-inspector.pl:72
22043 "Because virt-inspector needs direct access to guest images, it won't "
22044 "normally work over remote libvirt connections."
22048 #: ../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
22049 msgid "Display brief help."
22053 #: ../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
22054 msgid "B<--version>"
22058 #: ../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
22059 msgid "Display version number and exit."
22063 #: ../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
22064 msgid "B<--connect URI> | B<-c URI>"
22068 #: ../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
22070 "If using libvirt, connect to the given I<URI>. If omitted, then we connect "
22071 "to the default libvirt hypervisor."
22075 #: ../inspector/virt-inspector.pl:104
22077 "Libvirt is only used if you specify a C<domname> on the command line. If "
22078 "you specify guest block devices directly, then libvirt is not used at all."
22082 #: ../inspector/virt-inspector.pl:114
22084 "The following options select the output format. Use only one of them. The "
22085 "default is a readable text report."
22089 #: ../inspector/virt-inspector.pl:119
22090 msgid "B<--text> (default)"
22094 #: ../inspector/virt-inspector.pl:121
22095 msgid "Plain text report."
22099 #: ../inspector/virt-inspector.pl:123
22104 #: ../inspector/virt-inspector.pl:125
22105 msgid "Produce no output at all."
22109 #: ../inspector/virt-inspector.pl:127
22114 #: ../inspector/virt-inspector.pl:129
22116 "If you select I<--xml> then you get XML output which can be fed to other "
22121 #: ../inspector/virt-inspector.pl:132
22126 #: ../inspector/virt-inspector.pl:134
22128 "If you select I<--yaml> then you get YAML output which can be fed to other "
22133 #: ../inspector/virt-inspector.pl:137
22138 #: ../inspector/virt-inspector.pl:139
22140 "If you select I<--perl> then you get Perl structures output which can be "
22141 "used directly in another Perl program."
22145 #: ../inspector/virt-inspector.pl:142
22150 #: ../inspector/virt-inspector.pl:144
22151 msgid "B<--ro-fish>"
22155 #: ../inspector/virt-inspector.pl:146
22157 "If you select I<--fish> then we print a L<guestfish(1)> command line which "
22158 "will automatically mount up the filesystems on the correct mount points. "
22159 "Try this for example:"
22163 #: ../inspector/virt-inspector.pl:150
22166 " guestfish $(virt-inspector --fish guest.img)\n"
22171 #: ../inspector/virt-inspector.pl:152
22173 "I<--ro-fish> is the same, but the I<--ro> option is passed to guestfish so "
22174 "that the filesystems are mounted read-only."
22178 #: ../inspector/virt-inspector.pl:155
22183 #: ../inspector/virt-inspector.pl:157
22185 "In \"query mode\" we answer common questions about the guest, such as "
22186 "whether it is fullvirt or needs a Xen hypervisor to run."
22190 #: ../inspector/virt-inspector.pl:160
22191 msgid "See section I<QUERY MODE> below."
22195 #: ../inspector/virt-inspector.pl:166
22196 msgid "B<--windows-registry>"
22200 #: ../inspector/virt-inspector.pl:168
22202 "This flag is ignored for compatibility with earlier releases of the "
22207 #: ../inspector/virt-inspector.pl:171
22209 "In this version, if L<Win::Hivex(3)> is available, then we attempt to parse "
22210 "information out of the Registry for any Windows guest."
22214 #: ../inspector/virt-inspector.pl:218
22215 msgid "OUTPUT FORMAT"
22219 #: ../inspector/virt-inspector.pl:220
22222 " Operating system(s)\n"
22223 " -------------------\n"
22224 " Linux (distro + version)\n"
22225 " Windows (version)\n"
22228 " +--- Filesystems ---------- Installed apps --- Kernel & drivers\n"
22229 " ----------- -------------- ----------------\n"
22230 " mount point => device List of apps Extra information\n"
22231 " mount point => device and versions about kernel(s)\n"
22232 " ... and drivers\n"
22233 " swap => swap device\n"
22234 " (plus lots of extra information\n"
22235 " about each filesystem)\n"
22240 #: ../inspector/virt-inspector.pl:235
22241 msgid "The output of virt-inspector is a complex two-level data structure."
22245 #: ../inspector/virt-inspector.pl:237
22247 "At the top level is a list of the operating systems installed on the guest. "
22248 "(For the vast majority of guests, only a single OS is installed.) The data "
22249 "returned for the OS includes the name (Linux, Windows), the distribution and "
22254 #: ../inspector/virt-inspector.pl:242
22255 msgid "The diagram above shows what we return for each OS."
22259 #: ../inspector/virt-inspector.pl:244
22261 "With the I<--xml> option the output is mapped into an XML document. There "
22262 "is a RELAX-NG schema for this XML in the file I<virt-inspector.rng> which "
22263 "normally ships with virt-inspector, or can be found in the source."
22267 #: ../inspector/virt-inspector.pl:249
22269 "With the I<--fish> or I<--ro-fish> option the mount points are mapped to "
22270 "L<guestfish(1)> command line parameters, so that you can go in afterwards "
22271 "and inspect the guest with everything mounted in the right place. For "
22276 #: ../inspector/virt-inspector.pl:254
22279 " guestfish $(virt-inspector --ro-fish guest.img)\n"
22280 " ==> guestfish --ro -a guest.img -m /dev/VG/LV:/ -m /dev/sda1:/boot\n"
22285 #: ../inspector/virt-inspector.pl:589
22290 #: ../inspector/virt-inspector.pl:591
22292 "When you use C<virt-inspector --query>, the output is a series of lines of "
22297 #: ../inspector/virt-inspector.pl:594
22303 " xen_pv_drivers=no\n"
22308 #: ../inspector/virt-inspector.pl:599
22310 "(each answer is usually C<yes> or C<no>, or the line is completely missing "
22311 "if we could not determine the answer at all)."
22315 #: ../inspector/virt-inspector.pl:602
22317 "If the guest is multiboot, you can get apparently conflicting answers "
22318 "(eg. C<windows=yes> and C<linux=yes>, or a guest which is both fullvirt and "
22319 "has a Xen PV kernel). This is normal, and just means that the guest can do "
22320 "both things, although it might require operator intervention such as "
22321 "selecting a boot option when the guest is booting."
22325 #: ../inspector/virt-inspector.pl:609
22326 msgid "This section describes the full range of answers possible."
22330 #: ../inspector/virt-inspector.pl:630
22331 msgid "windows=(yes|no)"
22335 #: ../inspector/virt-inspector.pl:632
22336 msgid "Answer C<yes> if Microsoft Windows is installed in the guest."
22340 #: ../inspector/virt-inspector.pl:645
22341 msgid "linux=(yes|no)"
22345 #: ../inspector/virt-inspector.pl:647
22346 msgid "Answer C<yes> if a Linux kernel is installed in the guest."
22350 #: ../inspector/virt-inspector.pl:660
22351 msgid "rhel=(yes|no)"
22355 #: ../inspector/virt-inspector.pl:662
22356 msgid "Answer C<yes> if the guest contains Red Hat Enterprise Linux."
22360 #: ../inspector/virt-inspector.pl:676
22361 msgid "fedora=(yes|no)"
22365 #: ../inspector/virt-inspector.pl:678
22366 msgid "Answer C<yes> if the guest contains the Fedora Linux distribution."
22370 #: ../inspector/virt-inspector.pl:691
22371 msgid "debian=(yes|no)"
22375 #: ../inspector/virt-inspector.pl:693
22376 msgid "Answer C<yes> if the guest contains the Debian Linux distribution."
22380 #: ../inspector/virt-inspector.pl:706
22381 msgid "fullvirt=(yes|no)"
22385 #: ../inspector/virt-inspector.pl:708
22387 "Answer C<yes> if there is at least one operating system kernel installed in "
22388 "the guest which runs fully virtualized. Such a guest would require a "
22389 "hypervisor which supports full system virtualization."
22393 #: ../inspector/virt-inspector.pl:731
22394 msgid "xen_domU_kernel=(yes|no)"
22398 #: ../inspector/virt-inspector.pl:733
22400 "Answer C<yes> if there is at least one Linux kernel installed in the guest "
22401 "which is compiled as a Xen DomU (a Xen paravirtualized guest)."
22405 #: ../inspector/virt-inspector.pl:753
22406 msgid "xen_pv_drivers=(yes|no)"
22410 #: ../inspector/virt-inspector.pl:755
22412 "Answer C<yes> if the guest has Xen paravirtualized drivers installed "
22413 "(usually the kernel itself will be fully virtualized, but the PV drivers "
22414 "have been installed by the administrator for performance reasons)."
22418 #: ../inspector/virt-inspector.pl:777
22419 msgid "virtio_drivers=(yes|no)"
22423 #: ../inspector/virt-inspector.pl:779
22425 "Answer C<yes> if the guest has virtio paravirtualized drivers installed. "
22426 "Virtio drivers are commonly used to improve the performance of KVM."
22430 #: ../inspector/virt-inspector.pl:800
22431 msgid "userspace_arch=(x86_64|...)"
22435 #: ../inspector/virt-inspector.pl:802
22436 msgid "Print the architecture of userspace."
22440 #: ../inspector/virt-inspector.pl:804 ../inspector/virt-inspector.pl:825
22441 msgid "NB. For multi-boot VMs this can print several lines."
22445 #: ../inspector/virt-inspector.pl:821
22446 msgid "kernel_arch=(x86_64|...)"
22450 #: ../inspector/virt-inspector.pl:823
22451 msgid "Print the architecture of the kernel."
22455 #: ../inspector/virt-inspector.pl:848 ../tools/virt-df.pl:484
22457 "L<guestfs(3)>, L<guestfish(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
22458 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
22462 #: ../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
22463 msgid "Richard W.M. Jones L<http://people.redhat.com/~rjones/>"
22467 #: ../inspector/virt-inspector.pl:859
22468 msgid "Matthew Booth L<mbooth@redhat.com>"
22472 #: ../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
22473 msgid "Copyright (C) 2009 Red Hat Inc."
22477 #: ../tools/virt-cat.pl:34
22478 msgid "virt-cat - Display a file in a virtual machine"
22482 #: ../tools/virt-cat.pl:38
22485 " virt-cat [--options] domname file\n"
22490 #: ../tools/virt-cat.pl:40
22493 " virt-cat [--options] disk.img [disk.img ...] file\n"
22498 #: ../tools/virt-cat.pl:44
22500 "C<virt-cat> is a command line tool to display the contents of C<file> where "
22501 "C<file> exists in the named virtual machine (or disk image)."
22505 #: ../tools/virt-cat.pl:47
22507 "C<virt-cat> can be used to quickly view a single file. To edit a file, use "
22508 "C<virt-edit>. For more complex cases you should look at the L<guestfish(1)> "
22513 #: ../tools/virt-cat.pl:53
22514 msgid "Display C</etc/fstab> file from inside the libvirt VM called C<mydomain>:"
22518 #: ../tools/virt-cat.pl:56
22521 " virt-cat mydomain /etc/fstab\n"
22526 #: ../tools/virt-cat.pl:58
22527 msgid "List syslog messages from a VM:"
22531 #: ../tools/virt-cat.pl:60
22534 " virt-cat mydomain /var/log/messages | tail\n"
22539 #: ../tools/virt-cat.pl:62
22540 msgid "Find out what DHCP IP address a VM acquired:"
22544 #: ../tools/virt-cat.pl:64
22547 " virt-cat mydomain /var/log/messages | grep 'dhclient: bound to' | tail\n"
22552 #: ../tools/virt-cat.pl:66
22553 msgid "Find out what packages were recently installed:"
22557 #: ../tools/virt-cat.pl:68
22560 " virt-cat mydomain /var/log/yum.log | tail\n"
22565 #: ../tools/virt-cat.pl:70
22566 msgid "Find out who is logged on inside a virtual machine:"
22570 #: ../tools/virt-cat.pl:72
22573 " virt-cat mydomain /var/run/utmp > /tmp/utmp\n"
22579 #: ../tools/virt-cat.pl:75
22580 msgid "or who was logged on:"
22584 #: ../tools/virt-cat.pl:77
22587 " virt-cat mydomain /var/log/wtmp > /tmp/wtmp\n"
22588 " last -f /tmp/wtmp\n"
22593 #: ../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
22595 "If you specify guest block devices directly, then libvirt is not used at "
22600 #: ../tools/virt-cat.pl:165
22602 "L<guestfs(3)>, L<guestfish(1)>, L<virt-edit(1)>, L<Sys::Guestfs(3)>, "
22603 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
22607 #: ../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
22612 #: ../tools/virt-df.pl:36
22613 msgid "virt-df - Display free space on virtual filesystems"
22617 #: ../tools/virt-df.pl:40
22620 " virt-df [--options]\n"
22625 #: ../tools/virt-df.pl:42
22628 " virt-df [--options] domname\n"
22633 #: ../tools/virt-df.pl:44
22636 " virt-df [--options] disk.img [disk.img ...]\n"
22641 #: ../tools/virt-df.pl:48
22643 "C<virt-df> is a command line tool to display free space on virtual machine "
22644 "filesystems. Unlike other tools, it doesn't just display the amount of "
22645 "space allocated to a virtual machine, but can look inside the virtual "
22646 "machine to see how much space is really being used."
22650 #: ../tools/virt-df.pl:53
22652 "It is like the L<df(1)> command, but for virtual machines, except that it "
22653 "also works for Windows virtual machines."
22657 #: ../tools/virt-df.pl:56
22659 "If used without any arguments, C<virt-df> checks with libvirt to get a list "
22660 "of all active and inactive guests, and performs a C<df>-type operation on "
22661 "each one in turn, printing out the results."
22665 #: ../tools/virt-df.pl:60
22667 "If used with any argument(s), C<virt-df> performs a C<df>-type operation on "
22668 "either the single named libvirt domain, or on the disk image(s) listed on "
22669 "the command line (which must all belong to a single VM). In this mode (with "
22670 "arguments), C<virt-df> will I<only work for a single guest>. If you want to "
22671 "run on multiple guests, then you have to invoke C<virt-df> multiple times."
22675 #: ../tools/virt-df.pl:67
22677 "Use the C<--csv> option to get a format which can be easily parsed by other "
22678 "programs. Other options are mostly similar to standard C<df> options. See "
22679 "below for the complete list."
22683 #: ../tools/virt-df.pl:107
22688 #: ../tools/virt-df.pl:109
22690 "Write out the results in CSV format (comma-separated values). This format "
22691 "can be imported easily into databases and spreadsheets, but read L</NOTE "
22692 "ABOUT CSV FORMAT> below."
22696 #: ../tools/virt-df.pl:117
22697 msgid "B<--human-readable> | B<-h>"
22701 #: ../tools/virt-df.pl:119
22702 msgid "Print sizes in human-readable format."
22706 #: ../tools/virt-df.pl:121
22707 msgid "You are not allowed to use I<-h> and I<--csv> at the same time."
22711 #: ../tools/virt-df.pl:127
22712 msgid "B<--inodes> | B<-i>"
22716 #: ../tools/virt-df.pl:129
22717 msgid "Print inodes instead of blocks."
22721 #: ../tools/virt-df.pl:458
22722 msgid "NOTE ABOUT CSV FORMAT"
22726 #: ../tools/virt-df.pl:460
22728 "Comma-separated values (CSV) is a deceptive format. It I<seems> like it "
22729 "should be easy to parse, but it is definitely not easy to parse."
22733 #: ../tools/virt-df.pl:463
22735 "Myth: Just split fields at commas. Reality: This does I<not> work "
22736 "reliably. This example has two columns:"
22740 #: ../tools/virt-df.pl:466
22743 " \"foo,bar\",baz\n"
22748 #: ../tools/virt-df.pl:468
22750 "Myth: Read the file one line at a time. Reality: This does I<not> work "
22751 "reliably. This example has one row:"
22755 #: ../tools/virt-df.pl:471
22764 #: ../tools/virt-df.pl:474
22766 "For shell scripts, use C<csvtool> (L<http://merjis.com/developers/csv> also "
22767 "packaged in major Linux distributions)."
22771 #: ../tools/virt-df.pl:477
22773 "For other languages, use a CSV processing library (eg. C<Text::CSV> for Perl "
22774 "or Python's built-in csv library)."
22778 #: ../tools/virt-df.pl:480
22779 msgid "Most spreadsheets and databases can import CSV directly."
22783 #: ../tools/virt-df.pl:497 ../tools/virt-edit.pl:343 ../tools/virt-list-partitions.pl:246 ../tools/virt-rescue.pl:247
22784 msgid "Copyright (C) 2009-2010 Red Hat Inc."
22788 #: ../tools/virt-edit.pl:35
22789 msgid "virt-edit - Edit a file in a virtual machine"
22793 #: ../tools/virt-edit.pl:39
22796 " virt-edit [--options] domname file\n"
22801 #: ../tools/virt-edit.pl:41
22804 " virt-edit [--options] disk.img [disk.img ...] file\n"
22809 #: ../tools/virt-edit.pl:43
22812 " virt-edit [domname|disk.img] file -e 'expr'\n"
22817 #: ../tools/virt-edit.pl:47
22819 "You must I<not> use C<virt-edit> on live virtual machines. If you do this, "
22820 "you risk disk corruption in the VM. C<virt-edit> tries to stop you from "
22821 "doing this, but doesn't catch all cases."
22825 #: ../tools/virt-edit.pl:53
22827 "C<virt-edit> is a command line tool to edit C<file> where C<file> exists in "
22828 "the named virtual machine (or disk image)."
22832 #: ../tools/virt-edit.pl:56
22834 "If you want to just view a file, use L<virt-cat(1)>. For more complex cases "
22835 "you should look at the L<guestfish(1)> tool."
22839 #: ../tools/virt-edit.pl:61
22840 msgid "Edit the named files interactively:"
22844 #: ../tools/virt-edit.pl:63
22847 " virt-edit mydomain /boot/grub/grub.conf\n"
22852 #: ../tools/virt-edit.pl:65
22855 " virt-edit mydomain /etc/passwd\n"
22860 #: ../tools/virt-edit.pl:67
22862 "You can also edit files non-interactively (see L</NON-INTERACTIVE EDITING> "
22863 "below). To change the init default level to 5:"
22867 #: ../tools/virt-edit.pl:71
22870 " virt-edit mydomain /etc/inittab -e 's/^id:.*/id:5:initdefault:/'\n"
22875 #: ../tools/virt-edit.pl:97
22876 msgid "B<--backup extension> | B<-b extension>"
22880 #: ../tools/virt-edit.pl:99
22882 "Create a backup of the original file I<in the guest disk image>. The backup "
22883 "has the original filename with C<extension> added."
22887 #: ../tools/virt-edit.pl:102
22889 "Usually the first character of C<extension> would be a dot C<.> so you would "
22894 #: ../tools/virt-edit.pl:105
22897 " virt-edit -b .orig [etc]\n"
22902 #: ../tools/virt-edit.pl:107
22903 msgid "By default, no backup file is made."
22907 #: ../tools/virt-edit.pl:125
22908 msgid "B<--expr EXPR> | B<-e EXPR>"
22912 #: ../tools/virt-edit.pl:127
22914 "Instead of launching the external editor, non-interactively apply the Perl "
22915 "expression C<EXPR> to each line in the file. See L</NON-INTERACTIVE "
22920 #: ../tools/virt-edit.pl:131
22922 "Be careful to properly quote the expression to prevent it from being altered "
22927 #: ../tools/virt-edit.pl:250
22928 msgid "NON-INTERACTIVE EDITING"
22932 #: ../tools/virt-edit.pl:252
22934 "C<virt-edit> normally calls out to C<$EDITOR> (or vi) so the system "
22935 "administrator can interactively edit the file."
22939 #: ../tools/virt-edit.pl:255
22941 "There are two ways also to use C<virt-edit> from scripts in order to make "
22942 "automated edits to files. (Note that although you I<can> use C<virt-edit> "
22943 "like this, it's less error-prone to write scripts directly using the "
22944 "libguestfs API and Augeas for configuration file editing.)"
22948 #: ../tools/virt-edit.pl:261
22950 "The first method is to temporarily set C<$EDITOR> to any script or program "
22951 "you want to run. The script is invoked as C<$EDITOR tmpfile> and it should "
22952 "update C<tmpfile> in place however it likes."
22956 #: ../tools/virt-edit.pl:265
22958 "The second method is to use the C<-e> parameter of C<virt-edit> to run a "
22959 "short Perl snippet in the style of L<sed(1)>. For example to replace all "
22960 "instances of C<foo> with C<bar> in a file:"
22964 #: ../tools/virt-edit.pl:269
22967 " virt-edit domname filename -e 's/foo/bar/'\n"
22972 #: ../tools/virt-edit.pl:271
22974 "The full power of Perl regular expressions can be used (see L<perlre(1)>). "
22975 "For example to delete root's password you could do:"
22979 #: ../tools/virt-edit.pl:274
22982 " virt-edit domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
22987 #: ../tools/virt-edit.pl:276
22989 "What really happens is that the snippet is evaluated as a Perl expression "
22990 "for each line of the file. The line, including the final C<\\n>, is passed "
22991 "in C<$_> and the expression should update C<$_> or leave it unchanged."
22995 #: ../tools/virt-edit.pl:281
22997 "To delete a line, set C<$_> to the empty string. For example, to delete the "
22998 "C<apache> user account from the password file you can do:"
23002 #: ../tools/virt-edit.pl:284
23005 " virt-edit mydomain /etc/passwd -e '$_ = \"\" if /^apache:/'\n"
23010 #: ../tools/virt-edit.pl:286
23012 "To insert a line, prepend or append it to C<$_>. However appending lines to "
23013 "the end of the file is rather difficult this way since there is no concept "
23014 "of \"last line of the file\" - your expression just doesn't get called "
23015 "again. You might want to use the first method (setting C<$EDITOR>) if you "
23020 #: ../tools/virt-edit.pl:292
23022 "The variable C<$lineno> contains the current line number. As is "
23023 "traditional, the first line in the file is number C<1>."
23027 #: ../tools/virt-edit.pl:295
23029 "The return value from the expression is ignored, but the expression may call "
23030 "C<die> in order to abort the whole program, leaving the original file "
23035 #: ../tools/virt-edit.pl:299
23037 "Remember when matching the end of a line that C<$_> may contain the final "
23038 "C<\\n>, or (for DOS files) C<\\r\\n>, or if the file does not end with a "
23039 "newline then neither of these. Thus to match or substitute some text at the "
23040 "end of a line, use this regular expression:"
23044 #: ../tools/virt-edit.pl:304
23047 " /some text(\\r?\\n)?$/\n"
23052 #: ../tools/virt-edit.pl:306
23054 "Alternately, use the perl C<chomp> function, being careful not to chomp "
23055 "C<$_> itself (since that would remove all newlines from the file):"
23059 #: ../tools/virt-edit.pl:310
23062 " my $m = $_; chomp $m; $m =~ /some text$/\n"
23067 #: ../tools/virt-edit.pl:316
23072 #: ../tools/virt-edit.pl:318
23074 "If set, this string is used as the editor. It may contain arguments, "
23075 "eg. C<\"emacs -nw\">"
23079 #: ../tools/virt-edit.pl:321
23080 msgid "If not set, C<vi> is used."
23084 #: ../tools/virt-edit.pl:327
23086 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, "
23087 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>, "
23088 "L<perl(1)>, L<perlre(1)>."
23092 #: ../tools/virt-list-filesystems.pl:32
23093 msgid "virt-list-filesystems - List filesystems in a virtual machine or disk image"
23097 #: ../tools/virt-list-filesystems.pl:36
23100 " virt-list-filesystems [--options] domname\n"
23105 #: ../tools/virt-list-filesystems.pl:38
23108 " virt-list-filesystems [--options] disk.img [disk.img ...]\n"
23113 #: ../tools/virt-list-filesystems.pl:42
23115 "C<virt-list-filesystems> is a command line tool to list the filesystems that "
23116 "are contained in a virtual machine or disk image."
23120 #: ../tools/virt-list-filesystems.pl:46
23122 "C<virt-list-filesystems> is just a simple wrapper around L<libguestfs(3)> "
23123 "functionality. For more complex cases you should look at the "
23124 "L<guestfish(1)> tool."
23128 #: ../tools/virt-list-filesystems.pl:86 ../tools/virt-list-partitions.pl:95 ../tools/virt-ls.pl:115
23129 msgid "B<-l> | B<--long>"
23133 #: ../tools/virt-list-filesystems.pl:88
23135 "With this option, C<virt-list-filesystems> displays the type of each "
23136 "filesystem too (where \"type\" means C<ext3>, C<xfs> etc.)"
23140 #: ../tools/virt-list-filesystems.pl:95
23141 msgid "B<-a> | B<--all>"
23145 #: ../tools/virt-list-filesystems.pl:97
23147 "Normally we only show mountable filesystems. If this option is given then "
23148 "swap devices are shown too."
23152 #: ../tools/virt-list-filesystems.pl:193
23154 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, "
23155 "L<virt-list-partitions(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
23156 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
23160 #: ../tools/virt-list-partitions.pl:32
23161 msgid "virt-list-partitions - List partitions in a virtual machine or disk image"
23165 #: ../tools/virt-list-partitions.pl:36
23168 " virt-list-partitions [--options] domname\n"
23173 #: ../tools/virt-list-partitions.pl:38
23176 " virt-list-partitions [--options] disk.img [disk.img ...]\n"
23181 #: ../tools/virt-list-partitions.pl:42
23183 "C<virt-list-partitions> is a command line tool to list the partitions that "
23184 "are contained in a virtual machine or disk image. It is mainly useful as a "
23185 "first step to using L<virt-resize(1)>."
23189 #: ../tools/virt-list-partitions.pl:47
23191 "C<virt-list-partitions> is just a simple wrapper around L<libguestfs(3)> "
23192 "functionality. For more complex cases you should look at the "
23193 "L<guestfish(1)> tool."
23197 #: ../tools/virt-list-partitions.pl:87
23198 msgid "B<-h> | B<--human-readable>"
23202 #: ../tools/virt-list-partitions.pl:89
23203 msgid "Show sizes in human-readable form (eg. \"1G\")."
23207 #: ../tools/virt-list-partitions.pl:97
23209 "With this option, C<virt-list-partitions> displays the type and size of each "
23210 "partition too (where \"type\" means C<ext3>, C<pv> etc.)"
23214 #: ../tools/virt-list-partitions.pl:104
23215 msgid "B<-t> | B<--total>"
23219 #: ../tools/virt-list-partitions.pl:106
23220 msgid "Display the total size of each block device (as a separate row or rows)."
23224 #: ../tools/virt-list-partitions.pl:231
23226 "L<guestfs(3)>, L<guestfish(1)>, L<virt-list-filesystems(1)>, "
23227 "L<virt-resize(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
23228 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
23232 #: ../tools/virt-ls.pl:35
23233 msgid "virt-ls - List files in a virtual machine"
23237 #: ../tools/virt-ls.pl:39
23240 " virt-ls [--options] domname directory\n"
23245 #: ../tools/virt-ls.pl:41
23248 " virt-ls [--options] disk.img [disk.img ...] directory\n"
23253 #: ../tools/virt-ls.pl:45
23255 "C<virt-ls> is a command line tool to list the names of files in a directory "
23256 "inside a virtual machine or disk image."
23260 #: ../tools/virt-ls.pl:48
23262 "C<virt-ls> is just a simple wrapper around L<libguestfs(3)> functionality. "
23263 "For more complex cases you should look at the L<guestfish(1)> tool."
23267 #: ../tools/virt-ls.pl:52
23269 "C<virt-ls> can be used in one of three modes: simple, long and recursive. A "
23270 "simple listing is like the ordinary L<ls(1)> command:"
23274 #: ../tools/virt-ls.pl:55
23277 " $ virt-ls myguest /\n"
23285 #: ../tools/virt-ls.pl:60
23286 msgid "With the C<-l> (C<--long>) option, C<virt-ls> shows more detail:"
23290 #: ../tools/virt-ls.pl:62
23293 " $ virt-ls -l myguest /\n"
23295 " dr-xr-xr-x. 2 root root 4096 2009-08-25 19:06 bin\n"
23296 " dr-xr-xr-x. 5 root root 3072 2009-08-25 19:06 boot\n"
23302 #: ../tools/virt-ls.pl:68
23304 "With the C<-R> (C<--recursive>) option, C<virt-ls> lists the names of files "
23305 "and directories recursively:"
23309 #: ../tools/virt-ls.pl:71
23312 " $ virt-ls -R myguest /tmp\n"
23320 #: ../tools/virt-ls.pl:76
23322 "You I<cannot> combine these options. To do more complicated things, use "
23327 #: ../tools/virt-ls.pl:117
23328 msgid "B<-R> | B<--recursive>"
23332 #: ../tools/virt-ls.pl:119
23334 "Select the mode. With neither of these options, C<virt-ls> produces a "
23335 "simple, flat list of the files in the named directory."
23339 #: ../tools/virt-ls.pl:122
23341 "C<virt-ls -l> produces a \"long listing\", which shows more detail (just "
23342 "like the plain C<ls -l> command)."
23346 #: ../tools/virt-ls.pl:125
23348 "C<virt-ls -R> produces a recursive list of files starting at the named "
23349 "directory. See the documentation for the C<guestfs_find> command "
23350 "L<guestfs(3)> for precise details."
23354 #: ../tools/virt-ls.pl:129
23355 msgid "You cannot combine these options."
23359 #: ../tools/virt-ls.pl:212
23361 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, "
23362 "L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, "
23363 "L<http://libguestfs.org/>."
23367 #: ../tools/virt-make-fs.pl:37
23368 msgid "virt-make-fs - Make a filesystem from a tar archive or files"
23372 #: ../tools/virt-make-fs.pl:41
23375 " virt-make-fs [--options] input.tar output.img\n"
23380 #: ../tools/virt-make-fs.pl:43
23383 " virt-make-fs [--options] input.tar.gz output.img\n"
23388 #: ../tools/virt-make-fs.pl:45
23391 " virt-make-fs [--options] directory output.img\n"
23396 #: ../tools/virt-make-fs.pl:49
23398 "Virt-make-fs is a command line tool for creating a filesystem from a tar "
23399 "archive or some files in a directory. It is similar to tools like "
23400 "L<mkisofs(1)>, L<genisoimage(1)> and L<mksquashfs(1)>. Unlike those tools, "
23401 "it can create common filesystem types like ext2/3 or NTFS, which can be "
23402 "useful if you want to attach these filesystems to existing virtual machines "
23403 "(eg. to import large amounts of read-only data to a VM)."
23407 #: ../tools/virt-make-fs.pl:57
23408 msgid "Basic usage is:"
23412 #: ../tools/virt-make-fs.pl:59
23415 " virt-make-fs input output\n"
23420 #: ../tools/virt-make-fs.pl:61
23422 "where C<input> is either a directory containing files that you want to add, "
23423 "or a tar archive (either uncompressed tar or gzip-compressed tar); and "
23424 "C<output> is a disk image. The input type is detected automatically. The "
23425 "output disk image defaults to a raw ext2 image unless you specify extra "
23426 "flags (see L</OPTIONS> below)."
23430 #: ../tools/virt-make-fs.pl:67
23431 msgid "EXTRA SPACE"
23435 #: ../tools/virt-make-fs.pl:69
23437 "Unlike formats such as tar and squashfs, a filesystem does not \"just fit\" "
23438 "the files that it contains, but might have extra space. Depending on how "
23439 "you are going to use the output, you might think this extra space is wasted "
23440 "and want to minimize it, or you might want to leave space so that more files "
23441 "can be added later. Virt-make-fs defaults to minimizing the extra space, "
23442 "but you can use the C<--size> flag to leave space in the filesystem if you "
23447 #: ../tools/virt-make-fs.pl:77
23449 "An alternative way to leave extra space but not make the output image any "
23450 "bigger is to use an alternative disk image format (instead of the default "
23451 "\"raw\" format). Using C<--format=qcow2> will use the native QEmu/KVM qcow2 "
23452 "image format (check your hypervisor supports this before using it). This "
23453 "allows you to choose a large C<--size> but the extra space won't actually be "
23454 "allocated in the image until you try to store something in it."
23458 #: ../tools/virt-make-fs.pl:85
23460 "Don't forget that you can also use local commands including L<resize2fs(8)> "
23461 "and L<virt-resize(1)> to resize existing filesystems, or rerun "
23462 "virt-make-resize to build another image from scratch."
23466 #: ../tools/virt-make-fs.pl:89 ../tools/virt-make-fs.pl:123 ../tools/virt-make-fs.pl:142
23471 #: ../tools/virt-make-fs.pl:91
23474 " virt-make-fs --format=qcow2 --size=+200M input output.img\n"
23479 #: ../tools/virt-make-fs.pl:93
23480 msgid "FILESYSTEM TYPE"
23484 #: ../tools/virt-make-fs.pl:95
23486 "The default filesystem type is C<ext2>. Just about any filesystem type that "
23487 "libguestfs supports can be used (but I<not> read-only formats like "
23488 "ISO9660). Here are some of the more common choices:"
23492 #: ../tools/virt-make-fs.pl:101
23497 #: ../tools/virt-make-fs.pl:103
23499 "Note that ext3 filesystems contain a journal, typically 1-32 MB in size. If "
23500 "you are not going to use the filesystem in a way that requires the journal, "
23501 "then this is just wasted overhead."
23505 #: ../tools/virt-make-fs.pl:107
23506 msgid "I<ntfs> or I<vfat>"
23510 #: ../tools/virt-make-fs.pl:109
23511 msgid "Useful if exporting data to a Windows guest."
23515 #: ../tools/virt-make-fs.pl:111
23517 "I<Note for vfat>: The tar archive or local directory must only contain files "
23518 "which are owned by root (ie. UID:GID = 0:0). The reason is that the tar "
23519 "program running within libguestfs is unable to change the ownership of "
23520 "non-root files, since vfat itself does not support this."
23524 #: ../tools/virt-make-fs.pl:116
23529 #: ../tools/virt-make-fs.pl:118
23531 "Lower overhead than C<ext2>, but certain limitations on filename length and "
23532 "total filesystem size."
23536 #: ../tools/virt-make-fs.pl:125
23539 " virt-make-fs --type=minix input minixfs.img\n"
23544 #: ../tools/virt-make-fs.pl:127
23545 msgid "TO PARTITION OR NOT TO PARTITION"
23549 #: ../tools/virt-make-fs.pl:129
23550 msgid "Optionally virt-make-fs can add a partition table to the output disk."
23554 #: ../tools/virt-make-fs.pl:131
23556 "Adding a partition can make the disk image more compatible with certain "
23557 "virtualized operating systems which don't expect to see a filesystem "
23558 "directly located on a block device (Linux doesn't care and will happily "
23559 "handle both types)."
23563 #: ../tools/virt-make-fs.pl:136
23565 "On the other hand, if you have a partition table then the output image is no "
23566 "longer a straight filesystem. For example you cannot run L<fsck(8)> "
23567 "directly on a partitioned disk image. (However libguestfs tools such as "
23568 "L<guestfish(1)> and L<virt-resize(1)> can still be used)."
23572 #: ../tools/virt-make-fs.pl:144
23573 msgid "Add an MBR partition:"
23577 #: ../tools/virt-make-fs.pl:146
23580 " virt-make-fs --partition -- input disk.img\n"
23585 #: ../tools/virt-make-fs.pl:148
23587 "If the output disk image could be terabyte-sized or larger, it's better to "
23588 "use an EFI/GPT-compatible partition table:"
23592 #: ../tools/virt-make-fs.pl:151
23595 " virt-make-fs --partition=gpt --size=+4T --format=qcow2 input disk.img\n"
23600 #: ../tools/virt-make-fs.pl:177 ../tools/virt-win-reg.pl:196
23605 #: ../tools/virt-make-fs.pl:179
23606 msgid "Enable debugging information."
23610 #: ../tools/virt-make-fs.pl:185
23611 msgid "B<--size=E<lt>NE<gt>>"
23615 #: ../tools/virt-make-fs.pl:187
23616 msgid "B<--size=+E<lt>NE<gt>>"
23620 #: ../tools/virt-make-fs.pl:189
23621 msgid "B<-s E<lt>NE<gt>>"
23625 #: ../tools/virt-make-fs.pl:191
23626 msgid "B<-s +E<lt>NE<gt>>"
23630 #: ../tools/virt-make-fs.pl:193
23631 msgid "Use the C<--size> (or C<-s>) option to choose the size of the output image."
23635 #: ../tools/virt-make-fs.pl:196
23637 "If this option is I<not> given, then the output image will be just large "
23638 "enough to contain all the files, with not much wasted space."
23642 #: ../tools/virt-make-fs.pl:199
23644 "To choose a fixed size output disk, specify an absolute number followed by "
23645 "b/K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
23646 "Petabytes or Exabytes. This must be large enough to contain all the input "
23647 "files, else you will get an error."
23651 #: ../tools/virt-make-fs.pl:204
23653 "To leave extra space, specify C<+> (plus sign) and a number followed by "
23654 "b/K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
23655 "Petabytes or Exabytes. For example: C<--size=+200M> means enough space for "
23656 "the input files, and (approximately) an extra 200 MB free space."
23660 #: ../tools/virt-make-fs.pl:210
23662 "Note that virt-make-fs estimates free space, and therefore will not produce "
23663 "filesystems containing precisely the free space requested. (It is much more "
23664 "expensive and time-consuming to produce a filesystem which has precisely the "
23665 "desired free space)."
23669 #: ../tools/virt-make-fs.pl:219
23670 msgid "B<--format=E<lt>fmtE<gt>>"
23674 #: ../tools/virt-make-fs.pl:221
23675 msgid "B<-F E<lt>fmtE<gt>>"
23679 #: ../tools/virt-make-fs.pl:223
23680 msgid "Choose the output disk image format."
23684 #: ../tools/virt-make-fs.pl:225
23685 msgid "The default is C<raw> (raw disk image)."
23689 #: ../tools/virt-make-fs.pl:227
23691 "For other choices, see the L<qemu-img(1)> manpage. The only other choice "
23692 "that would really make sense here is C<qcow2>."
23696 #: ../tools/virt-make-fs.pl:234
23697 msgid "B<--type=E<lt>fsE<gt>>"
23701 #: ../tools/virt-make-fs.pl:236
23702 msgid "B<-t E<lt>fsE<gt>>"
23706 #: ../tools/virt-make-fs.pl:238
23707 msgid "Choose the output filesystem type."
23711 #: ../tools/virt-make-fs.pl:240
23712 msgid "The default is C<ext2>."
23716 #: ../tools/virt-make-fs.pl:242
23717 msgid "Any filesystem which is supported read-write by libguestfs can be used here."
23721 #: ../tools/virt-make-fs.pl:249
23722 msgid "B<--partition>"
23726 #: ../tools/virt-make-fs.pl:251
23727 msgid "B<--partition=E<lt>parttypeE<gt>>"
23731 #: ../tools/virt-make-fs.pl:253
23733 "If specified, this flag adds an MBR partition table to the output disk "
23738 #: ../tools/virt-make-fs.pl:256
23740 "You can change the partition table type, eg. C<--partition=gpt> for large "
23745 #: ../tools/virt-make-fs.pl:259
23747 "Note that if you just use a lonesome C<--partition>, the Perl option parser "
23748 "might consider the next parameter to be the partition type. For example:"
23752 #: ../tools/virt-make-fs.pl:263
23755 " virt-make-fs --partition input.tar ...\n"
23760 #: ../tools/virt-make-fs.pl:265
23762 "would cause virt-make-fs to think you wanted to use a partition type of "
23763 "C<input.tar> which is completely wrong. To avoid this, use C<--> (a double "
23764 "dash) between options and the input file argument:"
23768 #: ../tools/virt-make-fs.pl:269
23771 " virt-make-fs --partition -- input.tar ...\n"
23776 #: ../tools/virt-make-fs.pl:529
23778 "L<guestfish(1)>, L<virt-resize(1)>, L<virt-tar(1)>, L<mkisofs(1)>, "
23779 "L<genisoimage(1)>, L<mksquashfs(1)>, L<mke2fs(8)>, L<resize2fs(8)>, "
23780 "L<guestfs(3)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
23784 #: ../tools/virt-make-fs.pl:543 ../tools/virt-win-reg.pl:478
23786 "When reporting bugs, please enable debugging and capture the I<complete> "
23791 #: ../tools/virt-make-fs.pl:546
23794 " export LIBGUESTFS_DEBUG=1\n"
23795 " virt-make-fs --debug [...] > /tmp/virt-make-fs.log 2>&1\n"
23800 #: ../tools/virt-make-fs.pl:549
23802 "Attach /tmp/virt-make-fs.log to a new bug report at "
23803 "L<https://bugzilla.redhat.com/>"
23807 #: ../tools/virt-make-fs.pl:558 ../tools/virt-resize.pl:1413 ../tools/virt-win-reg.pl:493
23808 msgid "Copyright (C) 2010 Red Hat Inc."
23812 #: ../tools/virt-rescue.pl:33
23813 msgid "virt-rescue - Run a rescue shell on a virtual machine"
23817 #: ../tools/virt-rescue.pl:37
23820 " virt-rescue [--options] domname\n"
23825 #: ../tools/virt-rescue.pl:39
23828 " virt-rescue [--options] disk.img [disk.img ...]\n"
23833 #: ../tools/virt-rescue.pl:43
23835 "You must I<not> use C<virt-rescue> on live virtual machines. Doing so will "
23836 "probably result in disk corruption in the VM. C<virt-rescue> tries to stop "
23837 "you from doing this, but doesn't catch all cases."
23841 #: ../tools/virt-rescue.pl:47
23843 "However if you use the I<--ro> (read only) option, then you can attach a "
23844 "shell to a live virtual machine. The results might be strange or "
23845 "inconsistent at times but you won't get disk corruption."
23849 #: ../tools/virt-rescue.pl:53
23851 "virt-rescue is like a Rescue CD, but for virtual machines, and without the "
23852 "need for a CD. virt-rescue gives you a rescue shell and some simple "
23853 "recovery tools which you can use to examine or rescue a virtual machine or "
23858 #: ../tools/virt-rescue.pl:58
23860 "You can run virt-rescue on any virtual machine known to libvirt, or directly "
23861 "on disk image(s):"
23865 #: ../tools/virt-rescue.pl:61
23868 " virt-rescue GuestName\n"
23873 #: ../tools/virt-rescue.pl:63
23876 " virt-rescue --ro /path/to/disk.img\n"
23881 #: ../tools/virt-rescue.pl:65
23884 " virt-rescue /dev/sdc\n"
23889 #: ../tools/virt-rescue.pl:67
23890 msgid "For live VMs you I<must> use the --ro option."
23894 #: ../tools/virt-rescue.pl:69
23896 "When you run virt-rescue on a virtual machine or disk image, you are placed "
23897 "in an interactive bash shell where you can use many ordinary Linux "
23898 "commands. What you see in C</> (C</bin>, C</lib> etc) is the rescue "
23899 "appliance. You must mount the virtual machine's filesystems by hand. There "
23900 "is an empty directory called C</sysroot> where you can mount filesystems."
23904 #: ../tools/virt-rescue.pl:76
23906 "In the example below, we list logical volumes, then choose one to mount "
23907 "under C</sysroot>:"
23911 #: ../tools/virt-rescue.pl:79
23915 " LV VG Attr LSize Origin Snap% Move Log Copy% Convert\n"
23916 " lv_root vg_f11x64 -wi-a- 8.83G\n"
23917 " lv_swap vg_f11x64 -wi-a- 992.00M\n"
23918 " ><rescue> mount /dev/vg_f11x64/lv_root /sysroot\n"
23919 " ><rescue> ls /sysroot\n"
23924 #: ../tools/virt-rescue.pl:86
23926 "If you don't know what filesystems are available on the virtual machine then "
23927 "you can use commands such as L<parted(8)> and L<lvs(8)> to find out."
23931 #: ../tools/virt-rescue.pl:90 ../tools/virt-resize.pl:1350
23936 #: ../tools/virt-rescue.pl:92
23938 "Virt-rescue can be used on I<any> disk image file or device, not just a "
23939 "virtual machine. For example you can use it on a blank file if you want to "
23940 "partition that file (although we would recommend using L<guestfish(1)> "
23941 "instead as it is more suitable for this purpose). You can even use "
23942 "virt-rescue on things like SD cards."
23946 #: ../tools/virt-rescue.pl:98
23948 "This tool is just designed for quick interactive hacking on a virtual "
23949 "machine. For more structured access to a virtual machine disk image, you "
23950 "should use L<guestfs(3)>. To get a structured shell that you can use to "
23951 "make scripted changes to guests, use L<guestfish(1)>."
23955 #: ../tools/virt-rescue.pl:127
23956 msgid "B<--append kernelopts>"
23960 #: ../tools/virt-rescue.pl:129
23961 msgid "Pass additional options to the rescue kernel."
23965 #: ../tools/virt-rescue.pl:147
23966 msgid "B<--memsize MB> | B<-m MB>"
23970 #: ../tools/virt-rescue.pl:149
23972 "Change the amount of memory allocated to the rescue system. The default is "
23973 "set by libguestfs and is small but adequate for running system tools. The "
23974 "occasional program might need more memory. The parameter is specified in "
23979 #: ../tools/virt-rescue.pl:158
23980 msgid "B<--ro> | B<-r>"
23984 #: ../tools/virt-rescue.pl:160
23985 msgid "Open the image read-only."
23989 #: ../tools/virt-rescue.pl:172
23991 "Enable SELinux in the rescue appliance. You should read "
23992 "L<guestfs(3)/SELINUX> before using this option."
23996 #: ../tools/virt-rescue.pl:228
23998 "Several environment variables affect virt-rescue. See "
23999 "L<guestfs(3)/ENVIRONMENT VARIABLES> for the complete list."
24003 #: ../tools/virt-rescue.pl:233
24005 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, "
24006 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
24010 #: ../tools/virt-resize.pl:42
24011 msgid "virt-resize - Resize a virtual machine disk"
24015 #: ../tools/virt-resize.pl:46
24018 " virt-resize [--resize /dev/sdaN=[+/-]<size>[%]]\n"
24019 " [--expand /dev/sdaN] [--shrink /dev/sdaN]\n"
24020 " [--ignore /dev/sdaN] [--delete /dev/sdaN] [...] indisk outdisk\n"
24025 #: ../tools/virt-resize.pl:52
24027 "Virt-resize is a tool which can resize a virtual machine disk, making it "
24028 "larger or smaller overall, and resizing or deleting any partitions contained "
24033 #: ../tools/virt-resize.pl:56
24035 "Virt-resize B<cannot> resize disk images in-place. Virt-resize B<should "
24036 "not> be used on live virtual machines - for consistent results, shut the "
24037 "virtual machine down before resizing it."
24041 #: ../tools/virt-resize.pl:60
24043 "If you are not familiar with the associated tools: "
24044 "L<virt-list-partitions(1)>, L<virt-list-filesystems(1)> and L<virt-df(1)>, "
24045 "we recommend you go and read those manual pages first."
24049 #: ../tools/virt-resize.pl:68
24051 "Copy C<olddisk> to C<newdisk>, extending one of the guest's partitions to "
24052 "fill the extra 5GB of space."
24056 #: ../tools/virt-resize.pl:71
24059 " truncate -r olddisk newdisk; truncate -s +5G newdisk\n"
24060 " virt-list-partitions -lht olddisk\n"
24061 " # Note \"/dev/sda2\" is a partition inside the \"olddisk\" file.\n"
24062 " virt-resize --expand /dev/sda2 olddisk newdisk\n"
24067 #: ../tools/virt-resize.pl:76
24069 "As above, but make the /boot partition 200MB bigger, while giving the "
24070 "remaining space to /dev/sda2:"
24074 #: ../tools/virt-resize.pl:79
24077 " virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 olddisk newdisk\n"
24082 #: ../tools/virt-resize.pl:81
24083 msgid "DETAILED USAGE"
24087 #: ../tools/virt-resize.pl:83
24088 msgid "EXPANDING A VIRTUAL MACHINE DISK"
24092 #: ../tools/virt-resize.pl:87
24093 msgid "1. Shut down the virtual machine"
24097 #: ../tools/virt-resize.pl:89
24098 msgid "2. Locate input disk image"
24102 #: ../tools/virt-resize.pl:91
24104 "Locate the input disk image (ie. the file or device on the host containing "
24105 "the guest's disk). If the guest is managed by libvirt, you can use C<virsh "
24106 "dumpxml> like this to find the disk image name:"
24110 #: ../tools/virt-resize.pl:95
24113 " # virsh dumpxml guestname | xpath /domain/devices/disk/source\n"
24114 " Found 1 nodes:\n"
24116 " <source dev=\"/dev/vg/lv_guest\" />\n"
24121 #: ../tools/virt-resize.pl:100
24122 msgid "3. Look at current sizing"
24126 #: ../tools/virt-resize.pl:102
24127 msgid "Use L<virt-list-partitions(1)> to display the current partitions and sizes:"
24131 #: ../tools/virt-resize.pl:105
24134 " # virt-list-partitions -lht /dev/vg/lv_guest\n"
24135 " /dev/sda1 ext3 101.9M\n"
24136 " /dev/sda2 pv 7.9G\n"
24137 " /dev/sda device 8.0G\n"
24142 #: ../tools/virt-resize.pl:110
24144 "(This example is a virtual machine with an 8 GB disk which we would like to "
24145 "expand up to 10 GB)."
24149 #: ../tools/virt-resize.pl:113
24150 msgid "4. Create output disk"
24154 #: ../tools/virt-resize.pl:115
24156 "Virt-resize cannot do in-place disk modifications. You have to have space "
24157 "to store the resized output disk."
24161 #: ../tools/virt-resize.pl:118
24162 msgid "To store the resized disk image in a file, create a file of a suitable size:"
24166 #: ../tools/virt-resize.pl:121
24169 " # rm -f outdisk\n"
24170 " # truncate -s 10G outdisk\n"
24175 #: ../tools/virt-resize.pl:124
24176 msgid "Or use L<lvcreate(1)> to create a logical volume:"
24180 #: ../tools/virt-resize.pl:126
24183 " # lvcreate -L 10G -n lv_name vg_name\n"
24188 #: ../tools/virt-resize.pl:128
24189 msgid "Or use L<virsh(1)> vol-create-as to create a libvirt storage volume:"
24193 #: ../tools/virt-resize.pl:130
24196 " # virsh pool-list\n"
24197 " # virsh vol-create-as poolname newvol 10G\n"
24202 #: ../tools/virt-resize.pl:133
24207 #: ../tools/virt-resize.pl:135
24209 "virt-resize takes two mandatory parameters, the input disk (eg. device or "
24210 "file) and the output disk. The output disk is the one created in the "
24215 #: ../tools/virt-resize.pl:139
24218 " # virt-resize indisk outdisk\n"
24223 #: ../tools/virt-resize.pl:141
24225 "This command just copies disk image C<indisk> to disk image C<outdisk> "
24226 "I<without> resizing or changing any existing partitions. If C<outdisk> is "
24227 "larger, then an extra, empty partition is created at the end of the disk "
24228 "covering the extra space. If C<outdisk> is smaller, then it will give an "
24233 #: ../tools/virt-resize.pl:147
24235 "More realistically you'd want to expand existing partitions in the disk "
24236 "image by passing extra options (for the full list see the L</OPTIONS> "
24241 #: ../tools/virt-resize.pl:151
24243 "L</--expand> is the most useful option. It expands the named partition "
24244 "within the disk to fill any extra space:"
24248 #: ../tools/virt-resize.pl:154
24251 " # virt-resize --expand /dev/sda2 indisk outdisk\n"
24256 #: ../tools/virt-resize.pl:156
24258 "(In this case, an extra partition is I<not> created at the end of the disk, "
24259 "because there will be no unused space)."
24263 #: ../tools/virt-resize.pl:159
24265 "L</--resize> is the other commonly used option. The following would "
24266 "increase the size of /dev/sda1 by 200M, and expand /dev/sda2 to fill the "
24267 "rest of the available space:"
24271 #: ../tools/virt-resize.pl:163
24274 " # virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
24275 " indisk outdisk\n"
24280 #: ../tools/virt-resize.pl:166
24282 "If the expanded partition in the image contains a filesystem or LVM PV, then "
24283 "if virt-resize knows how, it will resize the contents, the equivalent of "
24284 "calling a command such as L<pvresize(8)>, L<resize2fs(8)> or "
24285 "L<ntfsresize(8)>. However virt-resize does not know how to resize some "
24286 "filesystems, so you would have to online resize them after booting the "
24287 "guest. And virt-resize also does not resize anything inside an LVM PV, it "
24288 "just resizes the PV itself and leaves the user to resize any LVs inside that "
24293 #: ../tools/virt-resize.pl:175
24294 msgid "Other options are covered below."
24298 #: ../tools/virt-resize.pl:177
24303 #: ../tools/virt-resize.pl:179
24304 msgid "Thoroughly test the new disk image I<before> discarding the old one."
24308 #: ../tools/virt-resize.pl:181
24309 msgid "If you are using libvirt, edit the XML to point at the new disk:"
24313 #: ../tools/virt-resize.pl:183
24316 " # virsh edit guestname\n"
24321 #: ../tools/virt-resize.pl:185
24323 "Change E<lt>source ...E<gt>, see "
24324 "L<http://libvirt.org/formatdomain.html#elementsDisks>"
24328 #: ../tools/virt-resize.pl:188
24329 msgid "Then start up the domain with the new, resized disk:"
24333 #: ../tools/virt-resize.pl:190
24336 " # virsh start guestname\n"
24341 #: ../tools/virt-resize.pl:192
24343 "and check that it still works. See also the L</NOTES> section below for "
24344 "additional information."
24348 #: ../tools/virt-resize.pl:195
24349 msgid "7. Resize LVs etc inside the guest"
24353 #: ../tools/virt-resize.pl:197
24354 msgid "(This can also be done offline using L<guestfish(1)>)"
24358 #: ../tools/virt-resize.pl:199
24360 "Once the guest has booted you should see the new space available, at least "
24361 "for filesystems that virt-resize knows how to resize, and for PVs. The user "
24362 "may need to resize LVs inside PVs, and also resize filesystem types that "
24363 "virt-resize does not know how to expand."
24367 #: ../tools/virt-resize.pl:206
24368 msgid "SHRINKING A VIRTUAL MACHINE DISK"
24372 #: ../tools/virt-resize.pl:208
24374 "Shrinking is somewhat more complex than expanding, and only an overview is "
24379 #: ../tools/virt-resize.pl:211
24381 "Firstly virt-resize will not attempt to shrink any partition content (PVs, "
24382 "filesystems). The user has to shrink content before passing the disk image "
24383 "to virt-resize, and virt-resize will check that the content has been shrunk "
24388 #: ../tools/virt-resize.pl:216
24389 msgid "(Shrinking can also be done offline using L<guestfish(1)>)"
24393 #: ../tools/virt-resize.pl:218
24395 "After shrinking PVs and filesystems, shut down the guest, and proceed with "
24396 "steps 3 and 4 above to allocate a new disk image."
24400 #: ../tools/virt-resize.pl:221
24401 msgid "Then run virt-resize with any of the C<--shrink> and/or C<--resize> options."
24405 #: ../tools/virt-resize.pl:224
24406 msgid "IGNORING OR DELETING PARTITIONS"
24410 #: ../tools/virt-resize.pl:226
24412 "virt-resize also gives a convenient way to ignore or delete partitions when "
24413 "copying from the input disk to the output disk. Ignoring a partition speeds "
24414 "up the copy where you don't care about the existing contents of a "
24415 "partition. Deleting a partition removes it completely, but note that it "
24416 "also renumbers any partitions after the one which is deleted, which can "
24417 "leave some guests unbootable."
24421 #: ../tools/virt-resize.pl:243
24422 msgid "Display help."
24426 #: ../tools/virt-resize.pl:257
24427 msgid "B<--resize part=size>"
24431 #: ../tools/virt-resize.pl:259
24433 "Resize the named partition (expanding or shrinking it) so that it has the "
24438 #: ../tools/virt-resize.pl:262
24440 "C<size> can be expressed as an absolute number followed by b/K/M/G/T/P/E to "
24441 "mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Petabytes or "
24442 "Exabytes; or as a percentage of the current size; or as a relative number or "
24443 "percentage. For example:"
24447 #: ../tools/virt-resize.pl:267
24450 " --resize /dev/sda2=10G\n"
24455 #: ../tools/virt-resize.pl:269
24458 " --resize /dev/sda4=90%\n"
24463 #: ../tools/virt-resize.pl:271
24466 " --resize /dev/sda2=+1G\n"
24471 #: ../tools/virt-resize.pl:273
24474 " --resize /dev/sda2=-200M\n"
24479 #: ../tools/virt-resize.pl:275
24482 " --resize /dev/sda1=+128K\n"
24487 #: ../tools/virt-resize.pl:277
24490 " --resize /dev/sda1=+10%\n"
24495 #: ../tools/virt-resize.pl:279
24498 " --resize /dev/sda1=-10%\n"
24503 #: ../tools/virt-resize.pl:281
24505 "You can increase the size of any partition. Virt-resize will expand the "
24506 "direct content of the partition if it knows how (see C<--expand> below)."
24510 #: ../tools/virt-resize.pl:285
24512 "You can only I<decrease> the size of partitions that contain filesystems or "
24513 "PVs which have already been shrunk. Virt-resize will check this has been "
24514 "done before proceeding, or else will print an error (see also "
24515 "C<--resize-force>)."
24519 #: ../tools/virt-resize.pl:290 ../tools/virt-resize.pl:382 ../tools/virt-resize.pl:399
24520 msgid "You can give this option multiple times."
24524 #: ../tools/virt-resize.pl:296
24525 msgid "B<--resize-force part=size>"
24529 #: ../tools/virt-resize.pl:298
24531 "This is the same as C<--resize> except that it will let you decrease the "
24532 "size of any partition. Generally this means you will lose any data which "
24533 "was at the end of the partition you shrink, but you may not care about that "
24534 "(eg. if shrinking an unused partition, or if you can easily recreate it such "
24535 "as a swap partition)."
24539 #: ../tools/virt-resize.pl:304
24540 msgid "See also the C<--ignore> option."
24544 #: ../tools/virt-resize.pl:310
24545 msgid "B<--expand part>"
24549 #: ../tools/virt-resize.pl:312
24551 "Expand the named partition so it uses up all extra space (space left over "
24552 "after any other resize changes that you request have been done)."
24556 #: ../tools/virt-resize.pl:315
24558 "If virt-resize knows how, it will expand the direct content of the "
24559 "partition. For example, if the partition is an LVM PV, it will expand the "
24560 "PV to fit (like calling L<pvresize(8)>). Virt-resize leaves any other "
24561 "content it doesn't know about alone."
24565 #: ../tools/virt-resize.pl:320
24566 msgid "Currently virt-resize can resize:"
24570 #: ../tools/virt-resize.pl:326
24572 "ext2, ext3 and ext4 filesystems when they are contained directly inside a "
24577 #: ../tools/virt-resize.pl:331
24579 "NTFS filesystems contained directly in a partition, if libguestfs was "
24580 "compiled with support for NTFS."
24584 #: ../tools/virt-resize.pl:334
24586 "The filesystem must have been shut down consistently last time it was used. "
24587 "Additionally, L<ntfsresize(8)> marks the resized filesystem as requiring a "
24588 "consistency check, so at the first boot after resizing Windows will check "
24593 #: ../tools/virt-resize.pl:341
24595 "LVM PVs (physical volumes). However virt-resize does I<not> resize anything "
24596 "inside the PV. The user will have to resize LVs as desired."
24600 #: ../tools/virt-resize.pl:347 ../tools/virt-resize.pl:369
24601 msgid "Note that you cannot use C<--expand> and C<--shrink> together."
24605 #: ../tools/virt-resize.pl:353
24606 msgid "B<--shrink part>"
24610 #: ../tools/virt-resize.pl:355
24612 "Shrink the named partition until the overall disk image fits in the "
24613 "destination. The named partition B<must> contain a filesystem or PV which "
24614 "has already been shrunk using another tool (eg. L<guestfish(1)> or other "
24615 "online tools). Virt-resize will check this and give an error if it has not "
24620 #: ../tools/virt-resize.pl:361
24622 "The amount by which the overall disk must be shrunk (after carrying out all "
24623 "other operations requested by the user) is called the \"deficit\". For "
24624 "example, a straight copy (assume no other operations) from a 5GB disk image "
24625 "to a 4GB disk image results in a 1GB deficit. In this case, virt-resize "
24626 "would give an error unless the user specified a partition to shrink and that "
24627 "partition had more than a gigabyte of free space."
24631 #: ../tools/virt-resize.pl:375
24632 msgid "B<--ignore part>"
24636 #: ../tools/virt-resize.pl:377
24638 "Ignore the named partition. Effectively this means the partition is "
24639 "allocated on the destination disk, but the content is not copied across from "
24640 "the source disk. The content of the partition will be blank (all zero "
24645 #: ../tools/virt-resize.pl:388
24646 msgid "B<--delete part>"
24650 #: ../tools/virt-resize.pl:390
24652 "Delete the named partition. It would be more accurate to describe this as "
24653 "\"don't copy it over\", since virt-resize doesn't do in-place changes and "
24654 "the original disk image is left intact."
24658 #: ../tools/virt-resize.pl:394
24660 "Note that when you delete a partition, then anything contained in the "
24661 "partition is also deleted. Furthermore, this causes any partitions that "
24662 "come after to be I<renumbered>, which can easily make your guest unbootable."
24666 #: ../tools/virt-resize.pl:405
24667 msgid "B<--LV-expand logvol>"
24671 #: ../tools/virt-resize.pl:407
24673 "This takes the logical volume and, as a final step, expands it to fill all "
24674 "the space available in its volume group. A typical usage, assuming a Linux "
24675 "guest with a single PV C</dev/sda2> and a root device called "
24676 "C</dev/vg_guest/lv_root> would be:"
24680 #: ../tools/virt-resize.pl:412
24683 " virt-resize indisk outdisk \\\n"
24684 " --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root\n"
24689 #: ../tools/virt-resize.pl:415
24691 "This would first expand the partition (and PV), and then expand the root "
24692 "device to fill the extra space in the PV."
24696 #: ../tools/virt-resize.pl:418
24698 "The contents of the LV are also resized if virt-resize knows how to do "
24699 "that. You can stop virt-resize from trying to expand the content by using "
24700 "the option C<--no-expand-content>."
24704 #: ../tools/virt-resize.pl:422
24705 msgid "Use L<virt-list-filesystems(1)> to list the filesystems in the guest."
24709 #: ../tools/virt-resize.pl:425
24711 "You can give this option multiple times, I<but> it doesn't make sense to do "
24712 "this unless the logical volumes you specify are all in different volume "
24717 #: ../tools/virt-resize.pl:433
24718 msgid "B<--no-copy-boot-loader>"
24722 #: ../tools/virt-resize.pl:435
24724 "By default, virt-resize copies over some sectors at the start of the disk "
24725 "(up to the beginning of the first partition). Commonly these sectors "
24726 "contain the Master Boot Record (MBR) and the boot loader, and are required "
24727 "in order for the guest to boot correctly."
24731 #: ../tools/virt-resize.pl:440
24733 "If you specify this flag, then this initial copy is not done. You may need "
24734 "to reinstall the boot loader in this case."
24738 #: ../tools/virt-resize.pl:448
24739 msgid "B<--no-extra-partition>"
24743 #: ../tools/virt-resize.pl:450
24745 "By default, virt-resize creates an extra partition if there is any extra, "
24746 "unused space after all resizing has happened. Use this option to prevent "
24747 "the extra partition from being created. If you do this then the extra space "
24748 "will be inaccessible until you run fdisk, parted, or some other partitioning "
24749 "tool in the guest."
24753 #: ../tools/virt-resize.pl:456
24755 "Note that if the surplus space is smaller than 10 MB, no extra partition "
24760 #: ../tools/virt-resize.pl:463
24761 msgid "B<--no-expand-content>"
24765 #: ../tools/virt-resize.pl:465
24767 "By default, virt-resize will try to expand the direct contents of "
24768 "partitions, if it knows how (see C<--expand> option above)."
24772 #: ../tools/virt-resize.pl:468
24774 "If you give the C<--no-expand-content> option then virt-resize will not "
24779 #: ../tools/virt-resize.pl:475
24780 msgid "B<-d> | B<--debug>"
24784 #: ../tools/virt-resize.pl:477 ../tools/virt-win-reg.pl:198
24785 msgid "Enable debugging messages."
24789 #: ../tools/virt-resize.pl:483
24790 msgid "B<-n> | B<--dryrun>"
24794 #: ../tools/virt-resize.pl:485
24795 msgid "Print a summary of what would be done, but don't do anything."
24799 #: ../tools/virt-resize.pl:491
24800 msgid "B<-q> | B<--quiet>"
24804 #: ../tools/virt-resize.pl:493
24805 msgid "Don't print the summary."
24809 #: ../tools/virt-resize.pl:1352
24810 msgid "\"Partition 1 does not end on cylinder boundary.\""
24814 #: ../tools/virt-resize.pl:1354
24816 "Virt-resize aligns partitions to multiples of 64 sectors. Usually this "
24817 "means the partitions will not be aligned to the ancient CHS geometry. "
24818 "However CHS geometry is meaningless for disks manufactured since the early "
24819 "1990s, and doubly so for virtual hard drives. Alignment of partitions to "
24820 "cylinders is not required by any modern operating system."
24824 #: ../tools/virt-resize.pl:1361
24825 msgid "RESIZING WINDOWS VIRTUAL MACHINES"
24829 #: ../tools/virt-resize.pl:1363
24831 "In Windows Vista and later versions, Microsoft switched to using a separate "
24832 "boot partition. In these VMs, typically C</dev/sda1> is the boot partition "
24833 "and C</dev/sda2> is the main (C:) drive. We have not had any luck resizing "
24834 "the boot partition. Doing so seems to break the guest completely. However "
24835 "expanding the second partition (ie. C: drive) should work."
24839 #: ../tools/virt-resize.pl:1370
24841 "Windows may initiate a lengthy \"chkdsk\" on first boot after a resize, if "
24842 "NTFS partitions have been expanded. This is just a safety check and (unless "
24843 "it find errors) is nothing to worry about."
24847 #: ../tools/virt-resize.pl:1374
24848 msgid "ALTERNATIVE TOOLS"
24852 #: ../tools/virt-resize.pl:1376
24854 "There are several proprietary tools for resizing partitions. We won't "
24855 "mention any here."
24859 #: ../tools/virt-resize.pl:1379
24861 "L<parted(8)> and its graphical shell gparted can do some types of resizing "
24862 "operations on disk images. They can resize and move partitions, but I don't "
24863 "think they can do anything with the contents, and they certainly don't "
24868 #: ../tools/virt-resize.pl:1384
24870 "L<guestfish(1)> can do everything that virt-resize can do and a lot more, "
24871 "but at a much lower level. You will probably end up hand-calculating sector "
24872 "offsets, which is something that virt-resize was designed to avoid. If you "
24873 "want to see the guestfish-equivalent commands that virt-resize runs, use the "
24878 #: ../tools/virt-resize.pl:1392
24880 "L<virt-list-partitions(1)>, L<virt-list-filesystems(1)>, L<virt-df(1)>, "
24881 "L<guestfs(3)>, L<guestfish(1)>, L<lvm(8)>, L<pvresize(8)>, L<lvresize(8)>, "
24882 "L<resize2fs(8)>, L<ntfsresize(8)>, L<virsh(1)>, L<parted(8)>, "
24883 "L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
24887 #: ../tools/virt-tar.pl:34
24888 msgid "virt-tar - Extract or upload files to a virtual machine"
24892 #: ../tools/virt-tar.pl:38
24895 " virt-tar [--options] -x domname directory tarball\n"
24900 #: ../tools/virt-tar.pl:40
24903 " virt-tar [--options] -u domname tarball directory\n"
24908 #: ../tools/virt-tar.pl:42
24911 " virt-tar [--options] disk.img [disk.img ...] -x directory tarball\n"
24916 #: ../tools/virt-tar.pl:44
24919 " virt-tar [--options] disk.img [disk.img ...] -u tarball directory\n"
24924 #: ../tools/virt-tar.pl:48
24925 msgid "Download C</home> from the VM into a local tarball:"
24929 #: ../tools/virt-tar.pl:50
24932 " virt-tar -x domname /home home.tar\n"
24937 #: ../tools/virt-tar.pl:52
24940 " virt-tar -zx domname /home home.tar.gz\n"
24945 #: ../tools/virt-tar.pl:54
24946 msgid "Upload a local tarball and unpack it inside C</tmp> in the VM:"
24950 #: ../tools/virt-tar.pl:56
24953 " virt-tar -u domname uploadstuff.tar /tmp\n"
24958 #: ../tools/virt-tar.pl:58
24961 " virt-tar -zu domname uploadstuff.tar.gz /tmp\n"
24966 #: ../tools/virt-tar.pl:62
24968 "You must I<not> use C<virt-tar> with the C<-u> option (upload) on live "
24969 "virtual machines. If you do this, you risk disk corruption in the VM. "
24970 "C<virt-tar> tries to stop you from doing this, but doesn't catch all cases."
24974 #: ../tools/virt-tar.pl:67
24976 "You can use C<-x> (extract) on live virtual machines, but you might get "
24977 "inconsistent results or errors if there is filesystem activity inside the "
24978 "VM. If the live VM is synched and quiescent, then C<virt-tar> will usually "
24979 "work, but the only way to guarantee consistent results is if the virtual "
24980 "machine is shut down."
24984 #: ../tools/virt-tar.pl:75
24986 "C<virt-tar> is a general purpose archive tool for downloading and uploading "
24987 "parts of a guest filesystem. There are many possibilities: making backups, "
24988 "uploading data files, snooping on guest activity, fixing or customizing "
24993 #: ../tools/virt-tar.pl:80
24995 "If you want to just view a single file, use L<virt-cat(1)>. If you just "
24996 "want to edit a single file, use L<virt-edit(1)>. For more complex cases you "
24997 "should look at the L<guestfish(1)> tool."
25001 #: ../tools/virt-tar.pl:84
25003 "There are two modes of operation: C<-x> (eXtract) downloads a directory and "
25004 "its contents (recursively) from the virtual machine into a local tarball. "
25005 "C<-u> uploads from a local tarball, unpacking it into a directory inside the "
25006 "virtual machine. You cannot use these two options together."
25010 #: ../tools/virt-tar.pl:90
25012 "In addition, you may need to use the C<-z> (gZip) option to enable "
25013 "compression. When uploading, you have to specify C<-z> if the upload file "
25014 "is compressed because virt-tar won't detect this on its own."
25018 #: ../tools/virt-tar.pl:94
25020 "C<virt-tar> can only handle tar (optionally gzipped) format tarballs. For "
25021 "example it cannot do PKZip files or bzip2 compression. If you want that "
25022 "then you'll have to rebuild the tarballs yourself. (This is a limitation of "
25023 "the L<libguestfs(3)> API)."
25027 #: ../tools/virt-tar.pl:135
25028 msgid "B<-x> | B<--extract> | B<--download>"
25032 #: ../tools/virt-tar.pl:137
25033 msgid "B<-u> | B<--upload>"
25037 #: ../tools/virt-tar.pl:139
25039 "Use C<-x> to extract (download) a directory from a virtual machine to a "
25044 #: ../tools/virt-tar.pl:142
25046 "Use C<-u> to upload and unpack from a local tarball into a virtual machine. "
25047 "Please read the L</WARNING> section above before using this option."
25051 #: ../tools/virt-tar.pl:146
25052 msgid "You must specify exactly one of these options."
25056 #: ../tools/virt-tar.pl:152
25057 msgid "B<-z> | B<--gzip>"
25061 #: ../tools/virt-tar.pl:154
25062 msgid "Specify that the input or output tarball is gzip-compressed."
25066 #: ../tools/virt-tar.pl:259
25068 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
25069 "L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, "
25070 "L<http://libguestfs.org/>."
25074 #: ../tools/virt-win-reg.pl:38
25076 "virt-win-reg - Export and merge Windows Registry entries from a Windows "
25081 #: ../tools/virt-win-reg.pl:42
25084 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey'\n"
25089 #: ../tools/virt-win-reg.pl:44
25092 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' name\n"
25097 #: ../tools/virt-win-reg.pl:46
25100 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' @\n"
25105 #: ../tools/virt-win-reg.pl:48
25108 " virt-win-reg --merge domname [input.reg ...]\n"
25113 #: ../tools/virt-win-reg.pl:50
25116 " virt-win-reg [--options] disk.img ... # instead of domname\n"
25121 #: ../tools/virt-win-reg.pl:54
25123 "You must I<not> use C<virt-win-reg> with the C<--merge> option on live "
25124 "virtual machines. If you do this, you I<will> get irreversible disk "
25125 "corruption in the VM. C<virt-win-reg> tries to stop you from doing this, "
25126 "but doesn't catch all cases."
25130 #: ../tools/virt-win-reg.pl:59
25132 "Modifying the Windows Registry is an inherently risky operation. The format "
25133 "is deliberately obscure and undocumented, and Registry changes can leave the "
25134 "system unbootable. Therefore when using the C<--merge> option, make sure "
25135 "you have a reliable backup first."
25139 #: ../tools/virt-win-reg.pl:66
25141 "This program can export and merge Windows Registry entries from a Windows "
25146 #: ../tools/virt-win-reg.pl:69
25148 "The first parameter is the libvirt guest name or the raw disk image of a "
25153 #: ../tools/virt-win-reg.pl:72
25155 "If C<--merge> is I<not> specified, then the chosen registry key is "
25156 "displayed/exported (recursively). For example:"
25160 #: ../tools/virt-win-reg.pl:75
25163 " $ virt-win-reg Windows7 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft'\n"
25168 #: ../tools/virt-win-reg.pl:77
25169 msgid "You can also display single values from within registry keys, for example:"
25173 #: ../tools/virt-win-reg.pl:80
25176 " $ cvkey='HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'\n"
25177 " $ virt-win-reg Windows7 $cvkey ProductName\n"
25178 " Windows 7 Enterprise\n"
25183 #: ../tools/virt-win-reg.pl:84
25185 "With C<--merge>, you can merge a textual regedit file into the Windows "
25190 #: ../tools/virt-win-reg.pl:87
25193 " $ virt-win-reg --merge Windows7 changes.reg\n"
25198 #: ../tools/virt-win-reg.pl:89
25199 msgid "SUPPORTED SYSTEMS"
25203 #: ../tools/virt-win-reg.pl:91
25205 "The program currently supports Windows NT-derived guests starting with "
25206 "Windows XP through to at least Windows 7."
25210 #: ../tools/virt-win-reg.pl:94
25212 "Registry support is done for C<HKEY_LOCAL_MACHINE\\SAM>, "
25213 "C<HKEY_LOCAL_MACHINE\\SECURITY>, C<HKEY_LOCAL_MACHINE\\SOFTWARE>, "
25214 "C<HKEY_LOCAL_MACHINE\\SYSTEM> and C<HKEY_USERS\\.DEFAULT>."
25218 #: ../tools/virt-win-reg.pl:98
25220 "You can use C<HKLM> as a shorthand for C<HKEY_LOCAL_MACHINE>, and C<HKU> for "
25225 #: ../tools/virt-win-reg.pl:101
25227 "C<HKEY_USERS\\$SID> and C<HKEY_CURRENT_USER> are B<not> supported at this "
25232 #: ../tools/virt-win-reg.pl:104
25237 #: ../tools/virt-win-reg.pl:106
25239 "This program is only meant for simple access to the registry. If you want "
25240 "to do complicated things with the registry, we suggest you download the "
25241 "Registry hive files from the guest using L<libguestfs(3)> or L<guestfish(1)> "
25242 "and access them locally, eg. using L<hivex(3)>, L<hivexsh(1)> or "
25243 "L<hivexregedit(1)>."
25247 #: ../tools/virt-win-reg.pl:112
25252 #: ../tools/virt-win-reg.pl:114
25254 "C<virt-win-reg> expects that regedit files have already been reencoded in "
25255 "the local encoding. Usually on Linux hosts, this means UTF-8 with "
25256 "Unix-style line endings. Since Windows regedit files are often in UTF-16LE "
25257 "with Windows-style line endings, you may need to reencode the whole file "
25258 "before or after processing."
25262 #: ../tools/virt-win-reg.pl:120
25264 "To reencode a file from Windows format to Linux (before processing it with "
25265 "the C<--merge> option), you would do something like this:"
25269 #: ../tools/virt-win-reg.pl:123
25272 " iconv -f utf-16le -t utf-8 < win.reg | dos2unix > linux.reg\n"
25277 #: ../tools/virt-win-reg.pl:125
25279 "To go in the opposite direction, after exporting and before sending the file "
25280 "to a Windows user, do something like this:"
25284 #: ../tools/virt-win-reg.pl:128
25287 " unix2dos linux.reg | iconv -f utf-8 -t utf-16le > win.reg\n"
25292 #: ../tools/virt-win-reg.pl:130
25293 msgid "For more information about encoding, see L<Win::Hivex::Regedit(3)>."
25297 #: ../tools/virt-win-reg.pl:132
25299 "If you are unsure about the current encoding, use the L<file(1)> command. "
25300 "Recent versions of Windows regedit.exe produce a UTF-16LE file with "
25301 "Windows-style (CRLF) line endings, like this:"
25305 #: ../tools/virt-win-reg.pl:136
25308 " $ file software.reg\n"
25309 " software.reg: Little-endian UTF-16 Unicode text, with very long lines,\n"
25310 " with CRLF line terminators\n"
25315 #: ../tools/virt-win-reg.pl:140
25316 msgid "This file would need conversion before you could C<--merge> it."
25320 #: ../tools/virt-win-reg.pl:142
25321 msgid "SHELL QUOTING"
25325 #: ../tools/virt-win-reg.pl:144
25327 "Be careful when passing parameters containing C<\\> (backslash) in the "
25328 "shell. Usually you will have to use 'single quotes' or double backslashes "
25329 "(but not both) to protect them from the shell."
25333 #: ../tools/virt-win-reg.pl:148
25334 msgid "Paths and value names are case-insensitive."
25338 #: ../tools/virt-win-reg.pl:150
25339 msgid "CurrentControlSet etc."
25343 #: ../tools/virt-win-reg.pl:152
25345 "Registry keys like C<CurrentControlSet> don't really exist in the Windows "
25346 "Registry at the level of the hive file, and therefore you cannot modify "
25351 #: ../tools/virt-win-reg.pl:156
25353 "C<CurrentControlSet> is usually an alias for C<ControlSet001>. In some "
25354 "circumstances it might refer to another control set. The way to find out is "
25355 "to look at the C<HKLM\\SYSTEM\\Select> key:"
25359 #: ../tools/virt-win-reg.pl:160
25362 " # virt-win-reg WindowsGuest 'HKLM\\SYSTEM\\Select'\n"
25363 " [HKEY_LOCAL_MACHINE\\SYSTEM\\Select]\n"
25364 " \"Current\"=dword:00000001\n"
25365 " \"Default\"=dword:00000001\n"
25366 " \"Failed\"=dword:00000000\n"
25367 " \"LastKnownGood\"=dword:00000002\n"
25372 #: ../tools/virt-win-reg.pl:167
25373 msgid "\"Default\" is the one which Windows will choose when it boots."
25377 #: ../tools/virt-win-reg.pl:169
25378 msgid "Similarly, other C<Current...> keys in the path may need to be replaced."
25382 #: ../tools/virt-win-reg.pl:216
25387 #: ../tools/virt-win-reg.pl:218
25389 "In merge mode, this merges a textual regedit file into the Windows Registry "
25390 "of the virtual machine. If this flag is I<not> given then virt-win-reg "
25391 "displays or exports Registry entries instead."
25395 #: ../tools/virt-win-reg.pl:222
25397 "Note that C<--merge> is I<unsafe> to use on live virtual machines, and will "
25398 "result in disk corruption. However exporting (without this flag) is always "
25403 #: ../tools/virt-win-reg.pl:230
25404 msgid "B<--encoding> UTF-16LE|ASCII"
25408 #: ../tools/virt-win-reg.pl:232
25410 "When merging (only), you may need to specify the encoding for strings to be "
25411 "used in the hive file. This is explained in detail in "
25412 "L<Win::Hivex::Regedit(3)/ENCODING STRINGS>."
25416 #: ../tools/virt-win-reg.pl:236
25418 "The default is to use UTF-16LE, which should work with recent versions of "
25423 #: ../tools/virt-win-reg.pl:463
25425 "L<hivex(3)>, L<hivexsh(1)>, L<hivexregedit(1)>, L<guestfs(3)>, "
25426 "L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, "
25427 "L<Sys::Guestfs::Lib(3)>, L<Win::Hivex(3)>, L<Win::Hivex::Regedit(3)>, "
25428 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
25432 #: ../tools/virt-win-reg.pl:481
25435 " export LIBGUESTFS_DEBUG=1\n"
25436 " virt-win-reg --debug [... rest ...] > /tmp/virt-win-reg.log 2>&1\n"
25441 #: ../tools/virt-win-reg.pl:484
25443 "Attach /tmp/virt-win-reg.log to a new bug report at "
25444 "L<https://bugzilla.redhat.com/>"