1 # SOME DESCRIPTIVE TITLE.
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
8 "Project-Id-Version: PACKAGE VERSION\n"
9 "Report-Msgid-Bugs-To: libguestfs@redhat.com\n"
10 "POT-Creation-Date: 2010-09-04 10:26+0200\n"
11 "PO-Revision-Date: 2010-09-02 14:46+0100\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <LL@li.org>\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
19 #: ../src/guestfs.pod:1 ../fish/guestfish.pod:1
20 #: ../test-tool/libguestfs-test-tool.pod:1 ../fuse/guestmount.pod:1
21 #: ../inspector/virt-inspector.pl:36 ../tools/virt-cat.pl:30
22 #: ../tools/virt-df.pl:32 ../tools/virt-edit.pl:31
23 #: ../tools/virt-list-filesystems.pl:28 ../tools/virt-list-partitions.pl:28
24 #: ../tools/virt-ls.pl:31 ../tools/virt-make-fs.pl:33
25 #: ../tools/virt-rescue.pl:29 ../tools/virt-resize.pl:38
26 #: ../tools/virt-tar.pl:30 ../tools/virt-win-reg.pl:34
31 #: ../src/guestfs.pod:3 ../fish/guestfish.pod:3
32 #: ../test-tool/libguestfs-test-tool.pod:3 ../fuse/guestmount.pod:3
33 #: ../inspector/virt-inspector.pl:38 ../tools/virt-cat.pl:32
34 #: ../tools/virt-df.pl:34 ../tools/virt-edit.pl:33
35 #: ../tools/virt-list-filesystems.pl:30 ../tools/virt-list-partitions.pl:30
36 #: ../tools/virt-ls.pl:33 ../tools/virt-make-fs.pl:35
37 #: ../tools/virt-rescue.pl:31 ../tools/virt-resize.pl:40
38 #: ../tools/virt-tar.pl:32 ../tools/virt-win-reg.pl:36
43 #: ../src/guestfs.pod:5
44 msgid "guestfs - Library for accessing and modifying virtual machine images"
48 #: ../src/guestfs.pod:7 ../fish/guestfish.pod:7
49 #: ../test-tool/libguestfs-test-tool.pod:7 ../fuse/guestmount.pod:7
50 #: ../inspector/virt-inspector.pl:42 ../tools/virt-cat.pl:36
51 #: ../tools/virt-df.pl:38 ../tools/virt-edit.pl:37
52 #: ../tools/virt-list-filesystems.pl:34 ../tools/virt-list-partitions.pl:34
53 #: ../tools/virt-ls.pl:37 ../tools/virt-make-fs.pl:39
54 #: ../tools/virt-rescue.pl:35 ../tools/virt-resize.pl:44
55 #: ../tools/virt-tar.pl:36 ../tools/virt-win-reg.pl:40
60 #: ../src/guestfs.pod:9
63 " #include <guestfs.h>\n"
68 #: ../src/guestfs.pod:11
71 " guestfs_h *g = guestfs_create ();\n"
72 " guestfs_add_drive (g, \"guest.img\");\n"
73 " guestfs_launch (g);\n"
74 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
75 " guestfs_touch (g, \"/hello\");\n"
76 " guestfs_umount (g, \"/\");\n"
77 " guestfs_sync (g);\n"
78 " guestfs_close (g);\n"
83 #: ../src/guestfs.pod:20
86 " cc prog.c -o prog -lguestfs\n"
88 " cc prog.c -o prog `pkg-config libguestfs --cflags --libs`\n"
93 #: ../src/guestfs.pod:24 ../fish/guestfish.pod:115
94 #: ../test-tool/libguestfs-test-tool.pod:11 ../fuse/guestmount.pod:16
95 #: ../inspector/virt-inspector.pl:48 ../tools/virt-cat.pl:42
96 #: ../tools/virt-df.pl:46 ../tools/virt-edit.pl:51
97 #: ../tools/virt-list-filesystems.pl:40 ../tools/virt-list-partitions.pl:40
98 #: ../tools/virt-ls.pl:43 ../tools/virt-make-fs.pl:47
99 #: ../tools/virt-rescue.pl:51 ../tools/virt-resize.pl:50
100 #: ../tools/virt-tar.pl:73 ../tools/virt-win-reg.pl:64
105 #: ../src/guestfs.pod:26
107 "Libguestfs is a library for accessing and modifying guest disk images. "
108 "Amongst the things this is good for: making batch configuration changes to "
109 "guests, getting disk used/free statistics (see also: virt-df), migrating "
110 "between virtualization systems (see also: virt-p2v), performing partial "
111 "backups, performing partial guest clones, cloning guests and changing "
112 "registry/UUID/hostname info, and much else besides."
116 #: ../src/guestfs.pod:34
118 "Libguestfs uses Linux kernel and qemu code, and can access any type of guest "
119 "filesystem that Linux and qemu can, including but not limited to: ext2/3/4, "
120 "btrfs, FAT and NTFS, LVM, many different disk partition schemes, qcow, "
125 #: ../src/guestfs.pod:39
127 "Libguestfs provides ways to enumerate guest storage (eg. partitions, LVs, "
128 "what filesystem is in each LV, etc.). It can also run commands in the "
129 "context of the guest. Also you can access filesystems over FUSE."
133 #: ../src/guestfs.pod:44
135 "Libguestfs is a library that can be linked with C and C++ management "
136 "programs (or management programs written in OCaml, Perl, Python, Ruby, Java, "
137 "PHP, Haskell or C#). You can also use it from shell scripts or the command "
142 #: ../src/guestfs.pod:49
144 "You don't need to be root to use libguestfs, although obviously you do need "
145 "enough permissions to access the disk images."
149 #: ../src/guestfs.pod:52
151 "Libguestfs is a large API because it can do many things. For a gentle "
152 "introduction, please read the L</API OVERVIEW> section next."
156 #: ../src/guestfs.pod:55
161 #: ../src/guestfs.pod:57
163 "This section provides a gentler overview of the libguestfs API. We also try "
164 "to group API calls together, where that may not be obvious from reading "
165 "about the individual calls in the main section of this manual."
169 #: ../src/guestfs.pod:62
174 #: ../src/guestfs.pod:64
176 "Before you can use libguestfs calls, you have to create a handle. Then you "
177 "must add at least one disk image to the handle, followed by launching the "
178 "handle, then performing whatever operations you want, and finally closing "
179 "the handle. By convention we use the single letter C<g> for the name of the "
180 "handle variable, although of course you can use any name you want."
184 #: ../src/guestfs.pod:71
185 msgid "The general structure of all libguestfs-using programs looks like this:"
189 #: ../src/guestfs.pod:74
192 " guestfs_h *g = guestfs_create ();\n"
197 #: ../src/guestfs.pod:76
200 " /* Call guestfs_add_drive additional times if there are\n"
201 " * multiple disk images.\n"
203 " guestfs_add_drive (g, \"guest.img\");\n"
208 #: ../src/guestfs.pod:81
211 " /* Most manipulation calls won't work until you've launched\n"
212 " * the handle 'g'. You have to do this _after_ adding drives\n"
213 " * and _before_ other commands.\n"
215 " guestfs_launch (g);\n"
220 #: ../src/guestfs.pod:87
223 " /* Now you can examine what partitions, LVs etc are available.\n"
225 " char **partitions = guestfs_list_partitions (g);\n"
226 " char **logvols = guestfs_lvs (g);\n"
231 #: ../src/guestfs.pod:92
234 " /* To access a filesystem in the image, you must mount it.\n"
236 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
241 #: ../src/guestfs.pod:96
244 " /* Now you can perform filesystem actions on the guest\n"
247 " guestfs_touch (g, \"/hello\");\n"
252 #: ../src/guestfs.pod:101
255 " /* You only need to call guestfs_sync if you have made\n"
256 " * changes to the guest image. (But if you've made changes\n"
257 " * then you *must* sync). See also: guestfs_umount and\n"
258 " * guestfs_umount_all calls.\n"
260 " guestfs_sync (g);\n"
265 #: ../src/guestfs.pod:108
268 " /* Close the handle 'g'. */\n"
269 " guestfs_close (g);\n"
274 #: ../src/guestfs.pod:111
276 "The code above doesn't include any error checking. In real code you should "
277 "check return values carefully for errors. In general all functions that "
278 "return integers return C<-1> on error, and all functions that return "
279 "pointers return C<NULL> on error. See section L</ERROR HANDLING> below for "
280 "how to handle errors, and consult the documentation for each function call "
281 "below to see precisely how they return error indications."
285 #: ../src/guestfs.pod:119
290 #: ../src/guestfs.pod:121
292 "The image filename (C<\"guest.img\"> in the example above) could be a disk "
293 "image from a virtual machine, a L<dd(1)> copy of a physical hard disk, an "
294 "actual block device, or simply an empty file of zeroes that you have created "
295 "through L<posix_fallocate(3)>. Libguestfs lets you do useful things to all "
300 #: ../src/guestfs.pod:127
302 "You can add a disk read-only using L</guestfs_add_drive_ro>, in which case "
303 "libguestfs won't modify the file."
307 #: ../src/guestfs.pod:130
309 "Be extremely cautious if the disk image is in use, eg. if it is being used "
310 "by a virtual machine. Adding it read-write will almost certainly cause disk "
311 "corruption, but adding it read-only is safe."
315 #: ../src/guestfs.pod:134
317 "You must add at least one disk image, and you may add multiple disk images. "
318 "In the API, the disk images are usually referred to as C</dev/sda> (for the "
319 "first one you added), C</dev/sdb> (for the second one you added), etc."
323 #: ../src/guestfs.pod:139
325 "Once L</guestfs_launch> has been called you cannot add any more images. You "
326 "can call L</guestfs_list_devices> to get a list of the device names, in the "
327 "order that you added them. See also L</BLOCK DEVICE NAMING> below."
331 #: ../src/guestfs.pod:144
336 #: ../src/guestfs.pod:146
338 "Before you can read or write files, create directories and so on in a disk "
339 "image that contains filesystems, you have to mount those filesystems using "
340 "L</guestfs_mount>. If you already know that a disk image contains (for "
341 "example) one partition with a filesystem on that partition, then you can "
346 #: ../src/guestfs.pod:152
349 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
354 #: ../src/guestfs.pod:154
356 "where C</dev/sda1> means literally the first partition (C<1>) of the first "
357 "disk image that we added (C</dev/sda>). If the disk contains Linux LVM2 "
358 "logical volumes you could refer to those instead (eg. C</dev/VG/LV>)."
362 #: ../src/guestfs.pod:158
364 "If you are given a disk image and you don't know what it contains then you "
365 "have to find out. Libguestfs can do that too: use L</"
366 "guestfs_list_partitions> and L</guestfs_lvs> to list possible partitions and "
367 "LVs, and either try mounting each to see what is mountable, or else examine "
368 "them with L</guestfs_vfs_type> or L</guestfs_file>. Libguestfs also has a "
369 "set of APIs for inspection of disk images (see L</INSPECTION> below). But "
370 "you might find it easier to look at higher level programs built on top of "
371 "libguestfs, in particular L<virt-inspector(1)>."
375 #: ../src/guestfs.pod:168
377 "To mount a disk image read-only, use L</guestfs_mount_ro>. There are "
378 "several other variations of the C<guestfs_mount_*> call."
382 #: ../src/guestfs.pod:171
383 msgid "FILESYSTEM ACCESS AND MODIFICATION"
387 #: ../src/guestfs.pod:173
389 "The majority of the libguestfs API consists of fairly low-level calls for "
390 "accessing and modifying the files, directories, symlinks etc on mounted "
391 "filesystems. There are over a hundred such calls which you can find listed "
392 "in detail below in this man page, and we don't even pretend to cover them "
393 "all in this overview."
397 #: ../src/guestfs.pod:179
399 "Specify filenames as full paths, starting with C<\"/\"> and including the "
404 #: ../src/guestfs.pod:182
406 "For example, if you mounted a filesystem at C<\"/\"> and you want to read "
407 "the file called C<\"etc/passwd\"> then you could do:"
411 #: ../src/guestfs.pod:185
414 " char *data = guestfs_cat (g, \"/etc/passwd\");\n"
419 #: ../src/guestfs.pod:187
421 "This would return C<data> as a newly allocated buffer containing the full "
422 "content of that file (with some conditions: see also L</DOWNLOADING> below), "
423 "or C<NULL> if there was an error."
427 #: ../src/guestfs.pod:191
429 "As another example, to create a top-level directory on that filesystem "
430 "called C<\"var\"> you would do:"
434 #: ../src/guestfs.pod:194
437 " guestfs_mkdir (g, \"/var\");\n"
442 #: ../src/guestfs.pod:196
443 msgid "To create a symlink you could do:"
447 #: ../src/guestfs.pod:198
450 " guestfs_ln_s (g, \"/etc/init.d/portmap\",\n"
451 " \"/etc/rc3.d/S30portmap\");\n"
456 #: ../src/guestfs.pod:201
458 "Libguestfs will reject attempts to use relative paths and there is no "
459 "concept of a current working directory."
463 #: ../src/guestfs.pod:204
465 "Libguestfs can return errors in many situations: for example if the "
466 "filesystem isn't writable, or if a file or directory that you requested "
467 "doesn't exist. If you are using the C API (documented here) you have to "
468 "check for those error conditions after each call. (Other language bindings "
469 "turn these errors into exceptions)."
473 #: ../src/guestfs.pod:210
475 "File writes are affected by the per-handle umask, set by calling L</"
476 "guestfs_umask> and defaulting to 022. See L</UMASK>."
480 #: ../src/guestfs.pod:213
485 #: ../src/guestfs.pod:215
487 "Libguestfs contains API calls to read, create and modify partition tables on "
492 #: ../src/guestfs.pod:218
494 "In the common case where you want to create a single partition covering the "
495 "whole disk, you should use the L</guestfs_part_disk> call:"
499 #: ../src/guestfs.pod:222
502 " const char *parttype = \"mbr\";\n"
503 " if (disk_is_larger_than_2TB)\n"
504 " parttype = \"gpt\";\n"
505 " guestfs_part_disk (g, \"/dev/sda\", parttype);\n"
510 #: ../src/guestfs.pod:227
512 "Obviously this effectively wipes anything that was on that disk image before."
516 #: ../src/guestfs.pod:230
521 #: ../src/guestfs.pod:232
523 "Libguestfs provides access to a large part of the LVM2 API, such as L</"
524 "guestfs_lvcreate> and L</guestfs_vgremove>. It won't make much sense unless "
525 "you familiarize yourself with the concepts of physical volumes, volume "
526 "groups and logical volumes."
530 #: ../src/guestfs.pod:237
532 "This author strongly recommends reading the LVM HOWTO, online at L<http://"
533 "tldp.org/HOWTO/LVM-HOWTO/>."
537 #: ../src/guestfs.pod:240
542 #: ../src/guestfs.pod:242
544 "Use L</guestfs_cat> to download small, text only files. This call is "
545 "limited to files which are less than 2 MB and which cannot contain any ASCII "
546 "NUL (C<\\0>) characters. However it has a very simple to use API."
550 #: ../src/guestfs.pod:247
552 "L</guestfs_read_file> can be used to read files which contain arbitrary 8 "
553 "bit data, since it returns a (pointer, size) pair. However it is still "
554 "limited to \"small\" files, less than 2 MB."
558 #: ../src/guestfs.pod:251
560 "L</guestfs_download> can be used to download any file, with no limits on "
561 "content or size (even files larger than 4 GB)."
565 #: ../src/guestfs.pod:254
567 "To download multiple files, see L</guestfs_tar_out> and L</guestfs_tgz_out>."
571 #: ../src/guestfs.pod:257
576 #: ../src/guestfs.pod:259
578 "It's often the case that you want to write a file or files to the disk image."
582 #: ../src/guestfs.pod:262
584 "To write a small file with fixed content, use L</guestfs_write>. To create "
585 "a file of all zeroes, use L</guestfs_truncate_size> (sparse) or L</"
586 "guestfs_fallocate64> (with all disk blocks allocated). There are a variety "
587 "of other functions for creating test files, for example L</guestfs_fill> and "
588 "L</guestfs_fill_pattern>."
592 #: ../src/guestfs.pod:268
594 "To upload a single file, use L</guestfs_upload>. This call has no limits on "
595 "file content or size (even files larger than 4 GB)."
599 #: ../src/guestfs.pod:271
601 "To upload multiple files, see L</guestfs_tar_in> and L</guestfs_tgz_in>."
605 #: ../src/guestfs.pod:273
607 "However the fastest way to upload I<large numbers of arbitrary files> is to "
608 "turn them into a squashfs or CD ISO (see L<mksquashfs(8)> and L<mkisofs(8)"
609 ">), then attach this using L</guestfs_add_drive_ro>. If you add the drive "
610 "in a predictable way (eg. adding it last after all other drives) then you "
611 "can get the device name from L</guestfs_list_devices> and mount it directly "
612 "using L</guestfs_mount_ro>. Note that squashfs images are sometimes non-"
613 "portable between kernel versions, and they don't support labels or UUIDs. "
614 "If you want to pre-build an image or you need to mount it using a label or "
615 "UUID, use an ISO image instead."
619 #: ../src/guestfs.pod:284
624 #: ../src/guestfs.pod:286
626 "There are various different commands for copying between files and devices "
627 "and in and out of the guest filesystem. These are summarised in the table "
632 #: ../src/guestfs.pod:292
633 msgid "B<file> to B<file>"
637 #: ../src/guestfs.pod:294
639 "Use L</guestfs_cp> to copy a single file, or L</guestfs_cp_a> to copy "
640 "directories recursively."
644 #: ../src/guestfs.pod:297
645 msgid "B<file or device> to B<file or device>"
649 #: ../src/guestfs.pod:299
651 "Use L</guestfs_dd> which efficiently uses L<dd(1)> to copy between files and "
652 "devices in the guest."
656 #: ../src/guestfs.pod:302
657 msgid "Example: duplicate the contents of an LV:"
661 #: ../src/guestfs.pod:304
664 " guestfs_dd (g, \"/dev/VG/Original\", \"/dev/VG/Copy\");\n"
669 #: ../src/guestfs.pod:306
671 "The destination (C</dev/VG/Copy>) must be at least as large as the source "
672 "(C</dev/VG/Original>). To copy less than the whole source device, use L</"
673 "guestfs_copy_size>."
677 #: ../src/guestfs.pod:310
678 msgid "B<file on the host> to B<file or device>"
682 #: ../src/guestfs.pod:312
683 msgid "Use L</guestfs_upload>. See L</UPLOADING> above."
687 #: ../src/guestfs.pod:314
688 msgid "B<file or device> to B<file on the host>"
692 #: ../src/guestfs.pod:316
693 msgid "Use L</guestfs_download>. See L</DOWNLOADING> above."
697 #: ../src/guestfs.pod:320
698 msgid "LISTING FILES"
702 #: ../src/guestfs.pod:322
704 "L</guestfs_ll> is just designed for humans to read (mainly when using the "
705 "L<guestfish(1)>-equivalent command C<ll>)."
709 #: ../src/guestfs.pod:325
711 "L</guestfs_ls> is a quick way to get a list of files in a directory from "
712 "programs, as a flat list of strings."
716 #: ../src/guestfs.pod:328
718 "L</guestfs_readdir> is a programmatic way to get a list of files in a "
719 "directory, plus additional information about each one. It is more "
720 "equivalent to using the L<readdir(3)> call on a local filesystem."
724 #: ../src/guestfs.pod:332
726 "L</guestfs_find> and L</guestfs_find0> can be used to recursively list files."
730 #: ../src/guestfs.pod:335
731 msgid "RUNNING COMMANDS"
735 #: ../src/guestfs.pod:337
737 "Although libguestfs is a primarily an API for manipulating files inside "
738 "guest images, we also provide some limited facilities for running commands "
743 #: ../src/guestfs.pod:341
744 msgid "There are many limitations to this:"
748 #: ../src/guestfs.pod:345 ../src/guestfs.pod:350 ../src/guestfs.pod:355
749 #: ../src/guestfs.pod:359 ../src/guestfs.pod:364 ../src/guestfs.pod:368
750 #: ../src/guestfs.pod:373 ../src/guestfs.pod:1226 ../src/guestfs.pod:1231
751 #: ../src/guestfs.pod:1235 ../src/guestfs.pod:1337 ../src/guestfs.pod:1341
752 #: ../src/guestfs.pod:1345 ../src/guestfs.pod:1350 ../src/guestfs.pod:1358
753 #: ../src/guestfs.pod:1377 ../src/guestfs.pod:1385 ../src/guestfs.pod:1599
754 #: ../src/guestfs.pod:1605 ../src/guestfs.pod:1610 ../src/guestfs.pod:1616
755 #: ../src/guestfs.pod:1723 ../src/guestfs.pod:1727 ../src/guestfs.pod:1731
756 #: ../src/guestfs.pod:1735 ../src/guestfs-actions.pod:14
757 #: ../src/guestfs-actions.pod:21 ../src/guestfs-actions.pod:372
758 #: ../src/guestfs-actions.pod:380 ../src/guestfs-actions.pod:387
759 #: ../src/guestfs-actions.pod:394 ../src/guestfs-actions.pod:1257
760 #: ../src/guestfs-actions.pod:1261 ../src/guestfs-actions.pod:1265
761 #: ../src/guestfs-actions.pod:1269 ../src/guestfs-actions.pod:1277
762 #: ../src/guestfs-actions.pod:1281 ../src/guestfs-actions.pod:1285
763 #: ../src/guestfs-actions.pod:1295 ../src/guestfs-actions.pod:1299
764 #: ../src/guestfs-actions.pod:1303 ../src/guestfs-actions.pod:1426
765 #: ../src/guestfs-actions.pod:1430 ../src/guestfs-actions.pod:1435
766 #: ../src/guestfs-actions.pod:1440 ../src/guestfs-actions.pod:1492
767 #: ../src/guestfs-actions.pod:1496 ../src/guestfs-actions.pod:1501
768 #: ../fish/guestfish.pod:309 ../fish/guestfish.pod:313
769 #: ../fish/guestfish.pod:317 ../fish/guestfish.pod:321
770 #: ../fish/guestfish-actions.pod:13 ../fish/guestfish-actions.pod:20
771 #: ../fish/guestfish-actions.pod:300 ../fish/guestfish-actions.pod:308
772 #: ../fish/guestfish-actions.pod:315 ../fish/guestfish-actions.pod:322
773 #: ../fish/guestfish-actions.pod:998 ../fish/guestfish-actions.pod:1002
774 #: ../fish/guestfish-actions.pod:1006 ../fish/guestfish-actions.pod:1010
775 #: ../fish/guestfish-actions.pod:1018 ../fish/guestfish-actions.pod:1022
776 #: ../fish/guestfish-actions.pod:1026 ../fish/guestfish-actions.pod:1036
777 #: ../fish/guestfish-actions.pod:1040 ../fish/guestfish-actions.pod:1044
778 #: ../fish/guestfish-actions.pod:1134 ../fish/guestfish-actions.pod:1138
779 #: ../fish/guestfish-actions.pod:1143 ../fish/guestfish-actions.pod:1148
780 #: ../fish/guestfish-actions.pod:1190 ../fish/guestfish-actions.pod:1194
781 #: ../fish/guestfish-actions.pod:1199 ../tools/virt-resize.pl:324
782 #: ../tools/virt-resize.pl:329 ../tools/virt-resize.pl:339
787 #: ../src/guestfs.pod:347
789 "The kernel version that the command runs under will be different from what "
794 #: ../src/guestfs.pod:352
796 "If the command needs to communicate with daemons, then most likely they "
801 #: ../src/guestfs.pod:357
802 msgid "The command will be running in limited memory."
806 #: ../src/guestfs.pod:361
808 "The network may not be available unless you enable it (see L</"
809 "guestfs_set_network>)."
813 #: ../src/guestfs.pod:366
814 msgid "Only supports Linux guests (not Windows, BSD, etc)."
818 #: ../src/guestfs.pod:370
820 "Architecture limitations (eg. won't work for a PPC guest on an X86 host)."
824 #: ../src/guestfs.pod:375
826 "For SELinux guests, you may need to enable SELinux and load policy first. "
827 "See L</SELINUX> in this manpage."
831 #: ../src/guestfs.pod:380
833 "The two main API calls to run commands are L</guestfs_command> and L</"
834 "guestfs_sh> (there are also variations)."
838 #: ../src/guestfs.pod:383
840 "The difference is that L</guestfs_sh> runs commands using the shell, so any "
841 "shell globs, redirections, etc will work."
845 #: ../src/guestfs.pod:386
846 msgid "CONFIGURATION FILES"
850 #: ../src/guestfs.pod:388
852 "To read and write configuration files in Linux guest filesystems, we "
853 "strongly recommend using Augeas. For example, Augeas understands how to "
854 "read and write, say, a Linux shadow password file or X.org configuration "
855 "file, and so avoids you having to write that code."
859 #: ../src/guestfs.pod:393
861 "The main Augeas calls are bound through the C<guestfs_aug_*> APIs. We don't "
862 "document Augeas itself here because there is excellent documentation on the "
863 "L<http://augeas.net/> website."
867 #: ../src/guestfs.pod:397
869 "If you don't want to use Augeas (you fool!) then try calling L</"
870 "guestfs_read_lines> to get the file as a list of lines which you can iterate "
875 #: ../src/guestfs.pod:401
880 #: ../src/guestfs.pod:403
882 "We support SELinux guests. To ensure that labeling happens correctly in "
883 "SELinux guests, you need to enable SELinux and load the guest's policy:"
887 #: ../src/guestfs.pod:409
892 #: ../src/guestfs.pod:411
893 msgid "Before launching, do:"
897 #: ../src/guestfs.pod:413
900 " guestfs_set_selinux (g, 1);\n"
905 #: ../src/guestfs.pod:415
910 #: ../src/guestfs.pod:417
912 "After mounting the guest's filesystem(s), load the policy. This is best "
913 "done by running the L<load_policy(8)> command in the guest itself:"
917 #: ../src/guestfs.pod:421
920 " guestfs_sh (g, \"/usr/sbin/load_policy\");\n"
925 #: ../src/guestfs.pod:423
927 "(Older versions of C<load_policy> require you to specify the name of the "
932 #: ../src/guestfs.pod:426
937 #: ../src/guestfs.pod:428
939 "Optionally, set the security context for the API. The correct security "
940 "context to use can only be known by inspecting the guest. As an example:"
944 #: ../src/guestfs.pod:432
947 " guestfs_setcon (g, \"unconfined_u:unconfined_r:unconfined_t:s0\");\n"
952 #: ../src/guestfs.pod:436
953 msgid "This will work for running commands and editing existing files."
957 #: ../src/guestfs.pod:438
959 "When new files are created, you may need to label them explicitly, for "
960 "example by running the external command C<restorecon pathname>."
964 #: ../src/guestfs.pod:442
969 #: ../src/guestfs.pod:444
971 "Certain calls are affected by the current file mode creation mask (the "
972 "\"umask\"). In particular ones which create files or directories, such as "
973 "L</guestfs_touch>, L</guestfs_mknod> or L</guestfs_mkdir>. This affects "
974 "either the default mode that the file is created with or modifies the mode "
979 #: ../src/guestfs.pod:450
981 "The default umask is C<022>, so files are created with modes such as C<0644> "
982 "and directories with C<0755>."
986 #: ../src/guestfs.pod:453
988 "There are two ways to avoid being affected by umask. Either set umask to 0 "
989 "(call C<guestfs_umask (g, 0)> early after launching). Or call L</"
990 "guestfs_chmod> after creating each file or directory."
994 #: ../src/guestfs.pod:457
995 msgid "For more information about umask, see L<umask(2)>."
999 #: ../src/guestfs.pod:459 ../fish/guestfish.pod:559
1000 msgid "ENCRYPTED DISKS"
1004 #: ../src/guestfs.pod:461
1006 "Libguestfs allows you to access Linux guests which have been encrypted using "
1007 "whole disk encryption that conforms to the Linux Unified Key Setup (LUKS) "
1008 "standard. This includes nearly all whole disk encryption systems used by "
1009 "modern Linux guests."
1013 #: ../src/guestfs.pod:467
1015 "Use L</guestfs_vfs_type> to identify LUKS-encrypted block devices (it "
1016 "returns the string C<crypto_LUKS>)."
1020 #: ../src/guestfs.pod:470
1022 "Then open these devices by calling L</guestfs_luks_open>. Obviously you "
1023 "will require the passphrase!"
1027 #: ../src/guestfs.pod:473
1029 "Opening a LUKS device creates a new device mapper device called C</dev/"
1030 "mapper/mapname> (where C<mapname> is the string you supply to L</"
1031 "guestfs_luks_open>). Reads and writes to this mapper device are decrypted "
1032 "from and encrypted to the underlying block device respectively."
1036 #: ../src/guestfs.pod:479
1038 "LVM volume groups on the device can be made visible by calling L</"
1039 "guestfs_vgscan> followed by L</guestfs_vg_activate_all>. The logical volume"
1040 "(s) can now be mounted in the usual way."
1044 #: ../src/guestfs.pod:483
1046 "Use the reverse process to close a LUKS device. Unmount any logical volumes "
1047 "on it, deactivate the volume groups by caling C<guestfs_vg_activate (g, 0, "
1048 "[\"/dev/VG\"])>. Then close the mapper device by calling L</"
1049 "guestfs_luks_close> on the C</dev/mapper/mapname> device (I<not> the "
1050 "underlying encrypted block device)."
1054 #: ../src/guestfs.pod:490
1059 #: ../src/guestfs.pod:492
1061 "Libguestfs has APIs for inspecting an unknown disk image to find out if it "
1062 "contains operating systems. (These APIs used to be in a separate Perl-only "
1063 "library called L<Sys::Guestfs::Lib(3)> but since version 1.5.3 the most "
1064 "frequently used part of this library has been rewritten in C and moved into "
1069 #: ../src/guestfs.pod:498
1071 "Add all disks belonging to the unknown virtual machine and call L</"
1072 "guestfs_launch> in the usual way."
1076 #: ../src/guestfs.pod:501
1078 "Then call L</guestfs_inspect_os>. This function uses other libguestfs calls "
1079 "and certain heuristics, and returns a list of operating systems that were "
1080 "found. An empty list means none were found. A single element is the root "
1081 "filesystem of the operating system. For dual- or multi-boot guests, "
1082 "multiple roots can be returned, each one corresponding to a separate "
1083 "operating system. (Multi-boot virtual machines are extremely rare in the "
1084 "world of virtualization, but since this scenario can happen, we have built "
1085 "libguestfs to deal with it.)"
1089 #: ../src/guestfs.pod:510
1091 "For each root, you can then call various C<guestfs_inspect_get_*> functions "
1092 "to get additional details about that operating system. For example, call L</"
1093 "guestfs_inspect_get_type> to return the string C<windows> or C<linux> for "
1094 "Windows and Linux-based operating systems respectively."
1098 #: ../src/guestfs.pod:516
1100 "Un*x-like and Linux-based operating systems usually consist of several "
1101 "filesystems which are mounted at boot time (for example, a separate boot "
1102 "partition mounted on C</boot>). The inspection rules are able to detect how "
1103 "filesystems correspond to mount points. Call "
1104 "C<guestfs_inspect_get_mountpoints> to get this mapping. It might return a "
1105 "hash table like this example:"
1109 #: ../src/guestfs.pod:523
1112 " /boot => /dev/sda1\n"
1113 " / => /dev/vg_guest/lv_root\n"
1114 " /usr => /dev/vg_guest/lv_usr\n"
1119 #: ../src/guestfs.pod:527
1121 "The caller can then make calls to L</guestfs_mount_options> to mount the "
1122 "filesystems as suggested."
1126 #: ../src/guestfs.pod:530
1128 "Be careful to mount filesystems in the right order (eg. C</> before C</"
1129 "usr>). Sorting the keys of the hash by length, shortest first, should work."
1133 #: ../src/guestfs.pod:534
1135 "Inspection currently only works for some common operating systems. "
1136 "Contributors are welcome to send patches for other operating systems that we "
1137 "currently cannot detect."
1141 #: ../src/guestfs.pod:538
1143 "Encrypted disks must be opened before inspection. See L</ENCRYPTED DISKS> "
1144 "for more details. The L</guestfs_inspect_os> function just ignores any "
1145 "encrypted devices."
1149 #: ../src/guestfs.pod:542
1151 "A note on the implementation: The call L</guestfs_inspect_os> performs "
1152 "inspection and caches the results in the guest handle. Subsequent calls to "
1153 "C<guestfs_inspect_get_*> return this cached information, but I<do not> re-"
1154 "read the disks. If you change the content of the guest disks, you can redo "
1155 "inspection by calling L</guestfs_inspect_os> again."
1159 #: ../src/guestfs.pod:549
1160 msgid "SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS"
1164 #: ../src/guestfs.pod:551
1166 "Libguestfs can mount NTFS partitions. It does this using the L<http://www."
1167 "ntfs-3g.org/> driver."
1171 #: ../src/guestfs.pod:554
1173 "DOS and Windows still use drive letters, and the filesystems are always "
1174 "treated as case insensitive by Windows itself, and therefore you might find "
1175 "a Windows configuration file referring to a path like C<c:\\windows"
1176 "\\system32>. When the filesystem is mounted in libguestfs, that directory "
1177 "might be referred to as C</WINDOWS/System32>."
1181 #: ../src/guestfs.pod:560
1183 "Drive letter mappings are outside the scope of libguestfs. You have to use "
1184 "libguestfs to read the appropriate Windows Registry and configuration files, "
1185 "to determine yourself how drives are mapped (see also L<hivex(3)> and L<virt-"
1190 #: ../src/guestfs.pod:565
1192 "Replacing backslash characters with forward slash characters is also outside "
1193 "the scope of libguestfs, but something that you can easily do."
1197 #: ../src/guestfs.pod:568
1199 "Where we can help is in resolving the case insensitivity of paths. For "
1200 "this, call L</guestfs_case_sensitive_path>."
1204 #: ../src/guestfs.pod:571
1206 "Libguestfs also provides some help for decoding Windows Registry \"hive\" "
1207 "files, through the library C<hivex> which is part of the libguestfs project "
1208 "although ships as a separate tarball. You have to locate and download the "
1209 "hive file(s) yourself, and then pass them to C<hivex> functions. See also "
1210 "the programs L<hivexml(1)>, L<hivexsh(1)>, L<hivexregedit(1)> and L<virt-win-"
1211 "reg(1)> for more help on this issue."
1215 #: ../src/guestfs.pod:579
1216 msgid "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES"
1220 #: ../src/guestfs.pod:581
1222 "Although we don't want to discourage you from using the C API, we will "
1223 "mention here that the same API is also available in other languages."
1227 #: ../src/guestfs.pod:584
1229 "The API is broadly identical in all supported languages. This means that "
1230 "the C call C<guestfs_mount(g,path)> is C<$g-E<gt>mount($path)> in Perl, C<g."
1231 "mount(path)> in Python, and C<Guestfs.mount g path> in OCaml. In other "
1232 "words, a straightforward, predictable isomorphism between each language."
1236 #: ../src/guestfs.pod:590
1238 "Error messages are automatically transformed into exceptions if the language "
1243 #: ../src/guestfs.pod:593
1245 "We don't try to \"object orientify\" parts of the API in OO languages, "
1246 "although contributors are welcome to write higher level APIs above what we "
1247 "provide in their favourite languages if they wish."
1251 #: ../src/guestfs.pod:599
1256 #: ../src/guestfs.pod:601
1258 "You can use the I<guestfs.h> header file from C++ programs. The C++ API is "
1259 "identical to the C API. C++ classes and exceptions are not used."
1263 #: ../src/guestfs.pod:605
1268 #: ../src/guestfs.pod:607
1270 "The C# bindings are highly experimental. Please read the warnings at the "
1271 "top of C<csharp/Libguestfs.cs>."
1275 #: ../src/guestfs.pod:610
1280 #: ../src/guestfs.pod:612
1282 "This is the only language binding that is working but incomplete. Only "
1283 "calls which return simple integers have been bound in Haskell, and we are "
1284 "looking for help to complete this binding."
1288 #: ../src/guestfs.pod:616
1293 #: ../src/guestfs.pod:618
1295 "Full documentation is contained in the Javadoc which is distributed with "
1300 #: ../src/guestfs.pod:621
1305 #: ../src/guestfs.pod:623
1306 msgid "For documentation see the file C<guestfs.mli>."
1310 #: ../src/guestfs.pod:625
1315 #: ../src/guestfs.pod:627
1316 msgid "For documentation see L<Sys::Guestfs(3)>."
1320 #: ../src/guestfs.pod:629
1325 #: ../src/guestfs.pod:631
1327 "For documentation see C<README-PHP> supplied with libguestfs sources or in "
1328 "the php-libguestfs package for your distribution."
1332 #: ../src/guestfs.pod:634
1333 msgid "The PHP binding only works correctly on 64 bit machines."
1337 #: ../src/guestfs.pod:636
1342 #: ../src/guestfs.pod:638
1343 msgid "For documentation do:"
1347 #: ../src/guestfs.pod:640
1351 " >>> import guestfs\n"
1352 " >>> help (guestfs)\n"
1357 #: ../src/guestfs.pod:644
1362 #: ../src/guestfs.pod:646
1364 "Use the Guestfs module. There is no Ruby-specific documentation, but you "
1365 "can find examples written in Ruby in the libguestfs source."
1369 #: ../src/guestfs.pod:649
1370 msgid "B<shell scripts>"
1374 #: ../src/guestfs.pod:651
1375 msgid "For documentation see L<guestfish(1)>."
1379 #: ../src/guestfs.pod:655
1380 msgid "LIBGUESTFS GOTCHAS"
1384 #: ../src/guestfs.pod:657
1386 "L<http://en.wikipedia.org/wiki/Gotcha_(programming)>: \"A feature of a "
1387 "system [...] that works in the way it is documented but is counterintuitive "
1388 "and almost invites mistakes.\""
1392 #: ../src/guestfs.pod:661
1394 "Since we developed libguestfs and the associated tools, there are several "
1395 "things we would have designed differently, but are now stuck with for "
1396 "backwards compatibility or other reasons. If there is ever a libguestfs 2.0 "
1397 "release, you can expect these to change. Beware of them."
1401 #: ../src/guestfs.pod:669
1402 msgid "Autosync / forgetting to sync."
1406 #: ../src/guestfs.pod:671
1408 "When modifying a filesystem from C or another language, you B<must> unmount "
1409 "all filesystems and call L</guestfs_sync> explicitly before you close the "
1410 "libguestfs handle. You can also call:"
1414 #: ../src/guestfs.pod:675
1417 " guestfs_set_autosync (g, 1);\n"
1422 #: ../src/guestfs.pod:677
1424 "to have the unmount/sync done automatically for you when the handle 'g' is "
1425 "closed. (This feature is called \"autosync\", L</guestfs_set_autosync> q.v.)"
1429 #: ../src/guestfs.pod:681
1431 "If you forget to do this, then it is entirely possible that your changes "
1432 "won't be written out, or will be partially written, or (very rarely) that "
1433 "you'll get disk corruption."
1437 #: ../src/guestfs.pod:685
1439 "Note that in L<guestfish(3)> autosync is the default. So quick and dirty "
1440 "guestfish scripts that forget to sync will work just fine, which can make "
1441 "this very puzzling if you are trying to debug a problem."
1445 #: ../src/guestfs.pod:689
1446 msgid "Mount option C<-o sync> should not be the default."
1450 #: ../src/guestfs.pod:691
1452 "If you use L</guestfs_mount>, then C<-o sync,noatime> are added implicitly. "
1453 "However C<-o sync> does not add any reliability benefit, but does have a "
1454 "very large performance impact."
1458 #: ../src/guestfs.pod:695
1460 "The work around is to use L</guestfs_mount_options> and set the mount "
1461 "options that you actually want to use."
1465 #: ../src/guestfs.pod:698
1466 msgid "Read-only should be the default."
1470 #: ../src/guestfs.pod:700
1472 "In L<guestfish(3)>, I<--ro> should be the default, and you should have to "
1473 "specify I<--rw> if you want to make changes to the image."
1477 #: ../src/guestfs.pod:703
1478 msgid "This would reduce the potential to corrupt live VM images."
1482 #: ../src/guestfs.pod:705
1484 "Note that many filesystems change the disk when you just mount and unmount, "
1485 "even if you didn't perform any writes. You need to use L</"
1486 "guestfs_add_drive_ro> to guarantee that the disk is not changed."
1490 #: ../src/guestfs.pod:709
1491 msgid "guestfish command line is hard to use."
1495 #: ../src/guestfs.pod:711
1497 "C<guestfish disk.img> doesn't do what people expect (open C<disk.img> for "
1498 "examination). It tries to run a guestfish command C<disk.img> which doesn't "
1499 "exist, so it fails. In earlier versions of guestfish the error message was "
1500 "also unintuitive, but we have corrected this since. Like the Bourne shell, "
1501 "we should have used C<guestfish -c command> to run commands."
1505 #: ../src/guestfs.pod:718
1506 msgid "guestfish megabyte modifiers don't work right on all commands"
1510 #: ../src/guestfs.pod:720
1512 "In recent guestfish you can use C<1M> to mean 1 megabyte (and similarly for "
1513 "other modifiers). What guestfish actually does is to multiply the number "
1514 "part by the modifier part and pass the result to the C API. However this "
1515 "doesn't work for a few APIs which aren't expecting bytes, but are already "
1516 "expecting some other unit (eg. megabytes)."
1520 #: ../src/guestfs.pod:727
1521 msgid "The most common is L</guestfs_lvcreate>. The guestfish command:"
1525 #: ../src/guestfs.pod:729
1528 " lvcreate LV VG 100M\n"
1533 #: ../src/guestfs.pod:731
1535 "does not do what you might expect. Instead because L</guestfs_lvcreate> is "
1536 "already expecting megabytes, this tries to create a 100 I<terabyte> (100 "
1537 "megabytes * megabytes) logical volume. The error message you get from this "
1538 "is also a little obscure."
1542 #: ../src/guestfs.pod:736
1544 "This could be fixed in the generator by specially marking parameters and "
1545 "return values which take bytes or other units."
1549 #: ../src/guestfs.pod:739
1550 msgid "Library should return errno with error messages."
1554 #: ../src/guestfs.pod:741
1556 "It would be a nice-to-have to be able to get the original value of 'errno' "
1557 "from inside the appliance along error paths (where set). Currently "
1558 "L<guestmount(1)> goes through hoops to try to reverse the error message "
1559 "string into an errno, see the function error() in fuse/guestmount.c."
1563 #: ../src/guestfs.pod:747
1565 "In libguestfs 1.5.4, the protocol was changed so that the Linux errno is "
1566 "sent back from the daemon."
1570 #: ../src/guestfs.pod:752
1571 msgid "PROTOCOL LIMITS"
1575 #: ../src/guestfs.pod:754
1577 "Internally libguestfs uses a message-based protocol to pass API calls and "
1578 "their responses to and from a small \"appliance\" (see L</INTERNALS> for "
1579 "plenty more detail about this). The maximum message size used by the "
1580 "protocol is slightly less than 4 MB. For some API calls you may need to be "
1581 "aware of this limit. The API calls which may be affected are individually "
1582 "documented, with a link back to this section of the documentation."
1586 #: ../src/guestfs.pod:762
1588 "A simple call such as L</guestfs_cat> returns its result (the file data) in "
1589 "a simple string. Because this string is at some point internally encoded as "
1590 "a message, the maximum size that it can return is slightly under 4 MB. If "
1591 "the requested file is larger than this then you will get an error."
1595 #: ../src/guestfs.pod:768
1597 "In order to transfer large files into and out of the guest filesystem, you "
1598 "need to use particular calls that support this. The sections L</UPLOADING> "
1599 "and L</DOWNLOADING> document how to do this."
1603 #: ../src/guestfs.pod:772
1605 "You might also consider mounting the disk image using our FUSE filesystem "
1606 "support (L<guestmount(1)>)."
1610 #: ../src/guestfs.pod:775
1611 msgid "KEYS AND PASSPHRASES"
1615 #: ../src/guestfs.pod:777
1617 "Certain libguestfs calls take a parameter that contains sensitive key "
1618 "material, passed in as a C string."
1622 #: ../src/guestfs.pod:780
1624 "In the future we would hope to change the libguestfs implementation so that "
1625 "keys are L<mlock(2)>-ed into physical RAM, and thus can never end up in "
1626 "swap. However this is I<not> done at the moment, because of the complexity "
1627 "of such an implementation."
1631 #: ../src/guestfs.pod:785
1633 "Therefore you should be aware that any key parameter you pass to libguestfs "
1634 "might end up being written out to the swap partition. If this is a concern, "
1635 "scrub the swap partition or don't use libguestfs on encrypted devices."
1639 #: ../src/guestfs.pod:790
1640 msgid "CONNECTION MANAGEMENT"
1644 #: ../src/guestfs.pod:792
1649 #: ../src/guestfs.pod:794
1651 "C<guestfs_h> is the opaque type representing a connection handle. Create a "
1652 "handle by calling L</guestfs_create>. Call L</guestfs_close> to free the "
1653 "handle and release all resources used."
1657 #: ../src/guestfs.pod:798
1659 "For information on using multiple handles and threads, see the section L</"
1660 "MULTIPLE HANDLES AND MULTIPLE THREADS> below."
1664 #: ../src/guestfs.pod:801
1665 msgid "guestfs_create"
1669 #: ../src/guestfs.pod:803
1672 " guestfs_h *guestfs_create (void);\n"
1677 #: ../src/guestfs.pod:805
1678 msgid "Create a connection handle."
1682 #: ../src/guestfs.pod:807
1683 msgid "You have to call L</guestfs_add_drive> on the handle at least once."
1687 #: ../src/guestfs.pod:809
1689 "This function returns a non-NULL pointer to a handle on success or NULL on "
1694 #: ../src/guestfs.pod:812
1695 msgid "After configuring the handle, you have to call L</guestfs_launch>."
1699 #: ../src/guestfs.pod:814
1701 "You may also want to configure error handling for the handle. See L</ERROR "
1702 "HANDLING> section below."
1706 #: ../src/guestfs.pod:817
1707 msgid "guestfs_close"
1711 #: ../src/guestfs.pod:819
1714 " void guestfs_close (guestfs_h *g);\n"
1719 #: ../src/guestfs.pod:821
1720 msgid "This closes the connection handle and frees up all resources used."
1724 #: ../src/guestfs.pod:823
1725 msgid "ERROR HANDLING"
1729 #: ../src/guestfs.pod:825
1731 "The convention in all functions that return C<int> is that they return C<-1> "
1732 "to indicate an error. You can get additional information on errors by "
1733 "calling L</guestfs_last_error> and/or by setting up an error handler with L</"
1734 "guestfs_set_error_handler>."
1738 #: ../src/guestfs.pod:830
1739 msgid "The default error handler prints the information string to C<stderr>."
1743 #: ../src/guestfs.pod:832
1745 "Out of memory errors are handled differently. The default action is to call "
1746 "L<abort(3)>. If this is undesirable, then you can set a handler using L</"
1747 "guestfs_set_out_of_memory_handler>."
1751 #: ../src/guestfs.pod:836
1752 msgid "guestfs_last_error"
1756 #: ../src/guestfs.pod:838
1759 " const char *guestfs_last_error (guestfs_h *g);\n"
1764 #: ../src/guestfs.pod:840
1766 "This returns the last error message that happened on C<g>. If there has not "
1767 "been an error since the handle was created, then this returns C<NULL>."
1771 #: ../src/guestfs.pod:844
1773 "The lifetime of the returned string is until the next error occurs, or L</"
1774 "guestfs_close> is called."
1778 #: ../src/guestfs.pod:847
1780 "The error string is not localized (ie. is always in English), because this "
1781 "makes searching for error messages in search engines give the largest number "
1786 #: ../src/guestfs.pod:851
1787 msgid "guestfs_set_error_handler"
1791 #: ../src/guestfs.pod:853
1794 " typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
1796 " const char *msg);\n"
1797 " void guestfs_set_error_handler (guestfs_h *g,\n"
1798 " guestfs_error_handler_cb cb,\n"
1804 #: ../src/guestfs.pod:860
1806 "The callback C<cb> will be called if there is an error. The parameters "
1807 "passed to the callback are an opaque data pointer and the error message "
1812 #: ../src/guestfs.pod:864
1814 "Note that the message string C<msg> is freed as soon as the callback "
1815 "function returns, so if you want to stash it somewhere you must make your "
1820 #: ../src/guestfs.pod:868
1821 msgid "The default handler prints messages on C<stderr>."
1825 #: ../src/guestfs.pod:870
1826 msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
1830 #: ../src/guestfs.pod:872
1831 msgid "guestfs_get_error_handler"
1835 #: ../src/guestfs.pod:874
1838 " guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
1839 " void **opaque_rtn);\n"
1844 #: ../src/guestfs.pod:877
1845 msgid "Returns the current error handler callback."
1849 #: ../src/guestfs.pod:879
1850 msgid "guestfs_set_out_of_memory_handler"
1854 #: ../src/guestfs.pod:881
1857 " typedef void (*guestfs_abort_cb) (void);\n"
1858 " int guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
1859 " guestfs_abort_cb);\n"
1864 #: ../src/guestfs.pod:885
1866 "The callback C<cb> will be called if there is an out of memory situation. "
1867 "I<Note this callback must not return>."
1871 #: ../src/guestfs.pod:888
1872 msgid "The default is to call L<abort(3)>."
1876 #: ../src/guestfs.pod:890
1878 "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
1882 #: ../src/guestfs.pod:893
1883 msgid "guestfs_get_out_of_memory_handler"
1887 #: ../src/guestfs.pod:895
1890 " guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
1895 #: ../src/guestfs.pod:897
1896 msgid "This returns the current out of memory handler."
1900 #: ../src/guestfs.pod:899
1905 #: ../src/guestfs.pod:901
1907 "Libguestfs needs a kernel and initrd.img, which it finds by looking along an "
1912 #: ../src/guestfs.pod:904
1914 "By default it looks for these in the directory C<$libdir/guestfs> (eg. C</"
1915 "usr/local/lib/guestfs> or C</usr/lib64/guestfs>)."
1919 #: ../src/guestfs.pod:907
1921 "Use L</guestfs_set_path> or set the environment variable L</LIBGUESTFS_PATH> "
1922 "to change the directories that libguestfs will search in. The value is a "
1923 "colon-separated list of paths. The current directory is I<not> searched "
1924 "unless the path contains an empty element or C<.>. For example "
1925 "C<LIBGUESTFS_PATH=:/usr/lib/guestfs> would search the current directory and "
1926 "then C</usr/lib/guestfs>."
1930 #: ../src/guestfs.pod:914
1931 msgid "HIGH-LEVEL API ACTIONS"
1935 #: ../src/guestfs.pod:916
1936 msgid "ABI GUARANTEE"
1940 #: ../src/guestfs.pod:918
1942 "We guarantee the libguestfs ABI (binary interface), for public, high-level "
1943 "actions as outlined in this section. Although we will deprecate some "
1944 "actions, for example if they get replaced by newer calls, we will keep the "
1945 "old actions forever. This allows you the developer to program in confidence "
1946 "against the libguestfs API."
1950 #: ../src/guestfs.pod:924 ../fish/guestfish.pod:898
1955 #: ../src/guestfs.pod:926
1960 #: ../src/guestfs.pod:928
1965 #: ../src/guestfs.pod:930
1966 msgid "AVAILABILITY"
1970 #: ../src/guestfs.pod:932
1971 msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
1975 #: ../src/guestfs.pod:934
1977 "Using L</guestfs_available> you can test availability of the following "
1978 "groups of functions. This test queries the appliance to see if the "
1979 "appliance you are currently using supports the functionality."
1983 #: ../src/guestfs.pod:939
1984 msgid "@AVAILABILITY@"
1988 #: ../src/guestfs.pod:941
1989 msgid "GUESTFISH supported COMMAND"
1993 #: ../src/guestfs.pod:943
1995 "In L<guestfish(3)> there is a handy interactive command C<supported> which "
1996 "prints out the available groups and whether they are supported by this build "
1997 "of libguestfs. Note however that you have to do C<run> first."
2001 #: ../src/guestfs.pod:948
2002 msgid "SINGLE CALLS AT COMPILE TIME"
2006 #: ../src/guestfs.pod:950
2008 "Since version 1.5.8, C<E<lt>guestfs.hE<gt>> defines symbols for each C API "
2009 "function, such as:"
2013 #: ../src/guestfs.pod:953
2016 " #define LIBGUESTFS_HAVE_DD 1\n"
2021 #: ../src/guestfs.pod:955
2022 msgid "if L</guestfs_dd> is available."
2026 #: ../src/guestfs.pod:957
2028 "Before version 1.5.8, if you needed to test whether a single libguestfs "
2029 "function is available at compile time, we recommended using build tools such "
2030 "as autoconf or cmake. For example in autotools you could use:"
2034 #: ../src/guestfs.pod:962
2037 " AC_CHECK_LIB([guestfs],[guestfs_create])\n"
2038 " AC_CHECK_FUNCS([guestfs_dd])\n"
2043 #: ../src/guestfs.pod:965
2045 "which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
2050 #: ../src/guestfs.pod:968
2051 msgid "SINGLE CALLS AT RUN TIME"
2055 #: ../src/guestfs.pod:970
2057 "Testing at compile time doesn't guarantee that a function really exists in "
2058 "the library. The reason is that you might be dynamically linked against a "
2059 "previous I<libguestfs.so> (dynamic library) which doesn't have the call. "
2060 "This situation unfortunately results in a segmentation fault, which is a "
2061 "shortcoming of the C dynamic linking system itself."
2065 #: ../src/guestfs.pod:977
2067 "You can use L<dlopen(3)> to test if a function is available at run time, as "
2068 "in this example program (note that you still need the compile time check as "
2073 #: ../src/guestfs.pod:981
2076 " #include <stdio.h>\n"
2077 " #include <stdlib.h>\n"
2078 " #include <unistd.h>\n"
2079 " #include <dlfcn.h>\n"
2080 " #include <guestfs.h>\n"
2085 #: ../src/guestfs.pod:987
2090 " #ifdef LIBGUESTFS_HAVE_DD\n"
2092 " int has_function;\n"
2097 #: ../src/guestfs.pod:993
2100 " /* Test if the function guestfs_dd is really available. */\n"
2101 " dl = dlopen (NULL, RTLD_LAZY);\n"
2103 " fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
2104 " exit (EXIT_FAILURE);\n"
2106 " has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
2112 #: ../src/guestfs.pod:1002
2115 " if (!has_function)\n"
2116 " printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
2118 " printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
2119 " /* Now it's safe to call\n"
2120 " guestfs_dd (g, \"foo\", \"bar\");\n"
2124 " printf (\"guestfs_dd function was not found at compile time\\n\");\n"
2131 #: ../src/guestfs.pod:1015
2133 "You may think the above is an awful lot of hassle, and it is. There are "
2134 "other ways outside of the C linking system to ensure that this kind of "
2135 "incompatibility never arises, such as using package versioning:"
2139 #: ../src/guestfs.pod:1020
2142 " Requires: libguestfs >= 1.0.80\n"
2147 #: ../src/guestfs.pod:1022 ../src/guestfs.pod:1027
2152 #: ../src/guestfs.pod:1024
2154 "<!-- old anchor for the next section --> <a name="
2155 "\"state_machine_and_low_level_event_api\"/>"
2159 #: ../src/guestfs.pod:1029
2160 msgid "ARCHITECTURE"
2164 #: ../src/guestfs.pod:1031
2166 "Internally, libguestfs is implemented by running an appliance (a special "
2167 "type of small virtual machine) using L<qemu(1)>. Qemu runs as a child "
2168 "process of the main program."
2172 #: ../src/guestfs.pod:1035
2175 " ___________________\n"
2177 " | main program |\n"
2179 " | | child process / appliance\n"
2180 " | | __________________________\n"
2182 " +-------------------+ RPC | +-----------------+ |\n"
2183 " | libguestfs <--------------------> guestfsd | |\n"
2184 " | | | +-----------------+ |\n"
2185 " \\___________________/ | | Linux kernel | |\n"
2186 " | +--^--------------+ |\n"
2187 " \\_________|________________/\n"
2193 " \\______________/\n"
2198 #: ../src/guestfs.pod:1055
2200 "The library, linked to the main program, creates the child process and hence "
2201 "the appliance in the L</guestfs_launch> function."
2205 #: ../src/guestfs.pod:1058
2207 "Inside the appliance is a Linux kernel and a complete stack of userspace "
2208 "tools (such as LVM and ext2 programs) and a small controlling daemon called "
2209 "L</guestfsd>. The library talks to L</guestfsd> using remote procedure "
2210 "calls (RPC). There is a mostly one-to-one correspondence between libguestfs "
2211 "API calls and RPC calls to the daemon. Lastly the disk image(s) are "
2212 "attached to the qemu process which translates device access by the "
2213 "appliance's Linux kernel into accesses to the image."
2217 #: ../src/guestfs.pod:1067
2219 "A common misunderstanding is that the appliance \"is\" the virtual machine. "
2220 "Although the disk image you are attached to might also be used by some "
2221 "virtual machine, libguestfs doesn't know or care about this. (But you will "
2222 "care if both libguestfs's qemu process and your virtual machine are trying "
2223 "to update the disk image at the same time, since these usually results in "
2224 "massive disk corruption)."
2228 #: ../src/guestfs.pod:1074
2229 msgid "STATE MACHINE"
2233 #: ../src/guestfs.pod:1076
2234 msgid "libguestfs uses a state machine to model the child process:"
2238 #: ../src/guestfs.pod:1078
2250 " / | \\ \\ guestfs_launch\n"
2251 " / | _\\__V______\n"
2253 " / | | LAUNCHING |\n"
2254 " / | \\___________/\n"
2256 " / | guestfs_launch\n"
2258 " ______ / __|____V\n"
2259 " / \\ ------> / \\\n"
2260 " | BUSY | | READY |\n"
2261 " \\______/ <------ \\________/\n"
2266 #: ../src/guestfs.pod:1100
2268 "The normal transitions are (1) CONFIG (when the handle is created, but there "
2269 "is no child process), (2) LAUNCHING (when the child process is booting up), "
2270 "(3) alternating between READY and BUSY as commands are issued to, and "
2271 "carried out by, the child process."
2275 #: ../src/guestfs.pod:1105
2277 "The guest may be killed by L</guestfs_kill_subprocess>, or may die "
2278 "asynchronously at any time (eg. due to some internal error), and that causes "
2279 "the state to transition back to CONFIG."
2283 #: ../src/guestfs.pod:1109
2285 "Configuration commands for qemu such as L</guestfs_add_drive> can only be "
2286 "issued when in the CONFIG state."
2290 #: ../src/guestfs.pod:1112
2292 "The high-level API offers two calls that go from CONFIG through LAUNCHING to "
2293 "READY. L</guestfs_launch> blocks until the child process is READY to accept "
2294 "commands (or until some failure or timeout). L</guestfs_launch> internally "
2295 "moves the state from CONFIG to LAUNCHING while it is running."
2299 #: ../src/guestfs.pod:1118
2301 "High-level API actions such as L</guestfs_mount> can only be issued when in "
2302 "the READY state. These high-level API calls block waiting for the command "
2303 "to be carried out (ie. the state to transition to BUSY and then back to "
2304 "READY). But using the low-level event API, you get non-blocking versions. "
2305 "(But you can still only carry out one operation per handle at a time - that "
2306 "is a limitation of the communications protocol we use)."
2310 #: ../src/guestfs.pod:1126
2312 "Finally, the child process sends asynchronous messages back to the main "
2313 "program, such as kernel log messages. Mostly these are ignored by the high-"
2314 "level API, but using the low-level event API you can register to receive "
2319 #: ../src/guestfs.pod:1131
2320 msgid "SETTING CALLBACKS TO HANDLE EVENTS"
2324 #: ../src/guestfs.pod:1133
2326 "The child process generates events in some situations. Current events "
2327 "include: receiving a log message, the child process exits."
2331 #: ../src/guestfs.pod:1136
2333 "Use the C<guestfs_set_*_callback> functions to set a callback for different "
2338 #: ../src/guestfs.pod:1139
2340 "Only I<one callback of each type> can be registered for each handle. "
2341 "Calling C<guestfs_set_*_callback> again overwrites the previous callback of "
2342 "that type. Cancel all callbacks of this type by calling this function with "
2343 "C<cb> set to C<NULL>."
2347 #: ../src/guestfs.pod:1144
2348 msgid "guestfs_set_log_message_callback"
2352 #: ../src/guestfs.pod:1146
2355 " typedef void (*guestfs_log_message_cb) (guestfs_h *g, void *opaque,\n"
2356 " char *buf, int len);\n"
2357 " void guestfs_set_log_message_callback (guestfs_h *g,\n"
2358 " guestfs_log_message_cb cb,\n"
2364 #: ../src/guestfs.pod:1152
2366 "The callback function C<cb> will be called whenever qemu or the guest writes "
2367 "anything to the console."
2371 #: ../src/guestfs.pod:1155
2372 msgid "Use this function to capture kernel messages and similar."
2376 #: ../src/guestfs.pod:1157
2378 "Normally there is no log message handler, and log messages are just "
2383 #: ../src/guestfs.pod:1160
2384 msgid "guestfs_set_subprocess_quit_callback"
2388 #: ../src/guestfs.pod:1162
2391 " typedef void (*guestfs_subprocess_quit_cb) (guestfs_h *g, void *opaque);\n"
2392 " void guestfs_set_subprocess_quit_callback (guestfs_h *g,\n"
2393 " guestfs_subprocess_quit_cb cb,\n"
2399 #: ../src/guestfs.pod:1167
2401 "The callback function C<cb> will be called when the child process quits, "
2402 "either asynchronously or if killed by L</guestfs_kill_subprocess>. (This "
2403 "corresponds to a transition from any state to the CONFIG state)."
2407 #: ../src/guestfs.pod:1172
2408 msgid "guestfs_set_launch_done_callback"
2412 #: ../src/guestfs.pod:1174
2415 " typedef void (*guestfs_launch_done_cb) (guestfs_h *g, void *opaque);\n"
2416 " void guestfs_set_launch_done_callback (guestfs_h *g,\n"
2417 " guestfs_launch_done_cb cb,\n"
2423 #: ../src/guestfs.pod:1179
2425 "The callback function C<cb> will be called when the child process becomes "
2426 "ready first time after it has been launched. (This corresponds to a "
2427 "transition from LAUNCHING to the READY state)."
2431 #: ../src/guestfs.pod:1183
2432 msgid "guestfs_set_close_callback"
2436 #: ../src/guestfs.pod:1185
2439 " typedef void (*guestfs_close_cb) (guestfs_h *g, void *opaque);\n"
2440 " void guestfs_set_close_callback (guestfs_h *g,\n"
2441 " guestfs_close_cb cb,\n"
2447 #: ../src/guestfs.pod:1190
2449 "The callback function C<cb> will be called while the handle is being closed "
2450 "(synchronously from L</guestfs_close>)."
2454 #: ../src/guestfs.pod:1193
2456 "Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
2457 "handles that are open when the program exits. This means that this callback "
2458 "might be called indirectly from L<exit(3)>, which can cause unexpected "
2459 "problems in higher-level languages (eg. if your HLL interpreter has already "
2460 "been cleaned up by the time this is called, and if your callback then jumps "
2461 "into some HLL function)."
2465 #: ../src/guestfs.pod:1201
2466 msgid "guestfs_set_progress_callback"
2470 #: ../src/guestfs.pod:1203
2473 " typedef void (*guestfs_progress_cb) (guestfs_h *g, void *opaque,\n"
2474 " int proc_nr, int serial,\n"
2475 " uint64_t position, uint64_t total);\n"
2476 " void guestfs_set_progress_callback (guestfs_h *g,\n"
2477 " guestfs_progress_cb cb,\n"
2483 #: ../src/guestfs.pod:1210
2485 "Some long-running operations can generate progress messages. If this "
2486 "callback is registered, then it will be called each time a progress message "
2487 "is generated (usually two seconds after the operation started, and three "
2488 "times per second thereafter until it completes, although the frequency may "
2489 "change in future versions)."
2493 #: ../src/guestfs.pod:1216
2495 "The callback receives two numbers: C<position> and C<total>. The units of "
2496 "C<total> are not defined, although for some operations C<total> may relate "
2497 "in some way to the amount of data to be transferred (eg. in bytes or "
2498 "megabytes), and C<position> may be the portion which has been transferred."
2502 #: ../src/guestfs.pod:1222
2503 msgid "The only defined and stable parts of the API are:"
2507 #: ../src/guestfs.pod:1228
2509 "The callback can display to the user some type of progress bar or indicator "
2510 "which shows the ratio of C<position>:C<total>."
2514 #: ../src/guestfs.pod:1233
2515 msgid "0 E<lt>= C<position> E<lt>= C<total>"
2519 #: ../src/guestfs.pod:1237
2521 "If any progress notification is sent during a call, then a final progress "
2522 "notification is always sent when C<position> = C<total>."
2526 #: ../src/guestfs.pod:1240
2528 "This is to simplify caller code, so callers can easily set the progress "
2529 "indicator to \"100%\" at the end of the operation, without requiring special "
2530 "code to detect this case."
2534 #: ../src/guestfs.pod:1246
2536 "The callback also receives the procedure number and serial number of the "
2537 "call. These are only useful for debugging protocol issues, and the callback "
2538 "can normally ignore them. The callback may want to print these numbers in "
2539 "error messages or debugging messages."
2543 #: ../src/guestfs.pod:1251
2544 msgid "PRIVATE DATA AREA"
2548 #: ../src/guestfs.pod:1253
2550 "You can attach named pieces of private data to the libguestfs handle, and "
2551 "fetch them by name for the lifetime of the handle. This is called the "
2552 "private data area and is only available from the C API."
2556 #: ../src/guestfs.pod:1257
2557 msgid "To attach a named piece of data, use the following call:"
2561 #: ../src/guestfs.pod:1259
2564 " void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
2569 #: ../src/guestfs.pod:1261
2571 "C<key> is the name to associate with this data, and C<data> is an arbitrary "
2572 "pointer (which can be C<NULL>). Any previous item with the same name is "
2577 #: ../src/guestfs.pod:1265
2579 "You can use any C<key> you want, but names beginning with an underscore "
2580 "character are reserved for internal libguestfs purposes (for implementing "
2581 "language bindings). It is recommended to prefix the name with some unique "
2582 "string to avoid collisions with other users."
2586 #: ../src/guestfs.pod:1270
2587 msgid "To retrieve the pointer, use:"
2591 #: ../src/guestfs.pod:1272
2594 " void *guestfs_get_private (guestfs_h *g, const char *key);\n"
2599 #: ../src/guestfs.pod:1274
2601 "This function returns C<NULL> if either no data is found associated with "
2602 "C<key>, or if the user previously set the C<key>'s C<data> pointer to "
2607 #: ../src/guestfs.pod:1278
2609 "Libguestfs does not try to look at or interpret the C<data> pointer in any "
2610 "way. As far as libguestfs is concerned, it need not be a valid pointer at "
2611 "all. In particular, libguestfs does I<not> try to free the data when the "
2612 "handle is closed. If the data must be freed, then the caller must either "
2613 "free it before calling L</guestfs_close> or must set up a close callback to "
2614 "do it (see L</guestfs_set_close_callback>, and note that only one callback "
2615 "can be registered for a handle)."
2619 #: ../src/guestfs.pod:1286
2621 "The private data area is implemented using a hash table, and should be "
2622 "reasonably efficient for moderate numbers of keys."
2626 #: ../src/guestfs.pod:1289
2627 msgid "BLOCK DEVICE NAMING"
2631 #: ../src/guestfs.pod:1291
2633 "In the kernel there is now quite a profusion of schemata for naming block "
2634 "devices (in this context, by I<block device> I mean a physical or virtual "
2635 "hard drive). The original Linux IDE driver used names starting with C</dev/"
2636 "hd*>. SCSI devices have historically used a different naming scheme, C</dev/"
2637 "sd*>. When the Linux kernel I<libata> driver became a popular replacement "
2638 "for the old IDE driver (particularly for SATA devices) those devices also "
2639 "used the C</dev/sd*> scheme. Additionally we now have virtual machines with "
2640 "paravirtualized drivers. This has created several different naming systems, "
2641 "such as C</dev/vd*> for virtio disks and C</dev/xvd*> for Xen PV disks."
2645 #: ../src/guestfs.pod:1303
2647 "As discussed above, libguestfs uses a qemu appliance running an embedded "
2648 "Linux kernel to access block devices. We can run a variety of appliances "
2649 "based on a variety of Linux kernels."
2653 #: ../src/guestfs.pod:1307
2655 "This causes a problem for libguestfs because many API calls use device or "
2656 "partition names. Working scripts and the recipe (example) scripts that we "
2657 "make available over the internet could fail if the naming scheme changes."
2661 #: ../src/guestfs.pod:1312
2663 "Therefore libguestfs defines C</dev/sd*> as the I<standard naming scheme>. "
2664 "Internally C</dev/sd*> names are translated, if necessary, to other names as "
2665 "required. For example, under RHEL 5 which uses the C</dev/hd*> scheme, any "
2666 "device parameter C</dev/sda2> is translated to C</dev/hda2> transparently."
2670 #: ../src/guestfs.pod:1318
2672 "Note that this I<only> applies to parameters. The L</guestfs_list_devices>, "
2673 "L</guestfs_list_partitions> and similar calls return the true names of the "
2674 "devices and partitions as known to the appliance."
2678 #: ../src/guestfs.pod:1323
2679 msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION"
2683 #: ../src/guestfs.pod:1325
2685 "Usually this translation is transparent. However in some (very rare) cases "
2686 "you may need to know the exact algorithm. Such cases include where you use "
2687 "L</guestfs_config> to add a mixture of virtio and IDE devices to the qemu-"
2688 "based appliance, so have a mixture of C</dev/sd*> and C</dev/vd*> devices."
2692 #: ../src/guestfs.pod:1331
2694 "The algorithm is applied only to I<parameters> which are known to be either "
2695 "device or partition names. Return values from functions such as L</"
2696 "guestfs_list_devices> are never changed."
2700 #: ../src/guestfs.pod:1339
2701 msgid "Is the string a parameter which is a device or partition name?"
2705 #: ../src/guestfs.pod:1343
2706 msgid "Does the string begin with C</dev/sd>?"
2710 #: ../src/guestfs.pod:1347
2712 "Does the named device exist? If so, we use that device. However if I<not> "
2713 "then we continue with this algorithm."
2717 #: ../src/guestfs.pod:1352
2718 msgid "Replace initial C</dev/sd> string with C</dev/hd>."
2722 #: ../src/guestfs.pod:1354
2723 msgid "For example, change C</dev/sda2> to C</dev/hda2>."
2727 #: ../src/guestfs.pod:1356
2728 msgid "If that named device exists, use it. If not, continue."
2732 #: ../src/guestfs.pod:1360
2733 msgid "Replace initial C</dev/sd> string with C</dev/vd>."
2737 #: ../src/guestfs.pod:1362
2738 msgid "If that named device exists, use it. If not, return an error."
2742 #: ../src/guestfs.pod:1366
2743 msgid "PORTABILITY CONCERNS"
2747 #: ../src/guestfs.pod:1368
2749 "Although the standard naming scheme and automatic translation is useful for "
2750 "simple programs and guestfish scripts, for larger programs it is best not to "
2751 "rely on this mechanism."
2755 #: ../src/guestfs.pod:1372
2757 "Where possible for maximum future portability programs using libguestfs "
2758 "should use these future-proof techniques:"
2762 #: ../src/guestfs.pod:1379
2764 "Use L</guestfs_list_devices> or L</guestfs_list_partitions> to list actual "
2765 "device names, and then use those names directly."
2769 #: ../src/guestfs.pod:1382
2771 "Since those device names exist by definition, they will never be translated."
2775 #: ../src/guestfs.pod:1387
2777 "Use higher level ways to identify filesystems, such as LVM names, UUIDs and "
2778 "filesystem labels."
2782 #: ../src/guestfs.pod:1392
2787 #: ../src/guestfs.pod:1394
2788 msgid "COMMUNICATION PROTOCOL"
2792 #: ../src/guestfs.pod:1396
2794 "Don't rely on using this protocol directly. This section documents how it "
2795 "currently works, but it may change at any time."
2799 #: ../src/guestfs.pod:1399
2801 "The protocol used to talk between the library and the daemon running inside "
2802 "the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
2803 "1014, RFC 1832, RFC 4506)."
2807 #: ../src/guestfs.pod:1403
2809 "The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
2810 "this file is automatically generated)."
2814 #: ../src/guestfs.pod:1406
2816 "There are two broad cases, ordinary functions that don't have any C<FileIn> "
2817 "and C<FileOut> parameters, which are handled with very simple request/reply "
2818 "messages. Then there are functions that have any C<FileIn> or C<FileOut> "
2819 "parameters, which use the same request and reply messages, but they may also "
2820 "be followed by files sent using a chunked encoding."
2824 #: ../src/guestfs.pod:1413
2825 msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
2829 #: ../src/guestfs.pod:1415
2830 msgid "For ordinary functions, the request message is:"
2834 #: ../src/guestfs.pod:1417
2837 " total length (header + arguments,\n"
2838 " but not including the length word itself)\n"
2839 " struct guestfs_message_header (encoded as XDR)\n"
2840 " struct guestfs_<foo>_args (encoded as XDR)\n"
2845 #: ../src/guestfs.pod:1422
2847 "The total length field allows the daemon to allocate a fixed size buffer "
2848 "into which it slurps the rest of the message. As a result, the total length "
2849 "is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the "
2850 "effective size of any request is limited to somewhere under this size."
2854 #: ../src/guestfs.pod:1428
2856 "Note also that many functions don't take any arguments, in which case the "
2857 "C<guestfs_I<foo>_args> is completely omitted."
2861 #: ../src/guestfs.pod:1431
2863 "The header contains the procedure number (C<guestfs_proc>) which is how the "
2864 "receiver knows what type of args structure to expect, or none at all."
2868 #: ../src/guestfs.pod:1435
2869 msgid "The reply message for ordinary functions is:"
2873 #: ../src/guestfs.pod:1437
2876 " total length (header + ret,\n"
2877 " but not including the length word itself)\n"
2878 " struct guestfs_message_header (encoded as XDR)\n"
2879 " struct guestfs_<foo>_ret (encoded as XDR)\n"
2884 #: ../src/guestfs.pod:1442
2886 "As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
2887 "functions that return no formal return values."
2891 #: ../src/guestfs.pod:1445
2893 "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
2897 #: ../src/guestfs.pod:1448
2899 "In the case of an error, a flag is set in the header, and the reply message "
2900 "is slightly changed:"
2904 #: ../src/guestfs.pod:1451
2907 " total length (header + error,\n"
2908 " but not including the length word itself)\n"
2909 " struct guestfs_message_header (encoded as XDR)\n"
2910 " struct guestfs_message_error (encoded as XDR)\n"
2915 #: ../src/guestfs.pod:1456
2917 "The C<guestfs_message_error> structure contains the error message as a "
2922 #: ../src/guestfs.pod:1459
2923 msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
2927 #: ../src/guestfs.pod:1461
2929 "A C<FileIn> parameter indicates that we transfer a file I<into> the guest. "
2930 "The normal request message is sent (see above). However this is followed by "
2931 "a sequence of file chunks."
2935 #: ../src/guestfs.pod:1465
2938 " total length (header + arguments,\n"
2939 " but not including the length word itself,\n"
2940 " and not including the chunks)\n"
2941 " struct guestfs_message_header (encoded as XDR)\n"
2942 " struct guestfs_<foo>_args (encoded as XDR)\n"
2943 " sequence of chunks for FileIn param #0\n"
2944 " sequence of chunks for FileIn param #1 etc.\n"
2949 #: ../src/guestfs.pod:1473
2950 msgid "The \"sequence of chunks\" is:"
2954 #: ../src/guestfs.pod:1475
2957 " length of chunk (not including length word itself)\n"
2958 " struct guestfs_chunk (encoded as XDR)\n"
2959 " length of chunk\n"
2960 " struct guestfs_chunk (encoded as XDR)\n"
2962 " length of chunk\n"
2963 " struct guestfs_chunk (with data.data_len == 0)\n"
2968 #: ../src/guestfs.pod:1483
2970 "The final chunk has the C<data_len> field set to zero. Additionally a flag "
2971 "is set in the final chunk to indicate either successful completion or early "
2976 #: ../src/guestfs.pod:1487
2978 "At time of writing there are no functions that have more than one FileIn "
2979 "parameter. However this is (theoretically) supported, by sending the "
2980 "sequence of chunks for each FileIn parameter one after another (from left to "
2985 #: ../src/guestfs.pod:1492
2987 "Both the library (sender) I<and> the daemon (receiver) may cancel the "
2988 "transfer. The library does this by sending a chunk with a special flag set "
2989 "to indicate cancellation. When the daemon sees this, it cancels the whole "
2990 "RPC, does I<not> send any reply, and goes back to reading the next request."
2994 #: ../src/guestfs.pod:1498
2996 "The daemon may also cancel. It does this by writing a special word "
2997 "C<GUESTFS_CANCEL_FLAG> to the socket. The library listens for this during "
2998 "the transfer, and if it gets it, it will cancel the transfer (it sends a "
2999 "cancel chunk). The special word is chosen so that even if cancellation "
3000 "happens right at the end of the transfer (after the library has finished "
3001 "writing and has started listening for the reply), the \"spurious\" cancel "
3002 "flag will not be confused with the reply message."
3006 #: ../src/guestfs.pod:1507
3008 "This protocol allows the transfer of arbitrary sized files (no 32 bit "
3009 "limit), and also files where the size is not known in advance (eg. from "
3010 "pipes or sockets). However the chunks are rather small "
3011 "(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need "
3012 "to keep much in memory."
3016 #: ../src/guestfs.pod:1513
3017 msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
3021 #: ../src/guestfs.pod:1515
3023 "The protocol for FileOut parameters is exactly the same as for FileIn "
3024 "parameters, but with the roles of daemon and library reversed."
3028 #: ../src/guestfs.pod:1518
3031 " total length (header + ret,\n"
3032 " but not including the length word itself,\n"
3033 " and not including the chunks)\n"
3034 " struct guestfs_message_header (encoded as XDR)\n"
3035 " struct guestfs_<foo>_ret (encoded as XDR)\n"
3036 " sequence of chunks for FileOut param #0\n"
3037 " sequence of chunks for FileOut param #1 etc.\n"
3042 #: ../src/guestfs.pod:1526
3043 msgid "INITIAL MESSAGE"
3047 #: ../src/guestfs.pod:1528
3049 "Because the underlying channel (QEmu -net channel) doesn't have any sort of "
3050 "connection control, when the daemon launches it sends an initial word "
3051 "(C<GUESTFS_LAUNCH_FLAG>) which indicates that the guest and daemon is "
3052 "alive. This is what L</guestfs_launch> waits for."
3056 #: ../src/guestfs.pod:1533
3057 msgid "MULTIPLE HANDLES AND MULTIPLE THREADS"
3061 #: ../src/guestfs.pod:1535
3063 "All high-level libguestfs actions are synchronous. If you want to use "
3064 "libguestfs asynchronously then you must create a thread."
3068 #: ../src/guestfs.pod:1538
3070 "Only use the handle from a single thread. Either use the handle exclusively "
3071 "from one thread, or provide your own mutex so that two threads cannot issue "
3072 "calls on the same handle at the same time."
3076 #: ../src/guestfs.pod:1542
3077 msgid "QEMU WRAPPERS"
3081 #: ../src/guestfs.pod:1544
3083 "If you want to compile your own qemu, run qemu from a non-standard location, "
3084 "or pass extra arguments to qemu, then you can write a shell-script wrapper "
3089 #: ../src/guestfs.pod:1548
3091 "There is one important rule to remember: you I<must C<exec qemu>> as the "
3092 "last command in the shell script (so that qemu replaces the shell and "
3093 "becomes the direct child of the libguestfs-using program). If you don't do "
3094 "this, then the qemu process won't be cleaned up correctly."
3098 #: ../src/guestfs.pod:1553
3100 "Here is an example of a wrapper, where I have built my own copy of qemu from "
3105 #: ../src/guestfs.pod:1556
3109 " qemudir=/home/rjones/d/qemu\n"
3110 " exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios \"$@\"\n"
3115 #: ../src/guestfs.pod:1560
3117 "Save this script as C</tmp/qemu.wrapper> (or wherever), C<chmod +x>, and "
3118 "then use it by setting the LIBGUESTFS_QEMU environment variable. For "
3123 #: ../src/guestfs.pod:1564
3126 " LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n"
3131 #: ../src/guestfs.pod:1566
3133 "Note that libguestfs also calls qemu with the -help and -version options in "
3134 "order to determine features."
3138 #: ../src/guestfs.pod:1569
3139 msgid "LIBGUESTFS VERSION NUMBERS"
3143 #: ../src/guestfs.pod:1571
3145 "Since April 2010, libguestfs has started to make separate development and "
3146 "stable releases, along with corresponding branches in our git repository. "
3147 "These separate releases can be identified by version number:"
3151 #: ../src/guestfs.pod:1576
3154 " even numbers for stable: 1.2.x, 1.4.x, ...\n"
3155 " .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
3161 " | `-------- sub-version\n"
3163 " `------ always '1' because we don't change the ABI\n"
3168 #: ../src/guestfs.pod:1587
3169 msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
3173 #: ../src/guestfs.pod:1589
3175 "As time passes we cherry pick fixes from the development branch and backport "
3176 "those into the stable branch, the effect being that the stable branch should "
3177 "get more stable and less buggy over time. So the stable releases are ideal "
3178 "for people who don't need new features but would just like the software to "
3183 #: ../src/guestfs.pod:1595
3184 msgid "Our criteria for backporting changes are:"
3188 #: ../src/guestfs.pod:1601
3190 "Documentation changes which don't affect any code are backported unless the "
3191 "documentation refers to a future feature which is not in stable."
3195 #: ../src/guestfs.pod:1607
3197 "Bug fixes which are not controversial, fix obvious problems, and have been "
3198 "well tested are backported."
3202 #: ../src/guestfs.pod:1612
3204 "Simple rearrangements of code which shouldn't affect how it works get "
3205 "backported. This is so that the code in the two branches doesn't get too "
3206 "far out of step, allowing us to backport future fixes more easily."
3210 #: ../src/guestfs.pod:1618
3212 "We I<don't> backport new features, new APIs, new tools etc, except in one "
3213 "exceptional case: the new feature is required in order to implement an "
3214 "important bug fix."
3218 #: ../src/guestfs.pod:1624
3220 "A new stable branch starts when we think the new features in development are "
3221 "substantial and compelling enough over the current stable branch to warrant "
3222 "it. When that happens we create new stable and development versions 1.N.0 "
3223 "and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so "
3224 "stable at this point, but by backporting fixes from development, that branch "
3225 "will stabilize over time."
3229 #: ../src/guestfs.pod:1632 ../fish/guestfish.pod:905
3230 #: ../test-tool/libguestfs-test-tool.pod:104 ../tools/virt-edit.pl:312
3231 #: ../tools/virt-rescue.pl:226
3232 msgid "ENVIRONMENT VARIABLES"
3236 #: ../src/guestfs.pod:1636 ../fish/guestfish.pod:925
3237 msgid "LIBGUESTFS_APPEND"
3241 #: ../src/guestfs.pod:1638 ../fish/guestfish.pod:927
3242 msgid "Pass additional options to the guest kernel."
3246 #: ../src/guestfs.pod:1640 ../fish/guestfish.pod:929
3247 msgid "LIBGUESTFS_DEBUG"
3251 #: ../src/guestfs.pod:1642
3253 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
3254 "effect as calling C<guestfs_set_verbose (g, 1)>."
3258 #: ../src/guestfs.pod:1645 ../fish/guestfish.pod:934
3259 msgid "LIBGUESTFS_MEMSIZE"
3263 #: ../src/guestfs.pod:1647 ../fish/guestfish.pod:936
3265 "Set the memory allocated to the qemu process, in megabytes. For example:"
3269 #: ../src/guestfs.pod:1650 ../fish/guestfish.pod:939
3272 " LIBGUESTFS_MEMSIZE=700\n"
3277 #: ../src/guestfs.pod:1652 ../fish/guestfish.pod:941
3278 msgid "LIBGUESTFS_PATH"
3282 #: ../src/guestfs.pod:1654
3284 "Set the path that libguestfs uses to search for kernel and initrd.img. See "
3285 "the discussion of paths in section PATH above."
3289 #: ../src/guestfs.pod:1657 ../fish/guestfish.pod:946
3290 msgid "LIBGUESTFS_QEMU"
3294 #: ../src/guestfs.pod:1659 ../fish/guestfish.pod:948
3296 "Set the default qemu binary that libguestfs uses. If not set, then the qemu "
3297 "which was found at compile time by the configure script is used."
3301 #: ../src/guestfs.pod:1663
3302 msgid "See also L</QEMU WRAPPERS> above."
3306 #: ../src/guestfs.pod:1665 ../fish/guestfish.pod:952
3307 msgid "LIBGUESTFS_TRACE"
3311 #: ../src/guestfs.pod:1667
3313 "Set C<LIBGUESTFS_TRACE=1> to enable command traces. This has the same "
3314 "effect as calling C<guestfs_set_trace (g, 1)>."
3318 #: ../src/guestfs.pod:1670 ../fish/guestfish.pod:961
3323 #: ../src/guestfs.pod:1672 ../fish/guestfish.pod:963
3324 msgid "Location of temporary directory, defaults to C</tmp>."
3328 #: ../src/guestfs.pod:1674 ../fish/guestfish.pod:965
3330 "If libguestfs was compiled to use the supermin appliance then each handle "
3331 "will require rather a large amount of space in this directory for short "
3332 "periods of time (~ 80 MB). You can use C<$TMPDIR> to configure another "
3333 "directory to use in case C</tmp> is not large enough."
3337 #: ../src/guestfs.pod:1682 ../fish/guestfish.pod:1023
3338 #: ../test-tool/libguestfs-test-tool.pod:109 ../fuse/guestmount.pod:178
3339 #: ../inspector/virt-inspector.pl:846 ../tools/virt-cat.pl:163
3340 #: ../tools/virt-df.pl:482 ../tools/virt-edit.pl:325
3341 #: ../tools/virt-list-filesystems.pl:191 ../tools/virt-list-partitions.pl:229
3342 #: ../tools/virt-ls.pl:210 ../tools/virt-make-fs.pl:527
3343 #: ../tools/virt-rescue.pl:231 ../tools/virt-resize.pl:1390
3344 #: ../tools/virt-tar.pl:257 ../tools/virt-win-reg.pl:461
3349 #: ../src/guestfs.pod:1684
3351 "L<guestfish(1)>, L<guestmount(1)>, L<virt-cat(1)>, L<virt-df(1)>, L<virt-edit"
3352 "(1)>, L<virt-inspector(1)>, L<virt-list-filesystems(1)>, L<virt-list-"
3353 "partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-"
3354 "tar(1)>, L<virt-win-reg(1)>, L<qemu(1)>, L<febootstrap(1)>, L<hivex(3)>, "
3355 "L<http://libguestfs.org/>."
3359 #: ../src/guestfs.pod:1702
3361 "Tools with a similar purpose: L<fdisk(8)>, L<parted(8)>, L<kpartx(8)>, L<lvm"
3362 "(8)>, L<disktype(1)>."
3366 #: ../src/guestfs.pod:1709 ../tools/virt-make-fs.pl:541
3367 #: ../tools/virt-win-reg.pl:476
3372 #: ../src/guestfs.pod:1711
3373 msgid "To get a list of bugs against libguestfs use this link:"
3377 #: ../src/guestfs.pod:1713
3379 "L<https://bugzilla.redhat.com/buglist.cgi?"
3380 "component=libguestfs&product=Virtualization+Tools>"
3384 #: ../src/guestfs.pod:1715
3385 msgid "To report a new bug against libguestfs use this link:"
3389 #: ../src/guestfs.pod:1717
3391 "L<https://bugzilla.redhat.com/enter_bug.cgi?"
3392 "component=libguestfs&product=Virtualization+Tools>"
3396 #: ../src/guestfs.pod:1719
3397 msgid "When reporting a bug, please check:"
3401 #: ../src/guestfs.pod:1725
3402 msgid "That the bug hasn't been reported already."
3406 #: ../src/guestfs.pod:1729
3407 msgid "That you are testing a recent version."
3411 #: ../src/guestfs.pod:1733
3412 msgid "Describe the bug accurately, and give a way to reproduce it."
3416 #: ../src/guestfs.pod:1737
3418 "Run libguestfs-test-tool and paste the B<complete, unedited> output into the "
3423 #: ../src/guestfs.pod:1742 ../fish/guestfish.pod:1039
3424 #: ../test-tool/libguestfs-test-tool.pod:115 ../fuse/guestmount.pod:189
3425 #: ../inspector/virt-inspector.pl:855
3430 #: ../src/guestfs.pod:1744 ../fish/guestfish.pod:1041
3431 #: ../test-tool/libguestfs-test-tool.pod:117 ../fuse/guestmount.pod:191
3432 msgid "Richard W.M. Jones (C<rjones at redhat dot com>)"
3436 #: ../src/guestfs.pod:1746 ../fish/guestfish.pod:1043
3437 #: ../test-tool/libguestfs-test-tool.pod:119 ../fuse/guestmount.pod:193
3438 #: ../inspector/virt-inspector.pl:861 ../tools/virt-cat.pl:177
3439 #: ../tools/virt-df.pl:495 ../tools/virt-edit.pl:341
3440 #: ../tools/virt-list-filesystems.pl:207 ../tools/virt-list-partitions.pl:244
3441 #: ../tools/virt-ls.pl:225 ../tools/virt-make-fs.pl:556
3442 #: ../tools/virt-rescue.pl:245 ../tools/virt-resize.pl:1411
3443 #: ../tools/virt-tar.pl:272 ../tools/virt-win-reg.pl:491
3448 #: ../src/guestfs.pod:1748 ../fish/guestfish.pod:1045
3449 msgid "Copyright (C) 2009-2010 Red Hat Inc. L<http://libguestfs.org/>"
3453 #: ../src/guestfs.pod:1751
3455 "This library is free software; you can redistribute it and/or modify it "
3456 "under the terms of the GNU Lesser General Public License as published by the "
3457 "Free Software Foundation; either version 2 of the License, or (at your "
3458 "option) any later version."
3462 #: ../src/guestfs.pod:1756
3464 "This library is distributed in the hope that it will be useful, but WITHOUT "
3465 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
3466 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License "
3471 #: ../src/guestfs.pod:1761
3473 "You should have received a copy of the GNU Lesser General Public License "
3474 "along with this library; if not, write to the Free Software Foundation, "
3475 "Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"
3479 #: ../src/guestfs-actions.pod:1
3480 msgid "guestfs_add_cdrom"
3484 #: ../src/guestfs-actions.pod:3
3487 " int guestfs_add_cdrom (guestfs_h *g,\n"
3488 "\t\tconst char *filename);\n"
3493 #: ../src/guestfs-actions.pod:6 ../fish/guestfish-actions.pod:5
3494 msgid "This function adds a virtual CD-ROM disk image to the guest."
3498 #: ../src/guestfs-actions.pod:8 ../fish/guestfish-actions.pod:7
3499 msgid "This is equivalent to the qemu parameter C<-cdrom filename>."
3503 #: ../src/guestfs-actions.pod:10 ../src/guestfs-actions.pod:1488
3504 #: ../fish/guestfish-actions.pod:9 ../fish/guestfish-actions.pod:1186
3509 #: ../src/guestfs-actions.pod:16
3511 "This call checks for the existence of C<filename>. This stops you from "
3512 "specifying other types of drive which are supported by qemu such as C<nbd:> "
3513 "and C<http:> URLs. To specify those, use the general C<guestfs_config> call "
3518 #: ../src/guestfs-actions.pod:23
3520 "If you just want to add an ISO file (often you use this as an efficient way "
3521 "to transfer large files into the guest), then you should probably use "
3522 "C<guestfs_add_drive_ro> instead."
3526 #: ../src/guestfs-actions.pod:29 ../src/guestfs-actions.pod:63
3527 #: ../src/guestfs-actions.pod:92 ../src/guestfs-actions.pod:103
3528 #: ../src/guestfs-actions.pod:114 ../src/guestfs-actions.pod:124
3529 #: ../src/guestfs-actions.pod:135 ../src/guestfs-actions.pod:238
3530 #: ../src/guestfs-actions.pod:255 ../src/guestfs-actions.pod:266
3531 #: ../src/guestfs-actions.pod:302 ../src/guestfs-actions.pod:324
3532 #: ../src/guestfs-actions.pod:339 ../src/guestfs-actions.pod:403
3533 #: ../src/guestfs-actions.pod:430 ../src/guestfs-actions.pod:441
3534 #: ../src/guestfs-actions.pod:453 ../src/guestfs-actions.pod:534
3535 #: ../src/guestfs-actions.pod:549 ../src/guestfs-actions.pod:560
3536 #: ../src/guestfs-actions.pod:571 ../src/guestfs-actions.pod:717
3537 #: ../src/guestfs-actions.pod:734 ../src/guestfs-actions.pod:749
3538 #: ../src/guestfs-actions.pod:824 ../src/guestfs-actions.pod:839
3539 #: ../src/guestfs-actions.pod:855 ../src/guestfs-actions.pod:866
3540 #: ../src/guestfs-actions.pod:883 ../src/guestfs-actions.pod:916
3541 #: ../src/guestfs-actions.pod:974 ../src/guestfs-actions.pod:996
3542 #: ../src/guestfs-actions.pod:1027 ../src/guestfs-actions.pod:1115
3543 #: ../src/guestfs-actions.pod:1146 ../src/guestfs-actions.pod:1346
3544 #: ../src/guestfs-actions.pod:1365 ../src/guestfs-actions.pod:1446
3545 #: ../src/guestfs-actions.pod:1794 ../src/guestfs-actions.pod:1917
3546 #: ../src/guestfs-actions.pod:1972 ../src/guestfs-actions.pod:2002
3547 #: ../src/guestfs-actions.pod:2349 ../src/guestfs-actions.pod:2361
3548 #: ../src/guestfs-actions.pod:2378 ../src/guestfs-actions.pod:2443
3549 #: ../src/guestfs-actions.pod:2454 ../src/guestfs-actions.pod:2464
3550 #: ../src/guestfs-actions.pod:2475 ../src/guestfs-actions.pod:2487
3551 #: ../src/guestfs-actions.pod:2517 ../src/guestfs-actions.pod:2581
3552 #: ../src/guestfs-actions.pod:2598 ../src/guestfs-actions.pod:2612
3553 #: ../src/guestfs-actions.pod:2632 ../src/guestfs-actions.pod:2652
3554 #: ../src/guestfs-actions.pod:2681 ../src/guestfs-actions.pod:2697
3555 #: ../src/guestfs-actions.pod:2713 ../src/guestfs-actions.pod:2725
3556 #: ../src/guestfs-actions.pod:2734 ../src/guestfs-actions.pod:2767
3557 #: ../src/guestfs-actions.pod:2780 ../src/guestfs-actions.pod:2790
3558 #: ../src/guestfs-actions.pod:2802 ../src/guestfs-actions.pod:2816
3559 #: ../src/guestfs-actions.pod:2896 ../src/guestfs-actions.pod:2913
3560 #: ../src/guestfs-actions.pod:2923 ../src/guestfs-actions.pod:2968
3561 #: ../src/guestfs-actions.pod:2983 ../src/guestfs-actions.pod:2998
3562 #: ../src/guestfs-actions.pod:3011 ../src/guestfs-actions.pod:3022
3563 #: ../src/guestfs-actions.pod:3033 ../src/guestfs-actions.pod:3047
3564 #: ../src/guestfs-actions.pod:3059 ../src/guestfs-actions.pod:3076
3565 #: ../src/guestfs-actions.pod:3107 ../src/guestfs-actions.pod:3135
3566 #: ../src/guestfs-actions.pod:3151 ../src/guestfs-actions.pod:3167
3567 #: ../src/guestfs-actions.pod:3176 ../src/guestfs-actions.pod:3190
3568 #: ../src/guestfs-actions.pod:3200 ../src/guestfs-actions.pod:3212
3569 #: ../src/guestfs-actions.pod:3224 ../src/guestfs-actions.pod:3256
3570 #: ../src/guestfs-actions.pod:3268 ../src/guestfs-actions.pod:3285
3571 #: ../src/guestfs-actions.pod:3296 ../src/guestfs-actions.pod:3310
3572 #: ../src/guestfs-actions.pod:3350 ../src/guestfs-actions.pod:3381
3573 #: ../src/guestfs-actions.pod:3392 ../src/guestfs-actions.pod:3417
3574 #: ../src/guestfs-actions.pod:3431 ../src/guestfs-actions.pod:3446
3575 #: ../src/guestfs-actions.pod:3568 ../src/guestfs-actions.pod:3620
3576 #: ../src/guestfs-actions.pod:3639 ../src/guestfs-actions.pod:3654
3577 #: ../src/guestfs-actions.pod:3665 ../src/guestfs-actions.pod:3699
3578 #: ../src/guestfs-actions.pod:3713 ../src/guestfs-actions.pod:3723
3579 #: ../src/guestfs-actions.pod:3734 ../src/guestfs-actions.pod:3966
3580 #: ../src/guestfs-actions.pod:3982 ../src/guestfs-actions.pod:3993
3581 #: ../src/guestfs-actions.pod:4002 ../src/guestfs-actions.pod:4013
3582 #: ../src/guestfs-actions.pod:4022 ../src/guestfs-actions.pod:4033
3583 #: ../src/guestfs-actions.pod:4046 ../src/guestfs-actions.pod:4064
3584 #: ../src/guestfs-actions.pod:4080 ../src/guestfs-actions.pod:4096
3585 #: ../src/guestfs-actions.pod:4111 ../src/guestfs-actions.pod:4131
3586 #: ../src/guestfs-actions.pod:4146 ../src/guestfs-actions.pod:4162
3587 #: ../src/guestfs-actions.pod:4180 ../src/guestfs-actions.pod:4196
3588 #: ../src/guestfs-actions.pod:4210 ../src/guestfs-actions.pod:4235
3589 #: ../src/guestfs-actions.pod:4256 ../src/guestfs-actions.pod:4272
3590 #: ../src/guestfs-actions.pod:4293 ../src/guestfs-actions.pod:4305
3591 #: ../src/guestfs-actions.pod:4317 ../src/guestfs-actions.pod:4333
3592 #: ../src/guestfs-actions.pod:4367 ../src/guestfs-actions.pod:4387
3593 #: ../src/guestfs-actions.pod:4410 ../src/guestfs-actions.pod:4500
3594 #: ../src/guestfs-actions.pod:4606 ../src/guestfs-actions.pod:4615
3595 #: ../src/guestfs-actions.pod:4625 ../src/guestfs-actions.pod:4635
3596 #: ../src/guestfs-actions.pod:4654 ../src/guestfs-actions.pod:4664
3597 #: ../src/guestfs-actions.pod:4674 ../src/guestfs-actions.pod:4684
3598 #: ../src/guestfs-actions.pod:4696 ../src/guestfs-actions.pod:4746
3599 #: ../src/guestfs-actions.pod:4760 ../src/guestfs-actions.pod:4773
3600 #: ../src/guestfs-actions.pod:4786 ../src/guestfs-actions.pod:4800
3601 #: ../src/guestfs-actions.pod:4810 ../src/guestfs-actions.pod:4827
3602 #: ../src/guestfs-actions.pod:4857 ../src/guestfs-actions.pod:4868
3603 #: ../src/guestfs-actions.pod:4903 ../src/guestfs-actions.pod:4913
3604 #: ../src/guestfs-actions.pod:4928 ../src/guestfs-actions.pod:4956
3605 #: ../src/guestfs-actions.pod:5060 ../src/guestfs-actions.pod:5075
3606 #: ../src/guestfs-actions.pod:5086 ../src/guestfs-actions.pod:5132
3607 #: ../src/guestfs-actions.pod:5142 ../src/guestfs-actions.pod:5179
3608 #: ../src/guestfs-actions.pod:5206 ../src/guestfs-actions.pod:5248
3609 #: ../src/guestfs-actions.pod:5271 ../src/guestfs-actions.pod:5328
3610 #: ../src/guestfs-actions.pod:5344 ../src/guestfs-actions.pod:5370
3611 msgid "This function returns 0 on success or -1 on error."
3615 #: ../src/guestfs-actions.pod:31
3616 msgid "guestfs_add_drive"
3620 #: ../src/guestfs-actions.pod:33
3623 " int guestfs_add_drive (guestfs_h *g,\n"
3624 "\t\tconst char *filename);\n"
3629 #: ../src/guestfs-actions.pod:36 ../fish/guestfish-actions.pod:32
3631 "This function adds a virtual machine disk image C<filename> to the guest. "
3632 "The first time you call this function, the disk appears as IDE disk 0 (C</"
3633 "dev/sda>) in the guest, the second time as C</dev/sdb>, and so on."
3637 #: ../src/guestfs-actions.pod:41 ../fish/guestfish-actions.pod:37
3639 "You don't necessarily need to be root when using libguestfs. However you "
3640 "obviously do need sufficient permissions to access the filename for whatever "
3641 "operations you want to perform (ie. read access if you just want to read the "
3642 "image or write access if you want to modify the image)."
3646 #: ../src/guestfs-actions.pod:47 ../fish/guestfish-actions.pod:43
3648 "This is equivalent to the qemu parameter C<-drive file=filename,cache=off,"
3653 #: ../src/guestfs-actions.pod:50 ../fish/guestfish-actions.pod:46
3655 "C<cache=off> is omitted in cases where it is not supported by the underlying "
3660 #: ../src/guestfs-actions.pod:53 ../src/guestfs-actions.pod:82
3662 "C<if=...> is set at compile time by the configuration option C<./configure --"
3663 "with-drive-if=...>. In the rare case where you might need to change this at "
3664 "run time, use C<guestfs_add_drive_with_if> or "
3665 "C<guestfs_add_drive_ro_with_if>."
3669 #: ../src/guestfs-actions.pod:58 ../src/guestfs-actions.pod:87
3671 "Note that this call checks for the existence of C<filename>. This stops you "
3672 "from specifying other types of drive which are supported by qemu such as "
3673 "C<nbd:> and C<http:> URLs. To specify those, use the general "
3674 "C<guestfs_config> call instead."
3678 #: ../src/guestfs-actions.pod:65
3679 msgid "guestfs_add_drive_ro"
3683 #: ../src/guestfs-actions.pod:67
3686 " int guestfs_add_drive_ro (guestfs_h *g,\n"
3687 "\t\tconst char *filename);\n"
3692 #: ../src/guestfs-actions.pod:70 ../fish/guestfish-actions.pod:63
3693 msgid "This adds a drive in snapshot mode, making it effectively read-only."
3697 #: ../src/guestfs-actions.pod:73 ../fish/guestfish-actions.pod:66
3699 "Note that writes to the device are allowed, and will be seen for the "
3700 "duration of the guestfs handle, but they are written to a temporary file "
3701 "which is discarded as soon as the guestfs handle is closed. We don't "
3702 "currently have any method to enable changes to be committed, although qemu "
3707 #: ../src/guestfs-actions.pod:79 ../fish/guestfish-actions.pod:72
3709 "This is equivalent to the qemu parameter C<-drive file=filename,snapshot=on,"
3714 #: ../src/guestfs-actions.pod:94
3715 msgid "guestfs_add_drive_ro_with_if"
3719 #: ../src/guestfs-actions.pod:96
3722 " int guestfs_add_drive_ro_with_if (guestfs_h *g,\n"
3723 "\t\tconst char *filename,\n"
3724 "\t\tconst char *iface);\n"
3729 #: ../src/guestfs-actions.pod:100
3731 "This is the same as C<guestfs_add_drive_ro> but it allows you to specify the "
3732 "QEMU interface emulation to use at run time."
3736 #: ../src/guestfs-actions.pod:105
3737 msgid "guestfs_add_drive_with_if"
3741 #: ../src/guestfs-actions.pod:107
3744 " int guestfs_add_drive_with_if (guestfs_h *g,\n"
3745 "\t\tconst char *filename,\n"
3746 "\t\tconst char *iface);\n"
3751 #: ../src/guestfs-actions.pod:111
3753 "This is the same as C<guestfs_add_drive> but it allows you to specify the "
3754 "QEMU interface emulation to use at run time."
3758 #: ../src/guestfs-actions.pod:116
3759 msgid "guestfs_aug_clear"
3763 #: ../src/guestfs-actions.pod:118
3766 " int guestfs_aug_clear (guestfs_h *g,\n"
3767 "\t\tconst char *augpath);\n"
3772 #: ../src/guestfs-actions.pod:121 ../fish/guestfish-actions.pod:103
3774 "Set the value associated with C<path> to C<NULL>. This is the same as the "
3775 "L<augtool(1)> C<clear> command."
3779 #: ../src/guestfs-actions.pod:126
3780 msgid "guestfs_aug_close"
3784 #: ../src/guestfs-actions.pod:128
3787 " int guestfs_aug_close (guestfs_h *g);\n"
3792 #: ../src/guestfs-actions.pod:130
3794 "Close the current Augeas handle and free up any resources used by it. After "
3795 "calling this, you have to call C<guestfs_aug_init> again before you can use "
3796 "any other Augeas functions."
3800 #: ../src/guestfs-actions.pod:137
3801 msgid "guestfs_aug_defnode"
3805 #: ../src/guestfs-actions.pod:139
3808 " struct guestfs_int_bool *guestfs_aug_defnode (guestfs_h *g,\n"
3809 "\t\tconst char *name,\n"
3810 "\t\tconst char *expr,\n"
3811 "\t\tconst char *val);\n"
3816 #: ../src/guestfs-actions.pod:144 ../fish/guestfish-actions.pod:119
3818 "Defines a variable C<name> whose value is the result of evaluating C<expr>."
3822 #: ../src/guestfs-actions.pod:147
3824 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
3825 "calling C<guestfs_aug_set> C<expr>, C<value>. C<name> will be the nodeset "
3826 "containing that single node."
3830 #: ../src/guestfs-actions.pod:151 ../fish/guestfish-actions.pod:126
3832 "On success this returns a pair containing the number of nodes in the "
3833 "nodeset, and a boolean flag if a node was created."
3837 #: ../src/guestfs-actions.pod:155
3839 "This function returns a C<struct guestfs_int_bool *>, or NULL if there was "
3840 "an error. I<The caller must call C<guestfs_free_int_bool> after use>."
3844 #: ../src/guestfs-actions.pod:159
3845 msgid "guestfs_aug_defvar"
3849 #: ../src/guestfs-actions.pod:161
3852 " int guestfs_aug_defvar (guestfs_h *g,\n"
3853 "\t\tconst char *name,\n"
3854 "\t\tconst char *expr);\n"
3859 #: ../src/guestfs-actions.pod:165 ../fish/guestfish-actions.pod:134
3861 "Defines an Augeas variable C<name> whose value is the result of evaluating "
3862 "C<expr>. If C<expr> is NULL, then C<name> is undefined."
3866 #: ../src/guestfs-actions.pod:169 ../fish/guestfish-actions.pod:138
3868 "On success this returns the number of nodes in C<expr>, or C<0> if C<expr> "
3869 "evaluates to something which is not a nodeset."
3873 #: ../src/guestfs-actions.pod:172 ../src/guestfs-actions.pod:313
3874 #: ../src/guestfs-actions.pod:467 ../src/guestfs-actions.pod:492
3875 #: ../src/guestfs-actions.pod:507 ../src/guestfs-actions.pod:523
3876 #: ../src/guestfs-actions.pod:1013 ../src/guestfs-actions.pod:1328
3877 #: ../src/guestfs-actions.pod:1510 ../src/guestfs-actions.pod:1591
3878 #: ../src/guestfs-actions.pod:1622 ../src/guestfs-actions.pod:1665
3879 #: ../src/guestfs-actions.pod:1682 ../src/guestfs-actions.pod:1907
3880 #: ../src/guestfs-actions.pod:2119 ../src/guestfs-actions.pod:2137
3881 #: ../src/guestfs-actions.pod:3370 ../src/guestfs-actions.pod:3477
3882 #: ../src/guestfs-actions.pod:3793 ../src/guestfs-actions.pod:4892
3883 #: ../src/guestfs-actions.pod:5216 ../src/guestfs-actions.pod:5226
3884 #: ../src/guestfs-actions.pod:5236
3885 msgid "On error this function returns -1."
3889 #: ../src/guestfs-actions.pod:174
3890 msgid "guestfs_aug_get"
3894 #: ../src/guestfs-actions.pod:176
3897 " char *guestfs_aug_get (guestfs_h *g,\n"
3898 "\t\tconst char *augpath);\n"
3903 #: ../src/guestfs-actions.pod:179 ../fish/guestfish-actions.pod:145
3905 "Look up the value associated with C<path>. If C<path> matches exactly one "
3906 "node, the C<value> is returned."
3910 #: ../src/guestfs-actions.pod:182 ../src/guestfs-actions.pod:610
3911 #: ../src/guestfs-actions.pod:625 ../src/guestfs-actions.pod:682
3912 #: ../src/guestfs-actions.pod:695 ../src/guestfs-actions.pod:786
3913 #: ../src/guestfs-actions.pod:899 ../src/guestfs-actions.pod:928
3914 #: ../src/guestfs-actions.pod:942 ../src/guestfs-actions.pod:958
3915 #: ../src/guestfs-actions.pod:1041 ../src/guestfs-actions.pod:1205
3916 #: ../src/guestfs-actions.pod:1314 ../src/guestfs-actions.pod:1459
3917 #: ../src/guestfs-actions.pod:1473 ../src/guestfs-actions.pod:1549
3918 #: ../src/guestfs-actions.pod:1567 ../src/guestfs-actions.pod:1701
3919 #: ../src/guestfs-actions.pod:1840 ../src/guestfs-actions.pod:2021
3920 #: ../src/guestfs-actions.pod:2071 ../src/guestfs-actions.pod:2187
3921 #: ../src/guestfs-actions.pod:2222 ../src/guestfs-actions.pod:2432
3922 #: ../src/guestfs-actions.pod:2853 ../src/guestfs-actions.pod:2949
3923 #: ../src/guestfs-actions.pod:3492 ../src/guestfs-actions.pod:3771
3924 #: ../src/guestfs-actions.pod:3909 ../src/guestfs-actions.pod:3952
3925 #: ../src/guestfs-actions.pod:4428 ../src/guestfs-actions.pod:4441
3926 #: ../src/guestfs-actions.pod:4455 ../src/guestfs-actions.pod:4476
3927 #: ../src/guestfs-actions.pod:5009 ../src/guestfs-actions.pod:5025
3928 #: ../src/guestfs-actions.pod:5040 ../src/guestfs-actions.pod:5188
3929 #: ../src/guestfs-actions.pod:5418
3931 "This function returns a string, or NULL on error. I<The caller must free "
3932 "the returned string after use>."
3936 #: ../src/guestfs-actions.pod:185
3937 msgid "guestfs_aug_init"
3941 #: ../src/guestfs-actions.pod:187
3944 " int guestfs_aug_init (guestfs_h *g,\n"
3945 "\t\tconst char *root,\n"
3951 #: ../src/guestfs-actions.pod:191 ../fish/guestfish-actions.pod:152
3953 "Create a new Augeas handle for editing configuration files. If there was "
3954 "any previous Augeas handle associated with this guestfs session, then it is "
3959 #: ../src/guestfs-actions.pod:195
3960 msgid "You must call this before using any other C<guestfs_aug_*> commands."
3964 #: ../src/guestfs-actions.pod:198 ../fish/guestfish-actions.pod:159
3966 "C<root> is the filesystem root. C<root> must not be NULL, use C</> instead."
3970 #: ../src/guestfs-actions.pod:201 ../fish/guestfish-actions.pod:162
3972 "The flags are the same as the flags defined in E<lt>augeas.hE<gt>, the "
3973 "logical I<or> of the following integers:"
3977 #: ../src/guestfs-actions.pod:207 ../fish/guestfish-actions.pod:168
3978 msgid "C<AUG_SAVE_BACKUP> = 1"
3982 #: ../src/guestfs-actions.pod:209 ../fish/guestfish-actions.pod:170
3983 msgid "Keep the original file with a C<.augsave> extension."
3987 #: ../src/guestfs-actions.pod:211 ../fish/guestfish-actions.pod:172
3988 msgid "C<AUG_SAVE_NEWFILE> = 2"
3992 #: ../src/guestfs-actions.pod:213 ../fish/guestfish-actions.pod:174
3994 "Save changes into a file with extension C<.augnew>, and do not overwrite "
3995 "original. Overrides C<AUG_SAVE_BACKUP>."
3999 #: ../src/guestfs-actions.pod:216 ../fish/guestfish-actions.pod:177
4000 msgid "C<AUG_TYPE_CHECK> = 4"
4004 #: ../src/guestfs-actions.pod:218 ../fish/guestfish-actions.pod:179
4005 msgid "Typecheck lenses (can be expensive)."
4009 #: ../src/guestfs-actions.pod:220 ../fish/guestfish-actions.pod:181
4010 msgid "C<AUG_NO_STDINC> = 8"
4014 #: ../src/guestfs-actions.pod:222 ../fish/guestfish-actions.pod:183
4015 msgid "Do not use standard load path for modules."
4019 #: ../src/guestfs-actions.pod:224 ../fish/guestfish-actions.pod:185
4020 msgid "C<AUG_SAVE_NOOP> = 16"
4024 #: ../src/guestfs-actions.pod:226 ../fish/guestfish-actions.pod:187
4025 msgid "Make save a no-op, just record what would have been changed."
4029 #: ../src/guestfs-actions.pod:228 ../fish/guestfish-actions.pod:189
4030 msgid "C<AUG_NO_LOAD> = 32"
4034 #: ../src/guestfs-actions.pod:230
4035 msgid "Do not load the tree in C<guestfs_aug_init>."
4039 #: ../src/guestfs-actions.pod:234
4040 msgid "To close the handle, you can call C<guestfs_aug_close>."
4044 #: ../src/guestfs-actions.pod:236 ../fish/guestfish-actions.pod:197
4045 msgid "To find out more about Augeas, see L<http://augeas.net/>."
4049 #: ../src/guestfs-actions.pod:240
4050 msgid "guestfs_aug_insert"
4054 #: ../src/guestfs-actions.pod:242
4057 " int guestfs_aug_insert (guestfs_h *g,\n"
4058 "\t\tconst char *augpath,\n"
4059 "\t\tconst char *label,\n"
4060 "\t\tint before);\n"
4065 #: ../src/guestfs-actions.pod:247 ../fish/guestfish-actions.pod:203
4067 "Create a new sibling C<label> for C<path>, inserting it into the tree before "
4068 "or after C<path> (depending on the boolean flag C<before>)."
4072 #: ../src/guestfs-actions.pod:251 ../fish/guestfish-actions.pod:207
4074 "C<path> must match exactly one existing node in the tree, and C<label> must "
4075 "be a label, ie. not contain C</>, C<*> or end with a bracketed index C<[N]>."
4079 #: ../src/guestfs-actions.pod:257
4080 msgid "guestfs_aug_load"
4084 #: ../src/guestfs-actions.pod:259
4087 " int guestfs_aug_load (guestfs_h *g);\n"
4092 #: ../src/guestfs-actions.pod:261 ../fish/guestfish-actions.pod:215
4093 msgid "Load files into the tree."
4097 #: ../src/guestfs-actions.pod:263 ../fish/guestfish-actions.pod:217
4098 msgid "See C<aug_load> in the Augeas documentation for the full gory details."
4102 #: ../src/guestfs-actions.pod:268
4103 msgid "guestfs_aug_ls"
4107 #: ../src/guestfs-actions.pod:270
4110 " char **guestfs_aug_ls (guestfs_h *g,\n"
4111 "\t\tconst char *augpath);\n"
4116 #: ../src/guestfs-actions.pod:273
4118 "This is just a shortcut for listing C<guestfs_aug_match> C<path/*> and "
4119 "sorting the resulting nodes into alphabetical order."
4123 #: ../src/guestfs-actions.pod:276 ../src/guestfs-actions.pod:289
4124 #: ../src/guestfs-actions.pod:417 ../src/guestfs-actions.pod:802
4125 #: ../src/guestfs-actions.pod:1053 ../src/guestfs-actions.pod:1069
4126 #: ../src/guestfs-actions.pod:1157 ../src/guestfs-actions.pod:1173
4127 #: ../src/guestfs-actions.pod:1404 ../src/guestfs-actions.pod:1738
4128 #: ../src/guestfs-actions.pod:1751 ../src/guestfs-actions.pod:1767
4129 #: ../src/guestfs-actions.pod:1804 ../src/guestfs-actions.pod:1825
4130 #: ../src/guestfs-actions.pod:1887 ../src/guestfs-actions.pod:1927
4131 #: ../src/guestfs-actions.pod:2093 ../src/guestfs-actions.pod:2259
4132 #: ../src/guestfs-actions.pod:2402 ../src/guestfs-actions.pod:2417
4133 #: ../src/guestfs-actions.pod:2501 ../src/guestfs-actions.pod:2830
4134 #: ../src/guestfs-actions.pod:3337 ../src/guestfs-actions.pod:3748
4135 #: ../src/guestfs-actions.pod:3834 ../src/guestfs-actions.pod:3940
4136 #: ../src/guestfs-actions.pod:4489 ../src/guestfs-actions.pod:4538
4137 #: ../src/guestfs-actions.pod:4590 ../src/guestfs-actions.pod:4706
4138 #: ../src/guestfs-actions.pod:4727 ../src/guestfs-actions.pod:5101
4139 #: ../src/guestfs-actions.pod:5118 ../src/guestfs-actions.pod:5156
4140 #: ../src/guestfs-actions.pod:5292 ../src/guestfs-actions.pod:5308
4141 #: ../src/guestfs-actions.pod:5381 ../src/guestfs-actions.pod:5397
4142 #: ../src/guestfs-actions.pod:5437 ../src/guestfs-actions.pod:5453
4144 "This function returns a NULL-terminated array of strings (like L<environ(3)"
4145 ">), or NULL if there was an error. I<The caller must free the strings and "
4146 "the array after use>."
4150 #: ../src/guestfs-actions.pod:280
4151 msgid "guestfs_aug_match"
4155 #: ../src/guestfs-actions.pod:282
4158 " char **guestfs_aug_match (guestfs_h *g,\n"
4159 "\t\tconst char *augpath);\n"
4164 #: ../src/guestfs-actions.pod:285 ../fish/guestfish-actions.pod:231
4166 "Returns a list of paths which match the path expression C<path>. The "
4167 "returned paths are sufficiently qualified so that they match exactly one "
4168 "node in the current tree."
4172 #: ../src/guestfs-actions.pod:293
4173 msgid "guestfs_aug_mv"
4177 #: ../src/guestfs-actions.pod:295
4180 " int guestfs_aug_mv (guestfs_h *g,\n"
4181 "\t\tconst char *src,\n"
4182 "\t\tconst char *dest);\n"
4187 #: ../src/guestfs-actions.pod:299 ../fish/guestfish-actions.pod:239
4189 "Move the node C<src> to C<dest>. C<src> must match exactly one node. "
4190 "C<dest> is overwritten if it exists."
4194 #: ../src/guestfs-actions.pod:304
4195 msgid "guestfs_aug_rm"
4199 #: ../src/guestfs-actions.pod:306
4202 " int guestfs_aug_rm (guestfs_h *g,\n"
4203 "\t\tconst char *augpath);\n"
4208 #: ../src/guestfs-actions.pod:309 ../fish/guestfish-actions.pod:246
4209 msgid "Remove C<path> and all of its children."
4213 #: ../src/guestfs-actions.pod:311 ../fish/guestfish-actions.pod:248
4214 msgid "On success this returns the number of entries which were removed."
4218 #: ../src/guestfs-actions.pod:315
4219 msgid "guestfs_aug_save"
4223 #: ../src/guestfs-actions.pod:317
4226 " int guestfs_aug_save (guestfs_h *g);\n"
4231 #: ../src/guestfs-actions.pod:319 ../fish/guestfish-actions.pod:254
4232 msgid "This writes all pending changes to disk."
4236 #: ../src/guestfs-actions.pod:321
4238 "The flags which were passed to C<guestfs_aug_init> affect exactly how files "
4243 #: ../src/guestfs-actions.pod:326
4244 msgid "guestfs_aug_set"
4248 #: ../src/guestfs-actions.pod:328
4251 " int guestfs_aug_set (guestfs_h *g,\n"
4252 "\t\tconst char *augpath,\n"
4253 "\t\tconst char *val);\n"
4258 #: ../src/guestfs-actions.pod:332 ../fish/guestfish-actions.pod:263
4259 msgid "Set the value associated with C<path> to C<val>."
4263 #: ../src/guestfs-actions.pod:334
4265 "In the Augeas API, it is possible to clear a node by setting the value to "
4266 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
4267 "this call. Instead you must use the C<guestfs_aug_clear> call."
4271 #: ../src/guestfs-actions.pod:341
4272 msgid "guestfs_available"
4276 #: ../src/guestfs-actions.pod:343
4279 " int guestfs_available (guestfs_h *g,\n"
4280 "\t\tchar *const *groups);\n"
4285 #: ../src/guestfs-actions.pod:346 ../fish/guestfish-actions.pod:274
4287 "This command is used to check the availability of some groups of "
4288 "functionality in the appliance, which not all builds of the libguestfs "
4289 "appliance will be able to provide."
4293 #: ../src/guestfs-actions.pod:350
4295 "The libguestfs groups, and the functions that those groups correspond to, "
4296 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
4297 "runtime by calling C<guestfs_available_all_groups>."
4301 #: ../src/guestfs-actions.pod:355 ../fish/guestfish-actions.pod:283
4303 "The argument C<groups> is a list of group names, eg: C<[\"inotify\", \"augeas"
4304 "\"]> would check for the availability of the Linux inotify functions and "
4305 "Augeas (configuration file editing) functions."
4309 #: ../src/guestfs-actions.pod:360 ../fish/guestfish-actions.pod:288
4310 msgid "The command returns no error if I<all> requested groups are available."
4314 #: ../src/guestfs-actions.pod:362 ../fish/guestfish-actions.pod:290
4316 "It fails with an error if one or more of the requested groups is unavailable "
4321 #: ../src/guestfs-actions.pod:365 ../fish/guestfish-actions.pod:293
4323 "If an unknown group name is included in the list of groups then an error is "
4328 #: ../src/guestfs-actions.pod:368 ../fish/guestfish-actions.pod:296
4333 #: ../src/guestfs-actions.pod:374
4334 msgid "You must call C<guestfs_launch> before calling this function."
4338 #: ../src/guestfs-actions.pod:376 ../fish/guestfish-actions.pod:304
4340 "The reason is because we don't know what groups are supported by the "
4341 "appliance/daemon until it is running and can be queried."
4345 #: ../src/guestfs-actions.pod:382 ../fish/guestfish-actions.pod:310
4347 "If a group of functions is available, this does not necessarily mean that "
4348 "they will work. You still have to check for errors when calling individual "
4349 "API functions even if they are available."
4353 #: ../src/guestfs-actions.pod:389 ../fish/guestfish-actions.pod:317
4355 "It is usually the job of distro packagers to build complete functionality "
4356 "into the libguestfs appliance. Upstream libguestfs, if built from source "
4357 "with all requirements satisfied, will support everything."
4361 #: ../src/guestfs-actions.pod:396
4363 "This call was added in version C<1.0.80>. In previous versions of "
4364 "libguestfs all you could do would be to speculatively execute a command to "
4365 "find out if the daemon implemented it. See also C<guestfs_version>."
4369 #: ../src/guestfs-actions.pod:405
4370 msgid "guestfs_available_all_groups"
4374 #: ../src/guestfs-actions.pod:407
4377 " char **guestfs_available_all_groups (guestfs_h *g);\n"
4382 #: ../src/guestfs-actions.pod:409
4384 "This command returns a list of all optional groups that this daemon knows "
4385 "about. Note this returns both supported and unsupported groups. To find "
4386 "out which ones the daemon can actually support you have to call "
4387 "C<guestfs_available> on each member of the returned list."
4391 #: ../src/guestfs-actions.pod:415
4392 msgid "See also C<guestfs_available> and L<guestfs(3)/AVAILABILITY>."
4396 #: ../src/guestfs-actions.pod:421
4397 msgid "guestfs_base64_in"
4401 #: ../src/guestfs-actions.pod:423
4404 " int guestfs_base64_in (guestfs_h *g,\n"
4405 "\t\tconst char *base64file,\n"
4406 "\t\tconst char *filename);\n"
4411 #: ../src/guestfs-actions.pod:427 ../fish/guestfish-actions.pod:347
4413 "This command uploads base64-encoded data from C<base64file> to C<filename>."
4417 #: ../src/guestfs-actions.pod:432
4418 msgid "guestfs_base64_out"
4422 #: ../src/guestfs-actions.pod:434
4425 " int guestfs_base64_out (guestfs_h *g,\n"
4426 "\t\tconst char *filename,\n"
4427 "\t\tconst char *base64file);\n"
4432 #: ../src/guestfs-actions.pod:438 ../fish/guestfish-actions.pod:356
4434 "This command downloads the contents of C<filename>, writing it out to local "
4435 "file C<base64file> encoded as base64."
4439 #: ../src/guestfs-actions.pod:443
4440 msgid "guestfs_blockdev_flushbufs"
4444 #: ../src/guestfs-actions.pod:445
4447 " int guestfs_blockdev_flushbufs (guestfs_h *g,\n"
4448 "\t\tconst char *device);\n"
4453 #: ../src/guestfs-actions.pod:448 ../fish/guestfish-actions.pod:365
4455 "This tells the kernel to flush internal buffers associated with C<device>."
4459 #: ../src/guestfs-actions.pod:451 ../src/guestfs-actions.pod:465
4460 #: ../src/guestfs-actions.pod:477 ../src/guestfs-actions.pod:490
4461 #: ../src/guestfs-actions.pod:505 ../src/guestfs-actions.pod:521
4462 #: ../src/guestfs-actions.pod:532 ../src/guestfs-actions.pod:547
4463 #: ../src/guestfs-actions.pod:558 ../src/guestfs-actions.pod:569
4464 #: ../fish/guestfish-actions.pod:368 ../fish/guestfish-actions.pod:379
4465 #: ../fish/guestfish-actions.pod:388 ../fish/guestfish-actions.pod:398
4466 #: ../fish/guestfish-actions.pod:410 ../fish/guestfish-actions.pod:423
4467 #: ../fish/guestfish-actions.pod:431 ../fish/guestfish-actions.pod:442
4468 #: ../fish/guestfish-actions.pod:450 ../fish/guestfish-actions.pod:458
4469 msgid "This uses the L<blockdev(8)> command."
4473 #: ../src/guestfs-actions.pod:455
4474 msgid "guestfs_blockdev_getbsz"
4478 #: ../src/guestfs-actions.pod:457
4481 " int guestfs_blockdev_getbsz (guestfs_h *g,\n"
4482 "\t\tconst char *device);\n"
4487 #: ../src/guestfs-actions.pod:460 ../fish/guestfish-actions.pod:374
4488 msgid "This returns the block size of a device."
4492 #: ../src/guestfs-actions.pod:462 ../src/guestfs-actions.pod:544
4493 #: ../fish/guestfish-actions.pod:376 ../fish/guestfish-actions.pod:439
4495 "(Note this is different from both I<size in blocks> and I<filesystem block "
4500 #: ../src/guestfs-actions.pod:469
4501 msgid "guestfs_blockdev_getro"
4505 #: ../src/guestfs-actions.pod:471
4508 " int guestfs_blockdev_getro (guestfs_h *g,\n"
4509 "\t\tconst char *device);\n"
4514 #: ../src/guestfs-actions.pod:474 ../fish/guestfish-actions.pod:385
4516 "Returns a boolean indicating if the block device is read-only (true if read-"
4517 "only, false if not)."
4521 #: ../src/guestfs-actions.pod:479 ../src/guestfs-actions.pod:1087
4522 #: ../src/guestfs-actions.pod:1099 ../src/guestfs-actions.pod:1531
4523 #: ../src/guestfs-actions.pod:1539 ../src/guestfs-actions.pod:1599
4524 #: ../src/guestfs-actions.pod:1642 ../src/guestfs-actions.pod:1654
4525 #: ../src/guestfs-actions.pod:1673 ../src/guestfs-actions.pod:1690
4526 #: ../src/guestfs-actions.pod:2272 ../src/guestfs-actions.pod:2283
4527 #: ../src/guestfs-actions.pod:2296 ../src/guestfs-actions.pod:2309
4528 #: ../src/guestfs-actions.pod:2320 ../src/guestfs-actions.pod:2330
4529 #: ../src/guestfs-actions.pod:2341 ../src/guestfs-actions.pod:3462
4530 msgid "This function returns a C truth value on success or -1 on error."
4534 #: ../src/guestfs-actions.pod:481
4535 msgid "guestfs_blockdev_getsize64"
4539 #: ../src/guestfs-actions.pod:483
4542 " int64_t guestfs_blockdev_getsize64 (guestfs_h *g,\n"
4543 "\t\tconst char *device);\n"
4548 #: ../src/guestfs-actions.pod:486 ../fish/guestfish-actions.pod:394
4549 msgid "This returns the size of the device in bytes."
4553 #: ../src/guestfs-actions.pod:488
4554 msgid "See also C<guestfs_blockdev_getsz>."
4558 #: ../src/guestfs-actions.pod:494
4559 msgid "guestfs_blockdev_getss"
4563 #: ../src/guestfs-actions.pod:496
4566 " int guestfs_blockdev_getss (guestfs_h *g,\n"
4567 "\t\tconst char *device);\n"
4572 #: ../src/guestfs-actions.pod:499 ../fish/guestfish-actions.pod:404
4574 "This returns the size of sectors on a block device. Usually 512, but can be "
4575 "larger for modern devices."
4579 #: ../src/guestfs-actions.pod:502
4581 "(Note, this is not the size in sectors, use C<guestfs_blockdev_getsz> for "
4586 #: ../src/guestfs-actions.pod:509
4587 msgid "guestfs_blockdev_getsz"
4591 #: ../src/guestfs-actions.pod:511
4594 " int64_t guestfs_blockdev_getsz (guestfs_h *g,\n"
4595 "\t\tconst char *device);\n"
4600 #: ../src/guestfs-actions.pod:514 ../fish/guestfish-actions.pod:416
4602 "This returns the size of the device in units of 512-byte sectors (even if "
4603 "the sectorsize isn't 512 bytes ... weird)."
4607 #: ../src/guestfs-actions.pod:517
4609 "See also C<guestfs_blockdev_getss> for the real sector size of the device, "
4610 "and C<guestfs_blockdev_getsize64> for the more useful I<size in bytes>."
4614 #: ../src/guestfs-actions.pod:525
4615 msgid "guestfs_blockdev_rereadpt"
4619 #: ../src/guestfs-actions.pod:527
4622 " int guestfs_blockdev_rereadpt (guestfs_h *g,\n"
4623 "\t\tconst char *device);\n"
4628 #: ../src/guestfs-actions.pod:530 ../fish/guestfish-actions.pod:429
4629 msgid "Reread the partition table on C<device>."
4633 #: ../src/guestfs-actions.pod:536
4634 msgid "guestfs_blockdev_setbsz"
4638 #: ../src/guestfs-actions.pod:538
4641 " int guestfs_blockdev_setbsz (guestfs_h *g,\n"
4642 "\t\tconst char *device,\n"
4643 "\t\tint blocksize);\n"
4648 #: ../src/guestfs-actions.pod:542 ../fish/guestfish-actions.pod:437
4649 msgid "This sets the block size of a device."
4653 #: ../src/guestfs-actions.pod:551
4654 msgid "guestfs_blockdev_setro"
4658 #: ../src/guestfs-actions.pod:553
4661 " int guestfs_blockdev_setro (guestfs_h *g,\n"
4662 "\t\tconst char *device);\n"
4667 #: ../src/guestfs-actions.pod:556 ../fish/guestfish-actions.pod:448
4668 msgid "Sets the block device named C<device> to read-only."
4672 #: ../src/guestfs-actions.pod:562
4673 msgid "guestfs_blockdev_setrw"
4677 #: ../src/guestfs-actions.pod:564
4680 " int guestfs_blockdev_setrw (guestfs_h *g,\n"
4681 "\t\tconst char *device);\n"
4686 #: ../src/guestfs-actions.pod:567 ../fish/guestfish-actions.pod:456
4687 msgid "Sets the block device named C<device> to read-write."
4691 #: ../src/guestfs-actions.pod:573
4692 msgid "guestfs_case_sensitive_path"
4696 #: ../src/guestfs-actions.pod:575
4699 " char *guestfs_case_sensitive_path (guestfs_h *g,\n"
4700 "\t\tconst char *path);\n"
4705 #: ../src/guestfs-actions.pod:578 ../fish/guestfish-actions.pod:464
4707 "This can be used to resolve case insensitive paths on a filesystem which is "
4708 "case sensitive. The use case is to resolve paths which you have read from "
4709 "Windows configuration files or the Windows Registry, to the true path."
4713 #: ../src/guestfs-actions.pod:583 ../fish/guestfish-actions.pod:469
4715 "The command handles a peculiarity of the Linux ntfs-3g filesystem driver "
4716 "(and probably others), which is that although the underlying filesystem is "
4717 "case-insensitive, the driver exports the filesystem to Linux as case-"
4722 #: ../src/guestfs-actions.pod:588 ../fish/guestfish-actions.pod:474
4724 "One consequence of this is that special directories such as C<c:\\windows> "
4725 "may appear as C</WINDOWS> or C</windows> (or other things) depending on the "
4726 "precise details of how they were created. In Windows itself this would not "
4731 #: ../src/guestfs-actions.pod:594 ../fish/guestfish-actions.pod:480
4733 "Bug or feature? You decide: L<http://www.tuxera.com/community/ntfs-3g-faq/"
4738 #: ../src/guestfs-actions.pod:597 ../fish/guestfish-actions.pod:483
4740 "This function resolves the true case of each element in the path and returns "
4741 "the case-sensitive path."
4745 #: ../src/guestfs-actions.pod:600
4747 "Thus C<guestfs_case_sensitive_path> (\"/Windows/System32\") might return C<"
4748 "\"/WINDOWS/system32\"> (the exact return value would depend on details of "
4749 "how the directories were originally created under Windows)."
4753 #: ../src/guestfs-actions.pod:605 ../fish/guestfish-actions.pod:491
4754 msgid "I<Note>: This function does not handle drive names, backslashes etc."
4758 #: ../src/guestfs-actions.pod:608
4759 msgid "See also C<guestfs_realpath>."
4763 #: ../src/guestfs-actions.pod:613
4768 #: ../src/guestfs-actions.pod:615
4771 " char *guestfs_cat (guestfs_h *g,\n"
4772 "\t\tconst char *path);\n"
4777 #: ../src/guestfs-actions.pod:618 ../src/guestfs-actions.pod:3824
4778 #: ../fish/guestfish-actions.pod:500 ../fish/guestfish-actions.pod:2944
4779 msgid "Return the contents of the file named C<path>."
4783 #: ../src/guestfs-actions.pod:620
4785 "Note that this function cannot correctly handle binary files (specifically, "
4786 "files containing C<\\0> character which is treated as end of string). For "
4787 "those you need to use the C<guestfs_read_file> or C<guestfs_download> "
4788 "functions which have a more complex interface."
4792 #: ../src/guestfs-actions.pod:628 ../src/guestfs-actions.pod:789
4793 #: ../src/guestfs-actions.pod:806 ../src/guestfs-actions.pod:1057
4794 #: ../src/guestfs-actions.pod:1073 ../src/guestfs-actions.pod:1161
4795 #: ../src/guestfs-actions.pod:1177 ../src/guestfs-actions.pod:1408
4796 #: ../src/guestfs-actions.pod:1755 ../src/guestfs-actions.pod:1771
4797 #: ../src/guestfs-actions.pod:1808 ../src/guestfs-actions.pod:1829
4798 #: ../src/guestfs-actions.pod:1843 ../src/guestfs-actions.pod:1869
4799 #: ../src/guestfs-actions.pod:3687 ../src/guestfs-actions.pod:3795
4800 #: ../src/guestfs-actions.pod:3816 ../src/guestfs-actions.pod:4542
4801 #: ../src/guestfs-actions.pod:4594 ../src/guestfs-actions.pod:4710
4802 #: ../src/guestfs-actions.pod:4731 ../src/guestfs-actions.pod:5250
4803 #: ../src/guestfs-actions.pod:5273 ../src/guestfs-actions.pod:5296
4804 #: ../src/guestfs-actions.pod:5312 ../src/guestfs-actions.pod:5385
4805 #: ../src/guestfs-actions.pod:5401 ../src/guestfs-actions.pod:5441
4806 #: ../src/guestfs-actions.pod:5457 ../fish/guestfish-actions.pod:507
4807 #: ../fish/guestfish-actions.pod:642 ../fish/guestfish-actions.pod:654
4808 #: ../fish/guestfish-actions.pod:836 ../fish/guestfish-actions.pod:846
4809 #: ../fish/guestfish-actions.pod:913 ../fish/guestfish-actions.pod:923
4810 #: ../fish/guestfish-actions.pod:1118 ../fish/guestfish-actions.pod:1391
4811 #: ../fish/guestfish-actions.pod:1401 ../fish/guestfish-actions.pod:1429
4812 #: ../fish/guestfish-actions.pod:1444 ../fish/guestfish-actions.pod:1454
4813 #: ../fish/guestfish-actions.pod:1473 ../fish/guestfish-actions.pod:2846
4814 #: ../fish/guestfish-actions.pod:2922 ../fish/guestfish-actions.pod:2937
4815 #: ../fish/guestfish-actions.pod:3498 ../fish/guestfish-actions.pod:3544
4816 #: ../fish/guestfish-actions.pod:3629 ../fish/guestfish-actions.pod:3644
4817 #: ../fish/guestfish-actions.pod:4027 ../fish/guestfish-actions.pod:4045
4818 #: ../fish/guestfish-actions.pod:4062 ../fish/guestfish-actions.pod:4072
4819 #: ../fish/guestfish-actions.pod:4120 ../fish/guestfish-actions.pod:4130
4820 #: ../fish/guestfish-actions.pod:4159 ../fish/guestfish-actions.pod:4169
4822 "Because of the message protocol, there is a transfer limit of somewhere "
4823 "between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
4827 #: ../src/guestfs-actions.pod:631
4828 msgid "guestfs_checksum"
4832 #: ../src/guestfs-actions.pod:633
4835 " char *guestfs_checksum (guestfs_h *g,\n"
4836 "\t\tconst char *csumtype,\n"
4837 "\t\tconst char *path);\n"
4842 #: ../src/guestfs-actions.pod:637 ../fish/guestfish-actions.pod:514
4844 "This call computes the MD5, SHAx or CRC checksum of the file named C<path>."
4848 #: ../src/guestfs-actions.pod:640 ../fish/guestfish-actions.pod:517
4850 "The type of checksum to compute is given by the C<csumtype> parameter which "
4851 "must have one of the following values:"
4855 #: ../src/guestfs-actions.pod:645 ../fish/guestfish-actions.pod:522
4860 #: ../src/guestfs-actions.pod:647 ../fish/guestfish-actions.pod:524
4862 "Compute the cyclic redundancy check (CRC) specified by POSIX for the "
4867 #: ../src/guestfs-actions.pod:650 ../fish/guestfish-actions.pod:527
4872 #: ../src/guestfs-actions.pod:652 ../fish/guestfish-actions.pod:529
4873 msgid "Compute the MD5 hash (using the C<md5sum> program)."
4877 #: ../src/guestfs-actions.pod:654 ../fish/guestfish-actions.pod:531
4882 #: ../src/guestfs-actions.pod:656 ../fish/guestfish-actions.pod:533
4883 msgid "Compute the SHA1 hash (using the C<sha1sum> program)."
4887 #: ../src/guestfs-actions.pod:658 ../fish/guestfish-actions.pod:535
4892 #: ../src/guestfs-actions.pod:660 ../fish/guestfish-actions.pod:537
4893 msgid "Compute the SHA224 hash (using the C<sha224sum> program)."
4897 #: ../src/guestfs-actions.pod:662 ../fish/guestfish-actions.pod:539
4902 #: ../src/guestfs-actions.pod:664 ../fish/guestfish-actions.pod:541
4903 msgid "Compute the SHA256 hash (using the C<sha256sum> program)."
4907 #: ../src/guestfs-actions.pod:666 ../fish/guestfish-actions.pod:543
4912 #: ../src/guestfs-actions.pod:668 ../fish/guestfish-actions.pod:545
4913 msgid "Compute the SHA384 hash (using the C<sha384sum> program)."
4917 #: ../src/guestfs-actions.pod:670 ../fish/guestfish-actions.pod:547
4922 #: ../src/guestfs-actions.pod:672 ../fish/guestfish-actions.pod:549
4923 msgid "Compute the SHA512 hash (using the C<sha512sum> program)."
4927 #: ../src/guestfs-actions.pod:676 ../fish/guestfish-actions.pod:553
4928 msgid "The checksum is returned as a printable string."
4932 #: ../src/guestfs-actions.pod:678
4933 msgid "To get the checksum for a device, use C<guestfs_checksum_device>."
4937 #: ../src/guestfs-actions.pod:680
4938 msgid "To get the checksums for many files, use C<guestfs_checksums_out>."
4942 #: ../src/guestfs-actions.pod:685
4943 msgid "guestfs_checksum_device"
4947 #: ../src/guestfs-actions.pod:687
4950 " char *guestfs_checksum_device (guestfs_h *g,\n"
4951 "\t\tconst char *csumtype,\n"
4952 "\t\tconst char *device);\n"
4957 #: ../src/guestfs-actions.pod:691
4959 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
4960 "device named C<device>. For the types of checksums supported see the "
4961 "C<guestfs_checksum> command."
4965 #: ../src/guestfs-actions.pod:698
4966 msgid "guestfs_checksums_out"
4970 #: ../src/guestfs-actions.pod:700
4973 " int guestfs_checksums_out (guestfs_h *g,\n"
4974 "\t\tconst char *csumtype,\n"
4975 "\t\tconst char *directory,\n"
4976 "\t\tconst char *sumsfile);\n"
4981 #: ../src/guestfs-actions.pod:705 ../fish/guestfish-actions.pod:571
4983 "This command computes the checksums of all regular files in C<directory> and "
4984 "then emits a list of those checksums to the local output file C<sumsfile>."
4988 #: ../src/guestfs-actions.pod:709 ../fish/guestfish-actions.pod:575
4990 "This can be used for verifying the integrity of a virtual machine. However "
4991 "to be properly secure you should pay attention to the output of the checksum "
4992 "command (it uses the ones from GNU coreutils). In particular when the "
4993 "filename is not printable, coreutils uses a special backslash syntax. For "
4994 "more information, see the GNU coreutils info file."
4998 #: ../src/guestfs-actions.pod:719
4999 msgid "guestfs_chmod"
5003 #: ../src/guestfs-actions.pod:721
5006 " int guestfs_chmod (guestfs_h *g,\n"
5008 "\t\tconst char *path);\n"
5013 #: ../src/guestfs-actions.pod:725 ../fish/guestfish-actions.pod:589
5015 "Change the mode (permissions) of C<path> to C<mode>. Only numeric modes are "
5020 #: ../src/guestfs-actions.pod:728 ../fish/guestfish-actions.pod:592
5022 "I<Note>: When using this command from guestfish, C<mode> by default would be "
5023 "decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not "
5028 #: ../src/guestfs-actions.pod:732 ../src/guestfs-actions.pod:3045
5029 #: ../src/guestfs-actions.pod:3133 ../src/guestfs-actions.pod:3149
5030 #: ../src/guestfs-actions.pod:3165 ../fish/guestfish-actions.pod:596
5031 #: ../fish/guestfish-actions.pod:2362 ../fish/guestfish-actions.pod:2432
5032 #: ../fish/guestfish-actions.pod:2442 ../fish/guestfish-actions.pod:2452
5033 msgid "The mode actually set is affected by the umask."
5037 #: ../src/guestfs-actions.pod:736
5038 msgid "guestfs_chown"
5042 #: ../src/guestfs-actions.pod:738
5045 " int guestfs_chown (guestfs_h *g,\n"
5048 "\t\tconst char *path);\n"
5053 #: ../src/guestfs-actions.pod:743 ../fish/guestfish-actions.pod:602
5054 msgid "Change the file owner to C<owner> and group to C<group>."
5058 #: ../src/guestfs-actions.pod:745 ../src/guestfs-actions.pod:2374
5059 #: ../fish/guestfish-actions.pod:604 ../fish/guestfish-actions.pod:1890
5061 "Only numeric uid and gid are supported. If you want to use names, you will "
5062 "need to locate and parse the password file yourself (Augeas support makes "
5063 "this relatively easy)."
5067 #: ../src/guestfs-actions.pod:751
5068 msgid "guestfs_command"
5072 #: ../src/guestfs-actions.pod:753
5075 " char *guestfs_command (guestfs_h *g,\n"
5076 "\t\tchar *const *arguments);\n"
5081 #: ../src/guestfs-actions.pod:756 ../fish/guestfish-actions.pod:612
5083 "This call runs a command from the guest filesystem. The filesystem must be "
5084 "mounted, and must contain a compatible operating system (ie. something "
5085 "Linux, with the same or compatible processor architecture)."
5089 #: ../src/guestfs-actions.pod:761
5091 "The single parameter is an argv-style list of arguments. The first element "
5092 "is the name of the program to run. Subsequent elements are parameters. The "
5093 "list must be non-empty (ie. must contain a program name). Note that the "
5094 "command runs directly, and is I<not> invoked via the shell (see "
5099 #: ../src/guestfs-actions.pod:768 ../fish/guestfish-actions.pod:624
5100 msgid "The return value is anything printed to I<stdout> by the command."
5104 #: ../src/guestfs-actions.pod:771 ../fish/guestfish-actions.pod:627
5106 "If the command returns a non-zero exit status, then this function returns an "
5107 "error message. The error message string is the content of I<stderr> from "
5112 #: ../src/guestfs-actions.pod:775 ../fish/guestfish-actions.pod:631
5114 "The C<$PATH> environment variable will contain at least C</usr/bin> and C</"
5115 "bin>. If you require a program from another location, you should provide "
5116 "the full path in the first parameter."
5120 #: ../src/guestfs-actions.pod:780 ../fish/guestfish-actions.pod:636
5122 "Shared libraries and data files required by the program must be available on "
5123 "filesystems which are mounted in the correct places. It is the caller's "
5124 "responsibility to ensure all filesystems that are needed are mounted at the "
5129 #: ../src/guestfs-actions.pod:792
5130 msgid "guestfs_command_lines"
5134 #: ../src/guestfs-actions.pod:794
5137 " char **guestfs_command_lines (guestfs_h *g,\n"
5138 "\t\tchar *const *arguments);\n"
5143 #: ../src/guestfs-actions.pod:797
5145 "This is the same as C<guestfs_command>, but splits the result into a list of "
5150 #: ../src/guestfs-actions.pod:800
5151 msgid "See also: C<guestfs_sh_lines>"
5155 #: ../src/guestfs-actions.pod:809
5156 msgid "guestfs_config"
5160 #: ../src/guestfs-actions.pod:811
5163 " int guestfs_config (guestfs_h *g,\n"
5164 "\t\tconst char *qemuparam,\n"
5165 "\t\tconst char *qemuvalue);\n"
5170 #: ../src/guestfs-actions.pod:815 ../fish/guestfish-actions.pod:661
5172 "This can be used to add arbitrary qemu command line parameters of the form "
5173 "C<-param value>. Actually it's not quite arbitrary - we prevent you from "
5174 "setting some parameters which would interfere with parameters that we use."
5178 #: ../src/guestfs-actions.pod:820 ../fish/guestfish-actions.pod:666
5179 msgid "The first character of C<param> string must be a C<-> (dash)."
5183 #: ../src/guestfs-actions.pod:822 ../fish/guestfish-actions.pod:668
5184 msgid "C<value> can be NULL."
5188 #: ../src/guestfs-actions.pod:826
5189 msgid "guestfs_copy_size"
5193 #: ../src/guestfs-actions.pod:828
5196 " int guestfs_copy_size (guestfs_h *g,\n"
5197 "\t\tconst char *src,\n"
5198 "\t\tconst char *dest,\n"
5199 "\t\tint64_t size);\n"
5204 #: ../src/guestfs-actions.pod:833 ../fish/guestfish-actions.pod:674
5206 "This command copies exactly C<size> bytes from one source device or file "
5207 "C<src> to another destination device or file C<dest>."
5211 #: ../src/guestfs-actions.pod:836 ../fish/guestfish-actions.pod:677
5213 "Note this will fail if the source is too short or if the destination is not "
5218 #: ../src/guestfs-actions.pod:841 ../src/guestfs-actions.pod:976
5219 #: ../src/guestfs-actions.pod:1348 ../src/guestfs-actions.pod:1367
5220 #: ../src/guestfs-actions.pod:5330 ../src/guestfs-actions.pod:5346
5222 "This long-running command can generate progress notification messages so "
5223 "that the caller can display a progress bar or indicator. To receive these "
5224 "messages, the caller must register a progress callback. See L<guestfs(3)/"
5225 "guestfs_set_progress_callback>."
5229 #: ../src/guestfs-actions.pod:846
5234 #: ../src/guestfs-actions.pod:848
5237 " int guestfs_cp (guestfs_h *g,\n"
5238 "\t\tconst char *src,\n"
5239 "\t\tconst char *dest);\n"
5244 #: ../src/guestfs-actions.pod:852 ../fish/guestfish-actions.pod:684
5246 "This copies a file from C<src> to C<dest> where C<dest> is either a "
5247 "destination filename or destination directory."
5251 #: ../src/guestfs-actions.pod:857
5252 msgid "guestfs_cp_a"
5256 #: ../src/guestfs-actions.pod:859
5259 " int guestfs_cp_a (guestfs_h *g,\n"
5260 "\t\tconst char *src,\n"
5261 "\t\tconst char *dest);\n"
5266 #: ../src/guestfs-actions.pod:863 ../fish/guestfish-actions.pod:691
5268 "This copies a file or directory from C<src> to C<dest> recursively using the "
5273 #: ../src/guestfs-actions.pod:868
5278 #: ../src/guestfs-actions.pod:870
5281 " int guestfs_dd (guestfs_h *g,\n"
5282 "\t\tconst char *src,\n"
5283 "\t\tconst char *dest);\n"
5288 #: ../src/guestfs-actions.pod:874 ../fish/guestfish-actions.pod:698
5290 "This command copies from one source device or file C<src> to another "
5291 "destination device or file C<dest>. Normally you would use this to copy to "
5292 "or from a device or partition, for example to duplicate a filesystem."
5296 #: ../src/guestfs-actions.pod:879
5298 "If the destination is a device, it must be as large or larger than the "
5299 "source file or device, otherwise the copy will fail. This command cannot do "
5300 "partial copies (see C<guestfs_copy_size>)."
5304 #: ../src/guestfs-actions.pod:885
5305 msgid "guestfs_debug"
5309 #: ../src/guestfs-actions.pod:887
5312 " char *guestfs_debug (guestfs_h *g,\n"
5313 "\t\tconst char *subcmd,\n"
5314 "\t\tchar *const *extraargs);\n"
5319 #: ../src/guestfs-actions.pod:891
5321 "The C<guestfs_debug> command exposes some internals of C<guestfsd> (the "
5322 "guestfs daemon) that runs inside the qemu subprocess."
5326 #: ../src/guestfs-actions.pod:895 ../fish/guestfish-actions.pod:715
5328 "There is no comprehensive help for this command. You have to look at the "
5329 "file C<daemon/debug.c> in the libguestfs source to find out what you can do."
5333 #: ../src/guestfs-actions.pod:902
5334 msgid "guestfs_debug_upload"
5338 #: ../src/guestfs-actions.pod:904
5341 " int guestfs_debug_upload (guestfs_h *g,\n"
5342 "\t\tconst char *filename,\n"
5343 "\t\tconst char *tmpname,\n"
5349 #: ../src/guestfs-actions.pod:909
5351 "The C<guestfs_debug_upload> command uploads a file to the libguestfs "
5356 #: ../src/guestfs-actions.pod:912 ../fish/guestfish-actions.pod:726
5358 "There is no comprehensive help for this command. You have to look at the "
5359 "file C<daemon/debug.c> in the libguestfs source to find out what it is for."
5363 #: ../src/guestfs-actions.pod:918
5368 #: ../src/guestfs-actions.pod:920
5371 " char *guestfs_df (guestfs_h *g);\n"
5376 #: ../src/guestfs-actions.pod:922 ../fish/guestfish-actions.pod:736
5377 msgid "This command runs the C<df> command to report disk space used."
5381 #: ../src/guestfs-actions.pod:924 ../src/guestfs-actions.pod:938
5382 #: ../fish/guestfish-actions.pod:738 ../fish/guestfish-actions.pod:749
5384 "This command is mostly useful for interactive sessions. It is I<not> "
5385 "intended that you try to parse the output string. Use C<statvfs> from "
5390 #: ../src/guestfs-actions.pod:931
5391 msgid "guestfs_df_h"
5395 #: ../src/guestfs-actions.pod:933
5398 " char *guestfs_df_h (guestfs_h *g);\n"
5403 #: ../src/guestfs-actions.pod:935 ../fish/guestfish-actions.pod:746
5405 "This command runs the C<df -h> command to report disk space used in human-"
5410 #: ../src/guestfs-actions.pod:945
5411 msgid "guestfs_dmesg"
5415 #: ../src/guestfs-actions.pod:947
5418 " char *guestfs_dmesg (guestfs_h *g);\n"
5423 #: ../src/guestfs-actions.pod:949 ../fish/guestfish-actions.pod:757
5425 "This returns the kernel messages (C<dmesg> output) from the guest kernel. "
5426 "This is sometimes useful for extended debugging of problems."
5430 #: ../src/guestfs-actions.pod:953
5432 "Another way to get the same information is to enable verbose messages with "
5433 "C<guestfs_set_verbose> or by setting the environment variable "
5434 "C<LIBGUESTFS_DEBUG=1> before running the program."
5438 #: ../src/guestfs-actions.pod:961
5439 msgid "guestfs_download"
5443 #: ../src/guestfs-actions.pod:963
5446 " int guestfs_download (guestfs_h *g,\n"
5447 "\t\tconst char *remotefilename,\n"
5448 "\t\tconst char *filename);\n"
5453 #: ../src/guestfs-actions.pod:967 ../fish/guestfish-actions.pod:770
5455 "Download file C<remotefilename> and save it as C<filename> on the local "
5460 #: ../src/guestfs-actions.pod:970 ../src/guestfs-actions.pod:4924
5461 #: ../fish/guestfish-actions.pod:773 ../fish/guestfish-actions.pod:3798
5462 msgid "C<filename> can also be a named pipe."
5466 #: ../src/guestfs-actions.pod:972
5467 msgid "See also C<guestfs_upload>, C<guestfs_cat>."
5471 #: ../src/guestfs-actions.pod:981
5472 msgid "guestfs_drop_caches"
5476 #: ../src/guestfs-actions.pod:983
5479 " int guestfs_drop_caches (guestfs_h *g,\n"
5480 "\t\tint whattodrop);\n"
5485 #: ../src/guestfs-actions.pod:986 ../fish/guestfish-actions.pod:783
5487 "This instructs the guest kernel to drop its page cache, and/or dentries and "
5488 "inode caches. The parameter C<whattodrop> tells the kernel what precisely "
5489 "to drop, see L<http://linux-mm.org/Drop_Caches>"
5493 #: ../src/guestfs-actions.pod:991 ../fish/guestfish-actions.pod:788
5494 msgid "Setting C<whattodrop> to 3 should drop everything."
5498 #: ../src/guestfs-actions.pod:993 ../fish/guestfish-actions.pod:790
5500 "This automatically calls L<sync(2)> before the operation, so that the "
5501 "maximum guest memory is freed."
5505 #: ../src/guestfs-actions.pod:998
5510 #: ../src/guestfs-actions.pod:1000
5513 " int64_t guestfs_du (guestfs_h *g,\n"
5514 "\t\tconst char *path);\n"
5519 #: ../src/guestfs-actions.pod:1003 ../fish/guestfish-actions.pod:797
5521 "This command runs the C<du -s> command to estimate file space usage for "
5526 #: ../src/guestfs-actions.pod:1006 ../fish/guestfish-actions.pod:800
5528 "C<path> can be a file or a directory. If C<path> is a directory then the "
5529 "estimate includes the contents of the directory and all subdirectories "
5534 #: ../src/guestfs-actions.pod:1010 ../fish/guestfish-actions.pod:804
5536 "The result is the estimated size in I<kilobytes> (ie. units of 1024 bytes)."
5540 #: ../src/guestfs-actions.pod:1015
5541 msgid "guestfs_e2fsck_f"
5545 #: ../src/guestfs-actions.pod:1017
5548 " int guestfs_e2fsck_f (guestfs_h *g,\n"
5549 "\t\tconst char *device);\n"
5554 #: ../src/guestfs-actions.pod:1020 ../fish/guestfish-actions.pod:811
5556 "This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3 filesystem checker "
5557 "on C<device>, noninteractively (C<-p>), even if the filesystem appears to be "
5562 #: ../src/guestfs-actions.pod:1024
5564 "This command is only needed because of C<guestfs_resize2fs> (q.v.). "
5565 "Normally you should use C<guestfs_fsck>."
5569 #: ../src/guestfs-actions.pod:1029
5570 msgid "guestfs_echo_daemon"
5574 #: ../src/guestfs-actions.pod:1031
5577 " char *guestfs_echo_daemon (guestfs_h *g,\n"
5578 "\t\tchar *const *words);\n"
5583 #: ../src/guestfs-actions.pod:1034 ../fish/guestfish-actions.pod:822
5585 "This command concatenates the list of C<words> passed with single spaces "
5586 "between them and returns the resulting string."
5590 #: ../src/guestfs-actions.pod:1037 ../fish/guestfish-actions.pod:825
5591 msgid "You can use this command to test the connection through to the daemon."
5595 #: ../src/guestfs-actions.pod:1039
5596 msgid "See also C<guestfs_ping_daemon>."
5600 #: ../src/guestfs-actions.pod:1044
5601 msgid "guestfs_egrep"
5605 #: ../src/guestfs-actions.pod:1046
5608 " char **guestfs_egrep (guestfs_h *g,\n"
5609 "\t\tconst char *regex,\n"
5610 "\t\tconst char *path);\n"
5615 #: ../src/guestfs-actions.pod:1050 ../fish/guestfish-actions.pod:833
5617 "This calls the external C<egrep> program and returns the matching lines."
5621 #: ../src/guestfs-actions.pod:1060
5622 msgid "guestfs_egrepi"
5626 #: ../src/guestfs-actions.pod:1062
5629 " char **guestfs_egrepi (guestfs_h *g,\n"
5630 "\t\tconst char *regex,\n"
5631 "\t\tconst char *path);\n"
5636 #: ../src/guestfs-actions.pod:1066 ../fish/guestfish-actions.pod:843
5638 "This calls the external C<egrep -i> program and returns the matching lines."
5642 #: ../src/guestfs-actions.pod:1076
5643 msgid "guestfs_equal"
5647 #: ../src/guestfs-actions.pod:1078
5650 " int guestfs_equal (guestfs_h *g,\n"
5651 "\t\tconst char *file1,\n"
5652 "\t\tconst char *file2);\n"
5657 #: ../src/guestfs-actions.pod:1082 ../fish/guestfish-actions.pod:853
5659 "This compares the two files C<file1> and C<file2> and returns true if their "
5660 "content is exactly equal, or false otherwise."
5664 #: ../src/guestfs-actions.pod:1085 ../fish/guestfish-actions.pod:856
5665 msgid "The external L<cmp(1)> program is used for the comparison."
5669 #: ../src/guestfs-actions.pod:1089
5670 msgid "guestfs_exists"
5674 #: ../src/guestfs-actions.pod:1091
5677 " int guestfs_exists (guestfs_h *g,\n"
5678 "\t\tconst char *path);\n"
5683 #: ../src/guestfs-actions.pod:1094 ../fish/guestfish-actions.pod:862
5685 "This returns C<true> if and only if there is a file, directory (or anything) "
5686 "with the given C<path> name."
5690 #: ../src/guestfs-actions.pod:1097
5691 msgid "See also C<guestfs_is_file>, C<guestfs_is_dir>, C<guestfs_stat>."
5695 #: ../src/guestfs-actions.pod:1101
5696 msgid "guestfs_fallocate"
5700 #: ../src/guestfs-actions.pod:1103
5703 " int guestfs_fallocate (guestfs_h *g,\n"
5704 "\t\tconst char *path,\n"
5710 #: ../src/guestfs-actions.pod:1107 ../src/guestfs-actions.pod:1130
5711 #: ../fish/guestfish-actions.pod:871 ../fish/guestfish-actions.pod:890
5713 "This command preallocates a file (containing zero bytes) named C<path> of "
5714 "size C<len> bytes. If the file exists already, it is overwritten."
5718 #: ../src/guestfs-actions.pod:1111 ../fish/guestfish-actions.pod:875
5720 "Do not confuse this with the guestfish-specific C<alloc> command which "
5721 "allocates a file in the host and attaches it as a device."
5725 #: ../src/guestfs-actions.pod:1117 ../fish/guestfish-actions.pod:879
5727 "This function is deprecated. In new code, use the C<fallocate64> call "
5732 #: ../src/guestfs-actions.pod:1120 ../src/guestfs-actions.pod:1555
5733 #: ../src/guestfs-actions.pod:1573 ../src/guestfs-actions.pod:5279
5734 #: ../src/guestfs-actions.pod:5424 ../fish/guestfish-actions.pod:882
5735 #: ../fish/guestfish-actions.pod:1239 ../fish/guestfish-actions.pod:1253
5736 #: ../fish/guestfish-actions.pod:4051 ../fish/guestfish-actions.pod:4148
5738 "Deprecated functions will not be removed from the API, but the fact that "
5739 "they are deprecated indicates that there are problems with correct use of "
5744 #: ../src/guestfs-actions.pod:1124
5745 msgid "guestfs_fallocate64"
5749 #: ../src/guestfs-actions.pod:1126
5752 " int guestfs_fallocate64 (guestfs_h *g,\n"
5753 "\t\tconst char *path,\n"
5754 "\t\tint64_t len);\n"
5759 #: ../src/guestfs-actions.pod:1134
5761 "Note that this call allocates disk blocks for the file. To create a sparse "
5762 "file use C<guestfs_truncate_size> instead."
5766 #: ../src/guestfs-actions.pod:1137
5768 "The deprecated call C<guestfs_fallocate> does the same, but owing to an "
5769 "oversight it only allowed 30 bit lengths to be specified, effectively "
5770 "limiting the maximum size of files created through that call to 1GB."
5774 #: ../src/guestfs-actions.pod:1142 ../fish/guestfish-actions.pod:902
5776 "Do not confuse this with the guestfish-specific C<alloc> and C<sparse> "
5777 "commands which create a file in the host and attach it as a device."
5781 #: ../src/guestfs-actions.pod:1148
5782 msgid "guestfs_fgrep"
5786 #: ../src/guestfs-actions.pod:1150
5789 " char **guestfs_fgrep (guestfs_h *g,\n"
5790 "\t\tconst char *pattern,\n"
5791 "\t\tconst char *path);\n"
5796 #: ../src/guestfs-actions.pod:1154 ../fish/guestfish-actions.pod:910
5798 "This calls the external C<fgrep> program and returns the matching lines."
5802 #: ../src/guestfs-actions.pod:1164
5803 msgid "guestfs_fgrepi"
5807 #: ../src/guestfs-actions.pod:1166
5810 " char **guestfs_fgrepi (guestfs_h *g,\n"
5811 "\t\tconst char *pattern,\n"
5812 "\t\tconst char *path);\n"
5817 #: ../src/guestfs-actions.pod:1170 ../fish/guestfish-actions.pod:920
5819 "This calls the external C<fgrep -i> program and returns the matching lines."
5823 #: ../src/guestfs-actions.pod:1180
5824 msgid "guestfs_file"
5828 #: ../src/guestfs-actions.pod:1182
5831 " char *guestfs_file (guestfs_h *g,\n"
5832 "\t\tconst char *path);\n"
5837 #: ../src/guestfs-actions.pod:1185 ../fish/guestfish-actions.pod:930
5839 "This call uses the standard L<file(1)> command to determine the type or "
5840 "contents of the file."
5844 #: ../src/guestfs-actions.pod:1188 ../fish/guestfish-actions.pod:933
5846 "This call will also transparently look inside various types of compressed "
5851 #: ../src/guestfs-actions.pod:1191 ../fish/guestfish-actions.pod:936
5853 "The exact command which runs is C<file -zb path>. Note in particular that "
5854 "the filename is not prepended to the output (the C<-b> option)."
5858 #: ../src/guestfs-actions.pod:1195
5860 "This command can also be used on C</dev/> devices (and partitions, LV "
5861 "names). You can for example use this to determine if a device contains a "
5862 "filesystem, although it's usually better to use C<guestfs_vfs_type>."
5866 #: ../src/guestfs-actions.pod:1200 ../fish/guestfish-actions.pod:945
5868 "If the C<path> does not begin with C</dev/> then this command only works for "
5869 "the content of regular files. For other file types (directory, symbolic "
5870 "link etc) it will just return the string C<directory> etc."
5874 #: ../src/guestfs-actions.pod:1208
5875 msgid "guestfs_file_architecture"
5879 #: ../src/guestfs-actions.pod:1210
5882 " char *guestfs_file_architecture (guestfs_h *g,\n"
5883 "\t\tconst char *filename);\n"
5888 #: ../src/guestfs-actions.pod:1213 ../fish/guestfish-actions.pod:954
5890 "This detects the architecture of the binary C<filename>, and returns it if "
5895 #: ../src/guestfs-actions.pod:1216 ../fish/guestfish-actions.pod:957
5896 msgid "Currently defined architectures are:"
5900 #: ../src/guestfs-actions.pod:1220 ../fish/guestfish-actions.pod:961
5905 #: ../src/guestfs-actions.pod:1222 ../fish/guestfish-actions.pod:963
5907 "This string is returned for all 32 bit i386, i486, i586, i686 binaries "
5908 "irrespective of the precise processor requirements of the binary."
5912 #: ../src/guestfs-actions.pod:1225 ../fish/guestfish-actions.pod:966
5917 #: ../src/guestfs-actions.pod:1227 ../fish/guestfish-actions.pod:968
5918 msgid "64 bit x86-64."
5922 #: ../src/guestfs-actions.pod:1229 ../fish/guestfish-actions.pod:970
5927 #: ../src/guestfs-actions.pod:1231 ../fish/guestfish-actions.pod:972
5928 msgid "32 bit SPARC."
5932 #: ../src/guestfs-actions.pod:1233 ../fish/guestfish-actions.pod:974
5937 #: ../src/guestfs-actions.pod:1235 ../fish/guestfish-actions.pod:976
5938 msgid "64 bit SPARC V9 and above."
5942 #: ../src/guestfs-actions.pod:1237 ../fish/guestfish-actions.pod:978
5947 #: ../src/guestfs-actions.pod:1239 ../fish/guestfish-actions.pod:980
5948 msgid "Intel Itanium."
5952 #: ../src/guestfs-actions.pod:1241 ../fish/guestfish-actions.pod:982
5957 #: ../src/guestfs-actions.pod:1243 ../fish/guestfish-actions.pod:984
5958 msgid "32 bit Power PC."
5962 #: ../src/guestfs-actions.pod:1245 ../fish/guestfish-actions.pod:986
5967 #: ../src/guestfs-actions.pod:1247 ../fish/guestfish-actions.pod:988
5968 msgid "64 bit Power PC."
5972 #: ../src/guestfs-actions.pod:1251 ../fish/guestfish-actions.pod:992
5973 msgid "Libguestfs may return other architecture strings in future."
5977 #: ../src/guestfs-actions.pod:1253 ../fish/guestfish-actions.pod:994
5978 msgid "The function works on at least the following types of files:"
5982 #: ../src/guestfs-actions.pod:1259 ../fish/guestfish-actions.pod:1000
5983 msgid "many types of Un*x and Linux binary"
5987 #: ../src/guestfs-actions.pod:1263 ../fish/guestfish-actions.pod:1004
5988 msgid "many types of Un*x and Linux shared library"
5992 #: ../src/guestfs-actions.pod:1267 ../fish/guestfish-actions.pod:1008
5993 msgid "Windows Win32 and Win64 binaries"
5997 #: ../src/guestfs-actions.pod:1271 ../fish/guestfish-actions.pod:1012
5998 msgid "Windows Win32 and Win64 DLLs"
6002 #: ../src/guestfs-actions.pod:1273 ../fish/guestfish-actions.pod:1014
6003 msgid "Win32 binaries and DLLs return C<i386>."
6007 #: ../src/guestfs-actions.pod:1275 ../fish/guestfish-actions.pod:1016
6008 msgid "Win64 binaries and DLLs return C<x86_64>."
6012 #: ../src/guestfs-actions.pod:1279 ../fish/guestfish-actions.pod:1020
6013 msgid "Linux kernel modules"
6017 #: ../src/guestfs-actions.pod:1283 ../fish/guestfish-actions.pod:1024
6018 msgid "Linux new-style initrd images"
6022 #: ../src/guestfs-actions.pod:1287 ../fish/guestfish-actions.pod:1028
6023 msgid "some non-x86 Linux vmlinuz kernels"
6027 #: ../src/guestfs-actions.pod:1291 ../fish/guestfish-actions.pod:1032
6028 msgid "What it can't do currently:"
6032 #: ../src/guestfs-actions.pod:1297 ../fish/guestfish-actions.pod:1038
6033 msgid "static libraries (libfoo.a)"
6037 #: ../src/guestfs-actions.pod:1301 ../fish/guestfish-actions.pod:1042
6038 msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)"
6042 #: ../src/guestfs-actions.pod:1305 ../fish/guestfish-actions.pod:1046
6043 msgid "x86 Linux vmlinuz kernels"
6047 #: ../src/guestfs-actions.pod:1307 ../fish/guestfish-actions.pod:1048
6049 "x86 vmlinuz images (bzImage format) consist of a mix of 16-, 32- and "
6050 "compressed code, and are horribly hard to unpack. If you want to find the "
6051 "architecture of a kernel, use the architecture of the associated initrd or "
6052 "kernel module(s) instead."
6056 #: ../src/guestfs-actions.pod:1317
6057 msgid "guestfs_filesize"
6061 #: ../src/guestfs-actions.pod:1319
6064 " int64_t guestfs_filesize (guestfs_h *g,\n"
6065 "\t\tconst char *file);\n"
6070 #: ../src/guestfs-actions.pod:1322 ../fish/guestfish-actions.pod:1059
6071 msgid "This command returns the size of C<file> in bytes."
6075 #: ../src/guestfs-actions.pod:1324
6077 "To get other stats about a file, use C<guestfs_stat>, C<guestfs_lstat>, "
6078 "C<guestfs_is_dir>, C<guestfs_is_file> etc. To get the size of block "
6079 "devices, use C<guestfs_blockdev_getsize64>."
6083 #: ../src/guestfs-actions.pod:1330
6084 msgid "guestfs_fill"
6088 #: ../src/guestfs-actions.pod:1332
6091 " int guestfs_fill (guestfs_h *g,\n"
6094 "\t\tconst char *path);\n"
6099 #: ../src/guestfs-actions.pod:1337 ../fish/guestfish-actions.pod:1069
6101 "This command creates a new file called C<path>. The initial content of the "
6102 "file is C<len> octets of C<c>, where C<c> must be a number in the range C<"
6107 #: ../src/guestfs-actions.pod:1341
6109 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
6110 "C<guestfs_truncate_size>. To create a file with a pattern of repeating "
6111 "bytes use C<guestfs_fill_pattern>."
6115 #: ../src/guestfs-actions.pod:1353
6116 msgid "guestfs_fill_pattern"
6120 #: ../src/guestfs-actions.pod:1355
6123 " int guestfs_fill_pattern (guestfs_h *g,\n"
6124 "\t\tconst char *pattern,\n"
6126 "\t\tconst char *path);\n"
6131 #: ../src/guestfs-actions.pod:1360
6133 "This function is like C<guestfs_fill> except that it creates a new file of "
6134 "length C<len> containing the repeating pattern of bytes in C<pattern>. The "
6135 "pattern is truncated if necessary to ensure the length of the file is "
6136 "exactly C<len> bytes."
6140 #: ../src/guestfs-actions.pod:1372
6141 msgid "guestfs_find"
6145 #: ../src/guestfs-actions.pod:1374
6148 " char **guestfs_find (guestfs_h *g,\n"
6149 "\t\tconst char *directory);\n"
6154 #: ../src/guestfs-actions.pod:1377 ../fish/guestfish-actions.pod:1091
6156 "This command lists out all files and directories, recursively, starting at "
6157 "C<directory>. It is essentially equivalent to running the shell command "
6158 "C<find directory -print> but some post-processing happens on the output, "
6163 #: ../src/guestfs-actions.pod:1382 ../fish/guestfish-actions.pod:1096
6165 "This returns a list of strings I<without any prefix>. Thus if the directory "
6170 #: ../src/guestfs-actions.pod:1385 ../fish/guestfish-actions.pod:1099
6180 #: ../src/guestfs-actions.pod:1389
6182 "then the returned list from C<guestfs_find> C</tmp> would be 4 elements:"
6186 #: ../src/guestfs-actions.pod:1392 ../fish/guestfish-actions.pod:1106
6197 #: ../src/guestfs-actions.pod:1397 ../fish/guestfish-actions.pod:1111
6198 msgid "If C<directory> is not a directory, then this command returns an error."
6202 #: ../src/guestfs-actions.pod:1400 ../fish/guestfish-actions.pod:1114
6203 msgid "The returned list is sorted."
6207 #: ../src/guestfs-actions.pod:1402
6208 msgid "See also C<guestfs_find0>."
6212 #: ../src/guestfs-actions.pod:1411
6213 msgid "guestfs_find0"
6217 #: ../src/guestfs-actions.pod:1413
6220 " int guestfs_find0 (guestfs_h *g,\n"
6221 "\t\tconst char *directory,\n"
6222 "\t\tconst char *files);\n"
6227 #: ../src/guestfs-actions.pod:1417 ../fish/guestfish-actions.pod:1125
6229 "This command lists out all files and directories, recursively, starting at "
6230 "C<directory>, placing the resulting list in the external file called "
6235 #: ../src/guestfs-actions.pod:1421
6237 "This command works the same way as C<guestfs_find> with the following "
6242 #: ../src/guestfs-actions.pod:1428 ../fish/guestfish-actions.pod:1136
6243 msgid "The resulting list is written to an external file."
6247 #: ../src/guestfs-actions.pod:1432 ../fish/guestfish-actions.pod:1140
6249 "Items (filenames) in the result are separated by C<\\0> characters. See "
6250 "L<find(1)> option I<-print0>."
6254 #: ../src/guestfs-actions.pod:1437 ../fish/guestfish-actions.pod:1145
6255 msgid "This command is not limited in the number of names that it can return."
6259 #: ../src/guestfs-actions.pod:1442 ../fish/guestfish-actions.pod:1150
6260 msgid "The result list is not sorted."
6264 #: ../src/guestfs-actions.pod:1448
6265 msgid "guestfs_findfs_label"
6269 #: ../src/guestfs-actions.pod:1450
6272 " char *guestfs_findfs_label (guestfs_h *g,\n"
6273 "\t\tconst char *label);\n"
6278 #: ../src/guestfs-actions.pod:1453 ../fish/guestfish-actions.pod:1160
6280 "This command searches the filesystems and returns the one which has the "
6281 "given label. An error is returned if no such filesystem can be found."
6285 #: ../src/guestfs-actions.pod:1457
6286 msgid "To find the label of a filesystem, use C<guestfs_vfs_label>."
6290 #: ../src/guestfs-actions.pod:1462
6291 msgid "guestfs_findfs_uuid"
6295 #: ../src/guestfs-actions.pod:1464
6298 " char *guestfs_findfs_uuid (guestfs_h *g,\n"
6299 "\t\tconst char *uuid);\n"
6304 #: ../src/guestfs-actions.pod:1467 ../fish/guestfish-actions.pod:1170
6306 "This command searches the filesystems and returns the one which has the "
6307 "given UUID. An error is returned if no such filesystem can be found."
6311 #: ../src/guestfs-actions.pod:1471
6312 msgid "To find the UUID of a filesystem, use C<guestfs_vfs_uuid>."
6316 #: ../src/guestfs-actions.pod:1476
6317 msgid "guestfs_fsck"
6321 #: ../src/guestfs-actions.pod:1478
6324 " int guestfs_fsck (guestfs_h *g,\n"
6325 "\t\tconst char *fstype,\n"
6326 "\t\tconst char *device);\n"
6331 #: ../src/guestfs-actions.pod:1482 ../fish/guestfish-actions.pod:1180
6333 "This runs the filesystem checker (fsck) on C<device> which should have "
6334 "filesystem type C<fstype>."
6338 #: ../src/guestfs-actions.pod:1485 ../fish/guestfish-actions.pod:1183
6340 "The returned integer is the status. See L<fsck(8)> for the list of status "
6341 "codes from C<fsck>."
6345 #: ../src/guestfs-actions.pod:1494 ../fish/guestfish-actions.pod:1192
6346 msgid "Multiple status codes can be summed together."
6350 #: ../src/guestfs-actions.pod:1498 ../fish/guestfish-actions.pod:1196
6352 "A non-zero return code can mean \"success\", for example if errors have been "
6353 "corrected on the filesystem."
6357 #: ../src/guestfs-actions.pod:1503 ../fish/guestfish-actions.pod:1201
6358 msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)."
6362 #: ../src/guestfs-actions.pod:1508 ../fish/guestfish-actions.pod:1206
6364 "This command is entirely equivalent to running C<fsck -a -t fstype device>."
6368 #: ../src/guestfs-actions.pod:1512
6369 msgid "guestfs_get_append"
6373 #: ../src/guestfs-actions.pod:1514
6376 " const char *guestfs_get_append (guestfs_h *g);\n"
6381 #: ../src/guestfs-actions.pod:1516 ../fish/guestfish-actions.pod:1212
6383 "Return the additional kernel options which are added to the guest kernel "
6388 #: ../src/guestfs-actions.pod:1519 ../fish/guestfish-actions.pod:1215
6389 msgid "If C<NULL> then no options are added."
6393 #: ../src/guestfs-actions.pod:1521
6395 "This function returns a string which may be NULL. There is no way to return "
6396 "an error from this function. The string is owned by the guest handle and "
6397 "must I<not> be freed."
6401 #: ../src/guestfs-actions.pod:1525
6402 msgid "guestfs_get_autosync"
6406 #: ../src/guestfs-actions.pod:1527
6409 " int guestfs_get_autosync (guestfs_h *g);\n"
6414 #: ../src/guestfs-actions.pod:1529 ../fish/guestfish-actions.pod:1221
6415 msgid "Get the autosync flag."
6419 #: ../src/guestfs-actions.pod:1533
6420 msgid "guestfs_get_direct"
6424 #: ../src/guestfs-actions.pod:1535
6427 " int guestfs_get_direct (guestfs_h *g);\n"
6432 #: ../src/guestfs-actions.pod:1537 ../fish/guestfish-actions.pod:1227
6433 msgid "Return the direct appliance mode flag."
6437 #: ../src/guestfs-actions.pod:1541
6438 msgid "guestfs_get_e2label"
6442 #: ../src/guestfs-actions.pod:1543
6445 " char *guestfs_get_e2label (guestfs_h *g,\n"
6446 "\t\tconst char *device);\n"
6451 #: ../src/guestfs-actions.pod:1546 ../fish/guestfish-actions.pod:1233
6453 "This returns the ext2/3/4 filesystem label of the filesystem on C<device>."
6457 #: ../src/guestfs-actions.pod:1552 ../fish/guestfish-actions.pod:1236
6459 "This function is deprecated. In new code, use the C<vfs_label> call instead."
6463 #: ../src/guestfs-actions.pod:1559
6464 msgid "guestfs_get_e2uuid"
6468 #: ../src/guestfs-actions.pod:1561
6471 " char *guestfs_get_e2uuid (guestfs_h *g,\n"
6472 "\t\tconst char *device);\n"
6477 #: ../src/guestfs-actions.pod:1564 ../fish/guestfish-actions.pod:1247
6479 "This returns the ext2/3/4 filesystem UUID of the filesystem on C<device>."
6483 #: ../src/guestfs-actions.pod:1570 ../fish/guestfish-actions.pod:1250
6485 "This function is deprecated. In new code, use the C<vfs_uuid> call instead."
6489 #: ../src/guestfs-actions.pod:1577
6490 msgid "guestfs_get_memsize"
6494 #: ../src/guestfs-actions.pod:1579
6497 " int guestfs_get_memsize (guestfs_h *g);\n"
6502 #: ../src/guestfs-actions.pod:1581 ../fish/guestfish-actions.pod:1261
6504 "This gets the memory size in megabytes allocated to the qemu subprocess."
6508 #: ../src/guestfs-actions.pod:1584
6510 "If C<guestfs_set_memsize> was not called on this handle, and if "
6511 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
6512 "value for memsize."
6516 #: ../src/guestfs-actions.pod:1588 ../src/guestfs-actions.pod:1651
6517 #: ../src/guestfs-actions.pod:4177 ../src/guestfs-actions.pod:4269
6518 #: ../fish/guestfish-actions.pod:1268 ../fish/guestfish-actions.pod:1317
6519 #: ../fish/guestfish-actions.pod:3223 ../fish/guestfish-actions.pod:3300
6521 "For more information on the architecture of libguestfs, see L<guestfs(3)>."
6525 #: ../src/guestfs-actions.pod:1593
6526 msgid "guestfs_get_network"
6530 #: ../src/guestfs-actions.pod:1595
6533 " int guestfs_get_network (guestfs_h *g);\n"
6538 #: ../src/guestfs-actions.pod:1597 ../fish/guestfish-actions.pod:1275
6539 msgid "This returns the enable network flag."
6543 #: ../src/guestfs-actions.pod:1601
6544 msgid "guestfs_get_path"
6548 #: ../src/guestfs-actions.pod:1603
6551 " const char *guestfs_get_path (guestfs_h *g);\n"
6556 #: ../src/guestfs-actions.pod:1605 ../fish/guestfish-actions.pod:1281
6557 msgid "Return the current search path."
6561 #: ../src/guestfs-actions.pod:1607 ../fish/guestfish-actions.pod:1283
6563 "This is always non-NULL. If it wasn't set already, then this will return "
6568 #: ../src/guestfs-actions.pod:1610 ../src/guestfs-actions.pod:1633
6570 "This function returns a string, or NULL on error. The string is owned by "
6571 "the guest handle and must I<not> be freed."
6575 #: ../src/guestfs-actions.pod:1613
6576 msgid "guestfs_get_pid"
6580 #: ../src/guestfs-actions.pod:1615
6583 " int guestfs_get_pid (guestfs_h *g);\n"
6588 #: ../src/guestfs-actions.pod:1617 ../fish/guestfish-actions.pod:1290
6590 "Return the process ID of the qemu subprocess. If there is no qemu "
6591 "subprocess, then this will return an error."
6595 #: ../src/guestfs-actions.pod:1620 ../fish/guestfish-actions.pod:1293
6596 msgid "This is an internal call used for debugging and testing."
6600 #: ../src/guestfs-actions.pod:1624
6601 msgid "guestfs_get_qemu"
6605 #: ../src/guestfs-actions.pod:1626
6608 " const char *guestfs_get_qemu (guestfs_h *g);\n"
6613 #: ../src/guestfs-actions.pod:1628 ../fish/guestfish-actions.pod:1299
6614 msgid "Return the current qemu binary."
6618 #: ../src/guestfs-actions.pod:1630 ../fish/guestfish-actions.pod:1301
6620 "This is always non-NULL. If it wasn't set already, then this will return "
6621 "the default qemu binary name."
6625 #: ../src/guestfs-actions.pod:1636
6626 msgid "guestfs_get_recovery_proc"
6630 #: ../src/guestfs-actions.pod:1638
6633 " int guestfs_get_recovery_proc (guestfs_h *g);\n"
6638 #: ../src/guestfs-actions.pod:1640 ../fish/guestfish-actions.pod:1308
6639 msgid "Return the recovery process enabled flag."
6643 #: ../src/guestfs-actions.pod:1644
6644 msgid "guestfs_get_selinux"
6648 #: ../src/guestfs-actions.pod:1646
6651 " int guestfs_get_selinux (guestfs_h *g);\n"
6656 #: ../src/guestfs-actions.pod:1648
6658 "This returns the current setting of the selinux flag which is passed to the "
6659 "appliance at boot time. See C<guestfs_set_selinux>."
6663 #: ../src/guestfs-actions.pod:1656
6664 msgid "guestfs_get_state"
6668 #: ../src/guestfs-actions.pod:1658
6671 " int guestfs_get_state (guestfs_h *g);\n"
6676 #: ../src/guestfs-actions.pod:1660 ../fish/guestfish-actions.pod:1324
6678 "This returns the current state as an opaque integer. This is only useful "
6679 "for printing debug and internal error messages."
6683 #: ../src/guestfs-actions.pod:1663 ../src/guestfs-actions.pod:2270
6684 #: ../src/guestfs-actions.pod:2281 ../src/guestfs-actions.pod:2318
6685 #: ../src/guestfs-actions.pod:2339 ../fish/guestfish-actions.pod:1327
6686 #: ../fish/guestfish-actions.pod:1810 ../fish/guestfish-actions.pod:1819
6687 #: ../fish/guestfish-actions.pod:1848 ../fish/guestfish-actions.pod:1864
6688 msgid "For more information on states, see L<guestfs(3)>."
6692 #: ../src/guestfs-actions.pod:1667
6693 msgid "guestfs_get_trace"
6697 #: ../src/guestfs-actions.pod:1669
6700 " int guestfs_get_trace (guestfs_h *g);\n"
6705 #: ../src/guestfs-actions.pod:1671 ../fish/guestfish-actions.pod:1333
6706 msgid "Return the command trace flag."
6710 #: ../src/guestfs-actions.pod:1675
6711 msgid "guestfs_get_umask"
6715 #: ../src/guestfs-actions.pod:1677
6718 " int guestfs_get_umask (guestfs_h *g);\n"
6723 #: ../src/guestfs-actions.pod:1679
6725 "Return the current umask. By default the umask is C<022> unless it has been "
6726 "set by calling C<guestfs_umask>."
6730 #: ../src/guestfs-actions.pod:1684
6731 msgid "guestfs_get_verbose"
6735 #: ../src/guestfs-actions.pod:1686
6738 " int guestfs_get_verbose (guestfs_h *g);\n"
6743 #: ../src/guestfs-actions.pod:1688 ../fish/guestfish-actions.pod:1346
6744 msgid "This returns the verbose messages flag."
6748 #: ../src/guestfs-actions.pod:1692
6749 msgid "guestfs_getcon"
6753 #: ../src/guestfs-actions.pod:1694
6756 " char *guestfs_getcon (guestfs_h *g);\n"
6761 #: ../src/guestfs-actions.pod:1696 ../fish/guestfish-actions.pod:1352
6762 msgid "This gets the SELinux security context of the daemon."
6766 #: ../src/guestfs-actions.pod:1698
6768 "See the documentation about SELINUX in L<guestfs(3)>, and C<guestfs_setcon>"
6772 #: ../src/guestfs-actions.pod:1704
6773 msgid "guestfs_getxattrs"
6777 #: ../src/guestfs-actions.pod:1706
6780 " struct guestfs_xattr_list *guestfs_getxattrs (guestfs_h *g,\n"
6781 "\t\tconst char *path);\n"
6786 #: ../src/guestfs-actions.pod:1709 ../fish/guestfish-actions.pod:1361
6788 "This call lists the extended attributes of the file or directory C<path>."
6792 #: ../src/guestfs-actions.pod:1712 ../fish/guestfish-actions.pod:1364
6794 "At the system call level, this is a combination of the L<listxattr(2)> and "
6795 "L<getxattr(2)> calls."
6799 #: ../src/guestfs-actions.pod:1715
6800 msgid "See also: C<guestfs_lgetxattrs>, L<attr(5)>."
6804 #: ../src/guestfs-actions.pod:1717 ../src/guestfs-actions.pod:2389
6805 #: ../src/guestfs-actions.pod:2884
6807 "This function returns a C<struct guestfs_xattr_list *> (see E<lt>guestfs-"
6808 "structs.hE<gt>), or NULL if there was an error. I<The caller must call "
6809 "C<guestfs_free_xattr_list> after use>."
6813 #: ../src/guestfs-actions.pod:1722
6814 msgid "guestfs_glob_expand"
6818 #: ../src/guestfs-actions.pod:1724
6821 " char **guestfs_glob_expand (guestfs_h *g,\n"
6822 "\t\tconst char *pattern);\n"
6827 #: ../src/guestfs-actions.pod:1727 ../fish/guestfish-actions.pod:1373
6829 "This command searches for all the pathnames matching C<pattern> according to "
6830 "the wildcard expansion rules used by the shell."
6834 #: ../src/guestfs-actions.pod:1731 ../fish/guestfish-actions.pod:1377
6836 "If no paths match, then this returns an empty list (note: not an error)."
6840 #: ../src/guestfs-actions.pod:1734 ../fish/guestfish-actions.pod:1380
6842 "It is just a wrapper around the C L<glob(3)> function with flags C<GLOB_MARK|"
6843 "GLOB_BRACE>. See that manual page for more details."
6847 #: ../src/guestfs-actions.pod:1742
6848 msgid "guestfs_grep"
6852 #: ../src/guestfs-actions.pod:1744
6855 " char **guestfs_grep (guestfs_h *g,\n"
6856 "\t\tconst char *regex,\n"
6857 "\t\tconst char *path);\n"
6862 #: ../src/guestfs-actions.pod:1748 ../fish/guestfish-actions.pod:1388
6863 msgid "This calls the external C<grep> program and returns the matching lines."
6867 #: ../src/guestfs-actions.pod:1758
6868 msgid "guestfs_grepi"
6872 #: ../src/guestfs-actions.pod:1760
6875 " char **guestfs_grepi (guestfs_h *g,\n"
6876 "\t\tconst char *regex,\n"
6877 "\t\tconst char *path);\n"
6882 #: ../src/guestfs-actions.pod:1764 ../fish/guestfish-actions.pod:1398
6884 "This calls the external C<grep -i> program and returns the matching lines."
6888 #: ../src/guestfs-actions.pod:1774
6889 msgid "guestfs_grub_install"
6893 #: ../src/guestfs-actions.pod:1776
6896 " int guestfs_grub_install (guestfs_h *g,\n"
6897 "\t\tconst char *root,\n"
6898 "\t\tconst char *device);\n"
6903 #: ../src/guestfs-actions.pod:1780 ../fish/guestfish-actions.pod:1408
6905 "This command installs GRUB (the Grand Unified Bootloader) on C<device>, with "
6906 "the root directory being C<root>."
6910 #: ../src/guestfs-actions.pod:1783 ../fish/guestfish-actions.pod:1411
6912 "Note: If grub-install reports the error \"No suitable drive was found in the "
6913 "generated device map.\" it may be that you need to create a C</boot/grub/"
6914 "device.map> file first that contains the mapping between grub device names "
6915 "and Linux device names. It is usually sufficient to create a file "
6920 #: ../src/guestfs-actions.pod:1790 ../fish/guestfish-actions.pod:1418
6928 #: ../src/guestfs-actions.pod:1792 ../fish/guestfish-actions.pod:1420
6929 msgid "replacing C</dev/vda> with the name of the installation device."
6933 #: ../src/guestfs-actions.pod:1796
6934 msgid "guestfs_head"
6938 #: ../src/guestfs-actions.pod:1798
6941 " char **guestfs_head (guestfs_h *g,\n"
6942 "\t\tconst char *path);\n"
6947 #: ../src/guestfs-actions.pod:1801 ../fish/guestfish-actions.pod:1426
6949 "This command returns up to the first 10 lines of a file as a list of strings."
6953 #: ../src/guestfs-actions.pod:1811
6954 msgid "guestfs_head_n"
6958 #: ../src/guestfs-actions.pod:1813
6961 " char **guestfs_head_n (guestfs_h *g,\n"
6962 "\t\tint nrlines,\n"
6963 "\t\tconst char *path);\n"
6968 #: ../src/guestfs-actions.pod:1817 ../fish/guestfish-actions.pod:1436
6970 "If the parameter C<nrlines> is a positive number, this returns the first "
6971 "C<nrlines> lines of the file C<path>."
6975 #: ../src/guestfs-actions.pod:1820 ../fish/guestfish-actions.pod:1439
6977 "If the parameter C<nrlines> is a negative number, this returns lines from "
6978 "the file C<path>, excluding the last C<nrlines> lines."
6982 #: ../src/guestfs-actions.pod:1823 ../src/guestfs-actions.pod:4725
6983 #: ../fish/guestfish-actions.pod:1442 ../fish/guestfish-actions.pod:3642
6984 msgid "If the parameter C<nrlines> is zero, this returns an empty list."
6988 #: ../src/guestfs-actions.pod:1832
6989 msgid "guestfs_hexdump"
6993 #: ../src/guestfs-actions.pod:1834
6996 " char *guestfs_hexdump (guestfs_h *g,\n"
6997 "\t\tconst char *path);\n"
7002 #: ../src/guestfs-actions.pod:1837 ../fish/guestfish-actions.pod:1451
7004 "This runs C<hexdump -C> on the given C<path>. The result is the human-"
7005 "readable, canonical hex dump of the file."
7009 #: ../src/guestfs-actions.pod:1846
7010 msgid "guestfs_initrd_cat"
7014 #: ../src/guestfs-actions.pod:1848
7017 " char *guestfs_initrd_cat (guestfs_h *g,\n"
7018 "\t\tconst char *initrdpath,\n"
7019 "\t\tconst char *filename,\n"
7020 "\t\tsize_t *size_r);\n"
7025 #: ../src/guestfs-actions.pod:1853 ../fish/guestfish-actions.pod:1461
7027 "This command unpacks the file C<filename> from the initrd file called "
7028 "C<initrdpath>. The filename must be given I<without> the initial C</> "
7033 #: ../src/guestfs-actions.pod:1857 ../fish/guestfish-actions.pod:1465
7035 "For example, in guestfish you could use the following command to examine the "
7036 "boot script (usually called C</init>) contained in a Linux initrd or "
7041 #: ../src/guestfs-actions.pod:1861 ../fish/guestfish-actions.pod:1469
7044 " initrd-cat /boot/initrd-<version>.img init\n"
7049 #: ../src/guestfs-actions.pod:1863
7050 msgid "See also C<guestfs_initrd_list>."
7054 #: ../src/guestfs-actions.pod:1865 ../src/guestfs-actions.pod:3683
7055 #: ../src/guestfs-actions.pod:3812
7057 "This function returns a buffer, or NULL on error. The size of the returned "
7058 "buffer is written to C<*size_r>. I<The caller must free the returned buffer "
7063 #: ../src/guestfs-actions.pod:1872
7064 msgid "guestfs_initrd_list"
7068 #: ../src/guestfs-actions.pod:1874
7071 " char **guestfs_initrd_list (guestfs_h *g,\n"
7072 "\t\tconst char *path);\n"
7077 #: ../src/guestfs-actions.pod:1877 ../fish/guestfish-actions.pod:1480
7078 msgid "This command lists out files contained in an initrd."
7082 #: ../src/guestfs-actions.pod:1879 ../fish/guestfish-actions.pod:1482
7084 "The files are listed without any initial C</> character. The files are "
7085 "listed in the order they appear (not necessarily alphabetical). Directory "
7086 "names are listed as separate items."
7090 #: ../src/guestfs-actions.pod:1883 ../fish/guestfish-actions.pod:1486
7092 "Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as "
7093 "initrd. We I<only> support the newer initramfs format (compressed cpio "
7098 #: ../src/guestfs-actions.pod:1891
7099 msgid "guestfs_inotify_add_watch"
7103 #: ../src/guestfs-actions.pod:1893
7106 " int64_t guestfs_inotify_add_watch (guestfs_h *g,\n"
7107 "\t\tconst char *path,\n"
7113 #: ../src/guestfs-actions.pod:1897 ../fish/guestfish-actions.pod:1494
7114 msgid "Watch C<path> for the events listed in C<mask>."
7118 #: ../src/guestfs-actions.pod:1899 ../fish/guestfish-actions.pod:1496
7120 "Note that if C<path> is a directory then events within that directory are "
7121 "watched, but this does I<not> happen recursively (in subdirectories)."
7125 #: ../src/guestfs-actions.pod:1903 ../fish/guestfish-actions.pod:1500
7127 "Note for non-C or non-Linux callers: the inotify events are defined by the "
7128 "Linux kernel ABI and are listed in C</usr/include/sys/inotify.h>."
7132 #: ../src/guestfs-actions.pod:1909
7133 msgid "guestfs_inotify_close"
7137 #: ../src/guestfs-actions.pod:1911
7140 " int guestfs_inotify_close (guestfs_h *g);\n"
7145 #: ../src/guestfs-actions.pod:1913 ../fish/guestfish-actions.pod:1508
7147 "This closes the inotify handle which was previously opened by inotify_init. "
7148 "It removes all watches, throws away any pending events, and deallocates all "
7153 #: ../src/guestfs-actions.pod:1919
7154 msgid "guestfs_inotify_files"
7158 #: ../src/guestfs-actions.pod:1921
7161 " char **guestfs_inotify_files (guestfs_h *g);\n"
7166 #: ../src/guestfs-actions.pod:1923
7168 "This function is a helpful wrapper around C<guestfs_inotify_read> which just "
7169 "returns a list of pathnames of objects that were touched. The returned "
7170 "pathnames are sorted and deduplicated."
7174 #: ../src/guestfs-actions.pod:1931
7175 msgid "guestfs_inotify_init"
7179 #: ../src/guestfs-actions.pod:1933
7182 " int guestfs_inotify_init (guestfs_h *g,\n"
7183 "\t\tint maxevents);\n"
7188 #: ../src/guestfs-actions.pod:1936 ../fish/guestfish-actions.pod:1524
7190 "This command creates a new inotify handle. The inotify subsystem can be "
7191 "used to notify events which happen to objects in the guest filesystem."
7195 #: ../src/guestfs-actions.pod:1940
7197 "C<maxevents> is the maximum number of events which will be queued up between "
7198 "calls to C<guestfs_inotify_read> or C<guestfs_inotify_files>. If this is "
7199 "passed as C<0>, then the kernel (or previously set) default is used. For "
7200 "Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel "
7201 "throws away events, but records the fact that it threw them away by setting "
7202 "a flag C<IN_Q_OVERFLOW> in the returned structure list (see "
7203 "C<guestfs_inotify_read>)."
7207 #: ../src/guestfs-actions.pod:1950
7209 "Before any events are generated, you have to add some watches to the "
7210 "internal watch list. See: C<guestfs_inotify_add_watch>, "
7211 "C<guestfs_inotify_rm_watch> and C<guestfs_inotify_watch_all>."
7215 #: ../src/guestfs-actions.pod:1956
7217 "Queued up events should be read periodically by calling "
7218 "C<guestfs_inotify_read> (or C<guestfs_inotify_files> which is just a helpful "
7219 "wrapper around C<guestfs_inotify_read>). If you don't read the events out "
7220 "often enough then you risk the internal queue overflowing."
7224 #: ../src/guestfs-actions.pod:1963
7226 "The handle should be closed after use by calling C<guestfs_inotify_close>. "
7227 "This also removes any watches automatically."
7231 #: ../src/guestfs-actions.pod:1967 ../fish/guestfish-actions.pod:1555
7233 "See also L<inotify(7)> for an overview of the inotify interface as exposed "
7234 "by the Linux kernel, which is roughly what we expose via libguestfs. Note "
7235 "that there is one global inotify handle per libguestfs instance."
7239 #: ../src/guestfs-actions.pod:1974
7240 msgid "guestfs_inotify_read"
7244 #: ../src/guestfs-actions.pod:1976
7247 " struct guestfs_inotify_event_list *guestfs_inotify_read (guestfs_h *g);\n"
7252 #: ../src/guestfs-actions.pod:1978 ../fish/guestfish-actions.pod:1564
7254 "Return the complete queue of events that have happened since the previous "
7259 #: ../src/guestfs-actions.pod:1981 ../fish/guestfish-actions.pod:1567
7260 msgid "If no events have happened, this returns an empty list."
7264 #: ../src/guestfs-actions.pod:1983 ../fish/guestfish-actions.pod:1569
7266 "I<Note>: In order to make sure that all events have been read, you must call "
7267 "this function repeatedly until it returns an empty list. The reason is that "
7268 "the call will read events up to the maximum appliance-to-host message size "
7269 "and leave remaining events in the queue."
7273 #: ../src/guestfs-actions.pod:1989
7275 "This function returns a C<struct guestfs_inotify_event_list *> (see "
7276 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
7277 "must call C<guestfs_free_inotify_event_list> after use>."
7281 #: ../src/guestfs-actions.pod:1994
7282 msgid "guestfs_inotify_rm_watch"
7286 #: ../src/guestfs-actions.pod:1996
7289 " int guestfs_inotify_rm_watch (guestfs_h *g,\n"
7295 #: ../src/guestfs-actions.pod:1999
7297 "Remove a previously defined inotify watch. See C<guestfs_inotify_add_watch>."
7301 #: ../src/guestfs-actions.pod:2004
7302 msgid "guestfs_inspect_get_arch"
7306 #: ../src/guestfs-actions.pod:2006
7309 " char *guestfs_inspect_get_arch (guestfs_h *g,\n"
7310 "\t\tconst char *root);\n"
7315 #: ../src/guestfs-actions.pod:2009 ../src/guestfs-actions.pod:2029
7316 #: ../src/guestfs-actions.pod:2079 ../src/guestfs-actions.pod:2102
7317 #: ../src/guestfs-actions.pod:2126 ../src/guestfs-actions.pod:2144
7318 #: ../src/guestfs-actions.pod:2174 ../src/guestfs-actions.pod:2195
7320 "This function should only be called with a root device string as returned by "
7321 "C<guestfs_inspect_os>."
7325 #: ../src/guestfs-actions.pod:2012
7327 "This returns the architecture of the inspected operating system. The "
7328 "possible return values are listed under C<guestfs_file_architecture>."
7332 #: ../src/guestfs-actions.pod:2016 ../fish/guestfish-actions.pod:1593
7334 "If the architecture could not be determined, then the string C<unknown> is "
7339 #: ../src/guestfs-actions.pod:2019 ../src/guestfs-actions.pod:2069
7340 #: ../src/guestfs-actions.pod:2117 ../src/guestfs-actions.pod:2185
7341 #: ../src/guestfs-actions.pod:2220 ../src/guestfs-actions.pod:2257
7342 #: ../fish/guestfish-actions.pod:1596 ../fish/guestfish-actions.pod:1642
7343 #: ../fish/guestfish-actions.pod:1681 ../fish/guestfish-actions.pod:1736
7344 #: ../fish/guestfish-actions.pod:1767 ../fish/guestfish-actions.pod:1801
7345 msgid "Please read L<guestfs(3)/INSPECTION> for more details."
7349 #: ../src/guestfs-actions.pod:2024
7350 msgid "guestfs_inspect_get_distro"
7354 #: ../src/guestfs-actions.pod:2026
7357 " char *guestfs_inspect_get_distro (guestfs_h *g,\n"
7358 "\t\tconst char *root);\n"
7363 #: ../src/guestfs-actions.pod:2032 ../fish/guestfish-actions.pod:1605
7365 "This returns the distro (distribution) of the inspected operating system."
7369 #: ../src/guestfs-actions.pod:2035 ../fish/guestfish-actions.pod:1608
7370 msgid "Currently defined distros are:"
7374 #: ../src/guestfs-actions.pod:2039 ../fish/guestfish-actions.pod:1612
7379 #: ../src/guestfs-actions.pod:2041 ../fish/guestfish-actions.pod:1614
7380 msgid "Debian or a Debian-derived distro such as Ubuntu."
7384 #: ../src/guestfs-actions.pod:2043 ../fish/guestfish-actions.pod:1616
7389 #: ../src/guestfs-actions.pod:2045 ../fish/guestfish-actions.pod:1618
7394 #: ../src/guestfs-actions.pod:2047 ../fish/guestfish-actions.pod:1620
7395 msgid "\"redhat-based\""
7399 #: ../src/guestfs-actions.pod:2049 ../fish/guestfish-actions.pod:1622
7400 msgid "Some Red Hat-derived distro."
7404 #: ../src/guestfs-actions.pod:2051 ../fish/guestfish-actions.pod:1624
7409 #: ../src/guestfs-actions.pod:2053 ../fish/guestfish-actions.pod:1626
7410 msgid "Red Hat Enterprise Linux and some derivatives."
7414 #: ../src/guestfs-actions.pod:2055 ../src/guestfs-actions.pod:2207
7415 #: ../fish/guestfish-actions.pod:1628 ../fish/guestfish-actions.pod:1754
7420 #: ../src/guestfs-actions.pod:2057 ../fish/guestfish-actions.pod:1630
7422 "Windows does not have distributions. This string is returned if the OS type "
7427 #: ../src/guestfs-actions.pod:2060 ../src/guestfs-actions.pod:2211
7428 #: ../fish/guestfish-actions.pod:1633 ../fish/guestfish-actions.pod:1758
7433 #: ../src/guestfs-actions.pod:2062 ../fish/guestfish-actions.pod:1635
7434 msgid "The distro could not be determined."
7438 #: ../src/guestfs-actions.pod:2066 ../src/guestfs-actions.pod:2217
7439 #: ../fish/guestfish-actions.pod:1639 ../fish/guestfish-actions.pod:1764
7441 "Future versions of libguestfs may return other strings here. The caller "
7442 "should be prepared to handle any string."
7446 #: ../src/guestfs-actions.pod:2074
7447 msgid "guestfs_inspect_get_filesystems"
7451 #: ../src/guestfs-actions.pod:2076
7454 " char **guestfs_inspect_get_filesystems (guestfs_h *g,\n"
7455 "\t\tconst char *root);\n"
7460 #: ../src/guestfs-actions.pod:2082 ../fish/guestfish-actions.pod:1651
7462 "This returns a list of all the filesystems that we think are associated with "
7463 "this operating system. This includes the root filesystem, other ordinary "
7464 "filesystems, and non-mounted devices like swap partitions."
7468 #: ../src/guestfs-actions.pod:2087 ../fish/guestfish-actions.pod:1656
7470 "In the case of a multi-boot virtual machine, it is possible for a filesystem "
7471 "to be shared between operating systems."
7475 #: ../src/guestfs-actions.pod:2090
7477 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
7478 "C<guestfs_inspect_get_mountpoints>."
7482 #: ../src/guestfs-actions.pod:2097
7483 msgid "guestfs_inspect_get_major_version"
7487 #: ../src/guestfs-actions.pod:2099
7490 " int guestfs_inspect_get_major_version (guestfs_h *g,\n"
7491 "\t\tconst char *root);\n"
7496 #: ../src/guestfs-actions.pod:2105 ../fish/guestfish-actions.pod:1669
7498 "This returns the major version number of the inspected operating system."
7502 #: ../src/guestfs-actions.pod:2108 ../fish/guestfish-actions.pod:1672
7504 "Windows uses a consistent versioning scheme which is I<not> reflected in the "
7505 "popular public names used by the operating system. Notably the operating "
7506 "system known as \"Windows 7\" is really version 6.1 (ie. major = 6, minor = "
7507 "1). You can find out the real versions corresponding to releases of Windows "
7508 "by consulting Wikipedia or MSDN."
7512 #: ../src/guestfs-actions.pod:2115 ../src/guestfs-actions.pod:2132
7513 #: ../fish/guestfish-actions.pod:1679 ../fish/guestfish-actions.pod:1693
7514 msgid "If the version could not be determined, then C<0> is returned."
7518 #: ../src/guestfs-actions.pod:2121
7519 msgid "guestfs_inspect_get_minor_version"
7523 #: ../src/guestfs-actions.pod:2123
7526 " int guestfs_inspect_get_minor_version (guestfs_h *g,\n"
7527 "\t\tconst char *root);\n"
7532 #: ../src/guestfs-actions.pod:2129 ../fish/guestfish-actions.pod:1690
7534 "This returns the minor version number of the inspected operating system."
7538 #: ../src/guestfs-actions.pod:2134
7540 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
7541 "C<guestfs_inspect_get_major_version>."
7545 #: ../src/guestfs-actions.pod:2139
7546 msgid "guestfs_inspect_get_mountpoints"
7550 #: ../src/guestfs-actions.pod:2141
7553 " char **guestfs_inspect_get_mountpoints (guestfs_h *g,\n"
7554 "\t\tconst char *root);\n"
7559 #: ../src/guestfs-actions.pod:2147 ../fish/guestfish-actions.pod:1705
7561 "This returns a hash of where we think the filesystems associated with this "
7562 "operating system should be mounted. Callers should note that this is at "
7563 "best an educated guess made by reading configuration files such as C</etc/"
7568 #: ../src/guestfs-actions.pod:2152 ../fish/guestfish-actions.pod:1710
7570 "Each element in the returned hashtable has a key which is the path of the "
7571 "mountpoint (eg. C</boot>) and a value which is the filesystem that would be "
7572 "mounted there (eg. C</dev/sda1>)."
7576 #: ../src/guestfs-actions.pod:2157 ../fish/guestfish-actions.pod:1715
7578 "Non-mounted devices such as swap devices are I<not> returned in this list."
7582 #: ../src/guestfs-actions.pod:2160
7584 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
7585 "C<guestfs_inspect_get_filesystems>."
7589 #: ../src/guestfs-actions.pod:2163 ../src/guestfs-actions.pod:3320
7590 #: ../src/guestfs-actions.pod:4842
7592 "This function returns a NULL-terminated array of strings, or NULL if there "
7593 "was an error. The array of strings will always have length C<2n+1>, where "
7594 "C<n> keys and values alternate, followed by the trailing NULL entry. I<The "
7595 "caller must free the strings and the array after use>."
7599 #: ../src/guestfs-actions.pod:2169
7600 msgid "guestfs_inspect_get_product_name"
7604 #: ../src/guestfs-actions.pod:2171
7607 " char *guestfs_inspect_get_product_name (guestfs_h *g,\n"
7608 "\t\tconst char *root);\n"
7613 #: ../src/guestfs-actions.pod:2177 ../fish/guestfish-actions.pod:1728
7615 "This returns the product name of the inspected operating system. The "
7616 "product name is generally some freeform string which can be displayed to the "
7617 "user, but should not be parsed by programs."
7621 #: ../src/guestfs-actions.pod:2182 ../fish/guestfish-actions.pod:1733
7623 "If the product name could not be determined, then the string C<unknown> is "
7628 #: ../src/guestfs-actions.pod:2190
7629 msgid "guestfs_inspect_get_type"
7633 #: ../src/guestfs-actions.pod:2192
7636 " char *guestfs_inspect_get_type (guestfs_h *g,\n"
7637 "\t\tconst char *root);\n"
7642 #: ../src/guestfs-actions.pod:2198 ../fish/guestfish-actions.pod:1745
7644 "This returns the type of the inspected operating system. Currently defined "
7649 #: ../src/guestfs-actions.pod:2203 ../fish/guestfish-actions.pod:1750
7654 #: ../src/guestfs-actions.pod:2205 ../fish/guestfish-actions.pod:1752
7655 msgid "Any Linux-based operating system."
7659 #: ../src/guestfs-actions.pod:2209 ../fish/guestfish-actions.pod:1756
7660 msgid "Any Microsoft Windows operating system."
7664 #: ../src/guestfs-actions.pod:2213 ../fish/guestfish-actions.pod:1760
7665 msgid "The operating system type could not be determined."
7669 #: ../src/guestfs-actions.pod:2225
7670 msgid "guestfs_inspect_os"
7674 #: ../src/guestfs-actions.pod:2227
7677 " char **guestfs_inspect_os (guestfs_h *g);\n"
7682 #: ../src/guestfs-actions.pod:2229 ../fish/guestfish-actions.pod:1773
7684 "This function uses other libguestfs functions and certain heuristics to "
7685 "inspect the disk(s) (usually disks belonging to a virtual machine), looking "
7686 "for operating systems."
7690 #: ../src/guestfs-actions.pod:2233 ../fish/guestfish-actions.pod:1777
7691 msgid "The list returned is empty if no operating systems were found."
7695 #: ../src/guestfs-actions.pod:2235 ../fish/guestfish-actions.pod:1779
7697 "If one operating system was found, then this returns a list with a single "
7698 "element, which is the name of the root filesystem of this operating system. "
7699 "It is also possible for this function to return a list containing more than "
7700 "one element, indicating a dual-boot or multi-boot virtual machine, with each "
7701 "element being the root filesystem of one of the operating systems."
7705 #: ../src/guestfs-actions.pod:2242
7707 "You can pass the root string(s) returned to other C<guestfs_inspect_get_*> "
7708 "functions in order to query further information about each operating system, "
7709 "such as the name and version."
7713 #: ../src/guestfs-actions.pod:2247
7715 "This function uses other libguestfs features such as C<guestfs_mount_ro> and "
7716 "C<guestfs_umount_all> in order to mount and unmount filesystems and look at "
7717 "the contents. This should be called with no disks currently mounted. The "
7718 "function may also use Augeas, so any existing Augeas handle will be closed."
7722 #: ../src/guestfs-actions.pod:2253 ../fish/guestfish-actions.pod:1797
7724 "This function cannot decrypt encrypted disks. The caller must do that first "
7725 "(supplying the necessary keys) if the disk is encrypted."
7729 #: ../src/guestfs-actions.pod:2263
7730 msgid "guestfs_is_busy"
7734 #: ../src/guestfs-actions.pod:2265
7737 " int guestfs_is_busy (guestfs_h *g);\n"
7742 #: ../src/guestfs-actions.pod:2267 ../fish/guestfish-actions.pod:1807
7744 "This returns true iff this handle is busy processing a command (in the "
7749 #: ../src/guestfs-actions.pod:2274
7750 msgid "guestfs_is_config"
7754 #: ../src/guestfs-actions.pod:2276
7757 " int guestfs_is_config (guestfs_h *g);\n"
7762 #: ../src/guestfs-actions.pod:2278 ../fish/guestfish-actions.pod:1816
7764 "This returns true iff this handle is being configured (in the C<CONFIG> "
7769 #: ../src/guestfs-actions.pod:2285
7770 msgid "guestfs_is_dir"
7774 #: ../src/guestfs-actions.pod:2287
7777 " int guestfs_is_dir (guestfs_h *g,\n"
7778 "\t\tconst char *path);\n"
7783 #: ../src/guestfs-actions.pod:2290 ../fish/guestfish-actions.pod:1825
7785 "This returns C<true> if and only if there is a directory with the given "
7786 "C<path> name. Note that it returns false for other objects like files."
7790 #: ../src/guestfs-actions.pod:2294 ../src/guestfs-actions.pod:2307
7791 msgid "See also C<guestfs_stat>."
7795 #: ../src/guestfs-actions.pod:2298
7796 msgid "guestfs_is_file"
7800 #: ../src/guestfs-actions.pod:2300
7803 " int guestfs_is_file (guestfs_h *g,\n"
7804 "\t\tconst char *path);\n"
7809 #: ../src/guestfs-actions.pod:2303 ../fish/guestfish-actions.pod:1835
7811 "This returns C<true> if and only if there is a file with the given C<path> "
7812 "name. Note that it returns false for other objects like directories."
7816 #: ../src/guestfs-actions.pod:2311
7817 msgid "guestfs_is_launching"
7821 #: ../src/guestfs-actions.pod:2313
7824 " int guestfs_is_launching (guestfs_h *g);\n"
7829 #: ../src/guestfs-actions.pod:2315 ../fish/guestfish-actions.pod:1845
7831 "This returns true iff this handle is launching the subprocess (in the "
7832 "C<LAUNCHING> state)."
7836 #: ../src/guestfs-actions.pod:2322
7837 msgid "guestfs_is_lv"
7841 #: ../src/guestfs-actions.pod:2324
7844 " int guestfs_is_lv (guestfs_h *g,\n"
7845 "\t\tconst char *device);\n"
7850 #: ../src/guestfs-actions.pod:2327 ../fish/guestfish-actions.pod:1854
7852 "This command tests whether C<device> is a logical volume, and returns true "
7853 "iff this is the case."
7857 #: ../src/guestfs-actions.pod:2332
7858 msgid "guestfs_is_ready"
7862 #: ../src/guestfs-actions.pod:2334
7865 " int guestfs_is_ready (guestfs_h *g);\n"
7870 #: ../src/guestfs-actions.pod:2336 ../fish/guestfish-actions.pod:1861
7872 "This returns true iff this handle is ready to accept commands (in the "
7877 #: ../src/guestfs-actions.pod:2343
7878 msgid "guestfs_kill_subprocess"
7882 #: ../src/guestfs-actions.pod:2345
7885 " int guestfs_kill_subprocess (guestfs_h *g);\n"
7890 #: ../src/guestfs-actions.pod:2347 ../fish/guestfish-actions.pod:1870
7891 msgid "This kills the qemu subprocess. You should never need to call this."
7895 #: ../src/guestfs-actions.pod:2351
7896 msgid "guestfs_launch"
7900 #: ../src/guestfs-actions.pod:2353
7903 " int guestfs_launch (guestfs_h *g);\n"
7908 #: ../src/guestfs-actions.pod:2355 ../fish/guestfish-actions.pod:1876
7910 "Internally libguestfs is implemented by running a virtual machine using "
7915 #: ../src/guestfs-actions.pod:2358 ../fish/guestfish-actions.pod:1879
7917 "You should call this after configuring the handle (eg. adding drives) but "
7918 "before performing any actions."
7922 #: ../src/guestfs-actions.pod:2363
7923 msgid "guestfs_lchown"
7927 #: ../src/guestfs-actions.pod:2365
7930 " int guestfs_lchown (guestfs_h *g,\n"
7933 "\t\tconst char *path);\n"
7938 #: ../src/guestfs-actions.pod:2370
7940 "Change the file owner to C<owner> and group to C<group>. This is like "
7941 "C<guestfs_chown> but if C<path> is a symlink then the link itself is "
7942 "changed, not the target."
7946 #: ../src/guestfs-actions.pod:2380
7947 msgid "guestfs_lgetxattrs"
7951 #: ../src/guestfs-actions.pod:2382
7954 " struct guestfs_xattr_list *guestfs_lgetxattrs (guestfs_h *g,\n"
7955 "\t\tconst char *path);\n"
7960 #: ../src/guestfs-actions.pod:2385
7962 "This is the same as C<guestfs_getxattrs>, but if C<path> is a symbolic link, "
7963 "then it returns the extended attributes of the link itself."
7967 #: ../src/guestfs-actions.pod:2394
7968 msgid "guestfs_list_devices"
7972 #: ../src/guestfs-actions.pod:2396
7975 " char **guestfs_list_devices (guestfs_h *g);\n"
7980 #: ../src/guestfs-actions.pod:2398 ../fish/guestfish-actions.pod:1906
7981 msgid "List all the block devices."
7985 #: ../src/guestfs-actions.pod:2400 ../fish/guestfish-actions.pod:1908
7986 msgid "The full block device names are returned, eg. C</dev/sda>"
7990 #: ../src/guestfs-actions.pod:2406
7991 msgid "guestfs_list_partitions"
7995 #: ../src/guestfs-actions.pod:2408
7998 " char **guestfs_list_partitions (guestfs_h *g);\n"
8003 #: ../src/guestfs-actions.pod:2410 ../fish/guestfish-actions.pod:1914
8004 msgid "List all the partitions detected on all block devices."
8008 #: ../src/guestfs-actions.pod:2412 ../fish/guestfish-actions.pod:1916
8009 msgid "The full partition device names are returned, eg. C</dev/sda1>"
8013 #: ../src/guestfs-actions.pod:2414
8015 "This does not return logical volumes. For that you will need to call "
8020 #: ../src/guestfs-actions.pod:2421
8025 #: ../src/guestfs-actions.pod:2423
8028 " char *guestfs_ll (guestfs_h *g,\n"
8029 "\t\tconst char *directory);\n"
8034 #: ../src/guestfs-actions.pod:2426 ../fish/guestfish-actions.pod:1925
8036 "List the files in C<directory> (relative to the root directory, there is no "
8037 "cwd) in the format of 'ls -la'."
8041 #: ../src/guestfs-actions.pod:2429 ../fish/guestfish-actions.pod:1928
8043 "This command is mostly useful for interactive sessions. It is I<not> "
8044 "intended that you try to parse the output string."
8048 #: ../src/guestfs-actions.pod:2435
8053 #: ../src/guestfs-actions.pod:2437
8056 " int guestfs_ln (guestfs_h *g,\n"
8057 "\t\tconst char *target,\n"
8058 "\t\tconst char *linkname);\n"
8063 #: ../src/guestfs-actions.pod:2441 ../fish/guestfish-actions.pod:1935
8064 msgid "This command creates a hard link using the C<ln> command."
8068 #: ../src/guestfs-actions.pod:2445
8069 msgid "guestfs_ln_f"
8073 #: ../src/guestfs-actions.pod:2447
8076 " int guestfs_ln_f (guestfs_h *g,\n"
8077 "\t\tconst char *target,\n"
8078 "\t\tconst char *linkname);\n"
8083 #: ../src/guestfs-actions.pod:2451 ../fish/guestfish-actions.pod:1941
8085 "This command creates a hard link using the C<ln -f> command. The C<-f> "
8086 "option removes the link (C<linkname>) if it exists already."
8090 #: ../src/guestfs-actions.pod:2456
8091 msgid "guestfs_ln_s"
8095 #: ../src/guestfs-actions.pod:2458
8098 " int guestfs_ln_s (guestfs_h *g,\n"
8099 "\t\tconst char *target,\n"
8100 "\t\tconst char *linkname);\n"
8105 #: ../src/guestfs-actions.pod:2462 ../fish/guestfish-actions.pod:1948
8106 msgid "This command creates a symbolic link using the C<ln -s> command."
8110 #: ../src/guestfs-actions.pod:2466
8111 msgid "guestfs_ln_sf"
8115 #: ../src/guestfs-actions.pod:2468
8118 " int guestfs_ln_sf (guestfs_h *g,\n"
8119 "\t\tconst char *target,\n"
8120 "\t\tconst char *linkname);\n"
8125 #: ../src/guestfs-actions.pod:2472 ../fish/guestfish-actions.pod:1954
8127 "This command creates a symbolic link using the C<ln -sf> command, The C<-f> "
8128 "option removes the link (C<linkname>) if it exists already."
8132 #: ../src/guestfs-actions.pod:2477
8133 msgid "guestfs_lremovexattr"
8137 #: ../src/guestfs-actions.pod:2479
8140 " int guestfs_lremovexattr (guestfs_h *g,\n"
8141 "\t\tconst char *xattr,\n"
8142 "\t\tconst char *path);\n"
8147 #: ../src/guestfs-actions.pod:2483
8149 "This is the same as C<guestfs_removexattr>, but if C<path> is a symbolic "
8150 "link, then it removes an extended attribute of the link itself."
8154 #: ../src/guestfs-actions.pod:2489
8159 #: ../src/guestfs-actions.pod:2491
8162 " char **guestfs_ls (guestfs_h *g,\n"
8163 "\t\tconst char *directory);\n"
8168 #: ../src/guestfs-actions.pod:2494 ../fish/guestfish-actions.pod:1969
8170 "List the files in C<directory> (relative to the root directory, there is no "
8171 "cwd). The '.' and '..' entries are not returned, but hidden files are shown."
8175 #: ../src/guestfs-actions.pod:2498
8177 "This command is mostly useful for interactive sessions. Programs should "
8178 "probably use C<guestfs_readdir> instead."
8182 #: ../src/guestfs-actions.pod:2505
8183 msgid "guestfs_lsetxattr"
8187 #: ../src/guestfs-actions.pod:2507
8190 " int guestfs_lsetxattr (guestfs_h *g,\n"
8191 "\t\tconst char *xattr,\n"
8192 "\t\tconst char *val,\n"
8194 "\t\tconst char *path);\n"
8199 #: ../src/guestfs-actions.pod:2513
8201 "This is the same as C<guestfs_setxattr>, but if C<path> is a symbolic link, "
8202 "then it sets an extended attribute of the link itself."
8206 #: ../src/guestfs-actions.pod:2519
8207 msgid "guestfs_lstat"
8211 #: ../src/guestfs-actions.pod:2521
8214 " struct guestfs_stat *guestfs_lstat (guestfs_h *g,\n"
8215 "\t\tconst char *path);\n"
8220 #: ../src/guestfs-actions.pod:2524 ../src/guestfs-actions.pod:4507
8221 #: ../fish/guestfish-actions.pod:1988 ../fish/guestfish-actions.pod:3477
8222 msgid "Returns file information for the given C<path>."
8226 #: ../src/guestfs-actions.pod:2526
8228 "This is the same as C<guestfs_stat> except that if C<path> is a symbolic "
8229 "link, then the link is stat-ed, not the file it refers to."
8233 #: ../src/guestfs-actions.pod:2530 ../fish/guestfish-actions.pod:1994
8234 msgid "This is the same as the C<lstat(2)> system call."
8238 #: ../src/guestfs-actions.pod:2532 ../src/guestfs-actions.pod:4511
8240 "This function returns a C<struct guestfs_stat *>, or NULL if there was an "
8241 "error. I<The caller must call C<guestfs_free_stat> after use>."
8245 #: ../src/guestfs-actions.pod:2536
8246 msgid "guestfs_lstatlist"
8250 #: ../src/guestfs-actions.pod:2538
8253 " struct guestfs_stat_list *guestfs_lstatlist (guestfs_h *g,\n"
8254 "\t\tconst char *path,\n"
8255 "\t\tchar *const *names);\n"
8260 #: ../src/guestfs-actions.pod:2542
8262 "This call allows you to perform the C<guestfs_lstat> operation on multiple "
8263 "files, where all files are in the directory C<path>. C<names> is the list "
8264 "of files from this directory."
8268 #: ../src/guestfs-actions.pod:2546 ../fish/guestfish-actions.pod:2004
8270 "On return you get a list of stat structs, with a one-to-one correspondence "
8271 "to the C<names> list. If any name did not exist or could not be lstat'd, "
8272 "then the C<ino> field of that structure is set to C<-1>."
8276 #: ../src/guestfs-actions.pod:2551
8278 "This call is intended for programs that want to efficiently list a directory "
8279 "contents without making many round-trips. See also C<guestfs_lxattrlist> "
8280 "for a similarly efficient call for getting extended attributes. Very long "
8281 "directory listings might cause the protocol message size to be exceeded, "
8282 "causing this call to fail. The caller must split up such requests into "
8283 "smaller groups of names."
8287 #: ../src/guestfs-actions.pod:2559
8289 "This function returns a C<struct guestfs_stat_list *> (see E<lt>guestfs-"
8290 "structs.hE<gt>), or NULL if there was an error. I<The caller must call "
8291 "C<guestfs_free_stat_list> after use>."
8295 #: ../src/guestfs-actions.pod:2564
8296 msgid "guestfs_luks_add_key"
8300 #: ../src/guestfs-actions.pod:2566
8303 " int guestfs_luks_add_key (guestfs_h *g,\n"
8304 "\t\tconst char *device,\n"
8305 "\t\tconst char *key,\n"
8306 "\t\tconst char *newkey,\n"
8307 "\t\tint keyslot);\n"
8312 #: ../src/guestfs-actions.pod:2572 ../fish/guestfish-actions.pod:2021
8314 "This command adds a new key on LUKS device C<device>. C<key> is any "
8315 "existing key, and is used to access the device. C<newkey> is the new key to "
8316 "add. C<keyslot> is the key slot that will be replaced."
8320 #: ../src/guestfs-actions.pod:2577
8322 "Note that if C<keyslot> already contains a key, then this command will "
8323 "fail. You have to use C<guestfs_luks_kill_slot> first to remove that key."
8327 #: ../src/guestfs-actions.pod:2583 ../src/guestfs-actions.pod:2617
8328 #: ../src/guestfs-actions.pod:2637 ../src/guestfs-actions.pod:2654
8329 #: ../src/guestfs-actions.pod:2683 ../src/guestfs-actions.pod:2699
8331 "This function takes a key or passphrase parameter which could contain "
8332 "sensitive material. Read the section L</KEYS AND PASSPHRASES> for more "
8337 #: ../src/guestfs-actions.pod:2587
8338 msgid "guestfs_luks_close"
8342 #: ../src/guestfs-actions.pod:2589
8345 " int guestfs_luks_close (guestfs_h *g,\n"
8346 "\t\tconst char *device);\n"
8351 #: ../src/guestfs-actions.pod:2592
8353 "This closes a LUKS device that was created earlier by C<guestfs_luks_open> "
8354 "or C<guestfs_luks_open_ro>. The C<device> parameter must be the name of the "
8355 "LUKS mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
8356 "underlying block device."
8360 #: ../src/guestfs-actions.pod:2600
8361 msgid "guestfs_luks_format"
8365 #: ../src/guestfs-actions.pod:2602
8368 " int guestfs_luks_format (guestfs_h *g,\n"
8369 "\t\tconst char *device,\n"
8370 "\t\tconst char *key,\n"
8371 "\t\tint keyslot);\n"
8376 #: ../src/guestfs-actions.pod:2607 ../fish/guestfish-actions.pod:2047
8378 "This command erases existing data on C<device> and formats the device as a "
8379 "LUKS encrypted device. C<key> is the initial key, which is added to key "
8380 "slot C<slot>. (LUKS supports 8 key slots, numbered 0-7)."
8384 #: ../src/guestfs-actions.pod:2614 ../src/guestfs-actions.pod:2634
8385 #: ../src/guestfs-actions.pod:2736 ../src/guestfs-actions.pod:3448
8386 #: ../src/guestfs-actions.pod:4048 ../src/guestfs-actions.pod:4369
8387 #: ../src/guestfs-actions.pod:4389 ../src/guestfs-actions.pod:4412
8388 #: ../src/guestfs-actions.pod:5351 ../fish/guestfish-actions.pod:2055
8389 #: ../fish/guestfish-actions.pod:2068 ../fish/guestfish-actions.pod:2139
8390 #: ../fish/guestfish-actions.pod:2654 ../fish/guestfish-actions.pod:3118
8391 #: ../fish/guestfish-actions.pod:3376 ../fish/guestfish-actions.pod:3392
8392 #: ../fish/guestfish-actions.pod:3407 ../fish/guestfish-actions.pod:4095
8394 "B<This command is dangerous. Without careful use you can easily destroy all "
8399 #: ../src/guestfs-actions.pod:2621
8400 msgid "guestfs_luks_format_cipher"
8404 #: ../src/guestfs-actions.pod:2623
8407 " int guestfs_luks_format_cipher (guestfs_h *g,\n"
8408 "\t\tconst char *device,\n"
8409 "\t\tconst char *key,\n"
8410 "\t\tint keyslot,\n"
8411 "\t\tconst char *cipher);\n"
8416 #: ../src/guestfs-actions.pod:2629
8418 "This command is the same as C<guestfs_luks_format> but it also allows you to "
8419 "set the C<cipher> used."
8423 #: ../src/guestfs-actions.pod:2641
8424 msgid "guestfs_luks_kill_slot"
8428 #: ../src/guestfs-actions.pod:2643
8431 " int guestfs_luks_kill_slot (guestfs_h *g,\n"
8432 "\t\tconst char *device,\n"
8433 "\t\tconst char *key,\n"
8434 "\t\tint keyslot);\n"
8439 #: ../src/guestfs-actions.pod:2648 ../fish/guestfish-actions.pod:2075
8441 "This command deletes the key in key slot C<keyslot> from the encrypted LUKS "
8442 "device C<device>. C<key> must be one of the I<other> keys."
8446 #: ../src/guestfs-actions.pod:2658
8447 msgid "guestfs_luks_open"
8451 #: ../src/guestfs-actions.pod:2660
8454 " int guestfs_luks_open (guestfs_h *g,\n"
8455 "\t\tconst char *device,\n"
8456 "\t\tconst char *key,\n"
8457 "\t\tconst char *mapname);\n"
8462 #: ../src/guestfs-actions.pod:2665 ../fish/guestfish-actions.pod:2086
8464 "This command opens a block device which has been encrypted according to the "
8465 "Linux Unified Key Setup (LUKS) standard."
8469 #: ../src/guestfs-actions.pod:2668 ../fish/guestfish-actions.pod:2089
8470 msgid "C<device> is the encrypted block device or partition."
8474 #: ../src/guestfs-actions.pod:2670 ../fish/guestfish-actions.pod:2091
8476 "The caller must supply one of the keys associated with the LUKS block "
8477 "device, in the C<key> parameter."
8481 #: ../src/guestfs-actions.pod:2673 ../fish/guestfish-actions.pod:2094
8483 "This creates a new block device called C</dev/mapper/mapname>. Reads and "
8484 "writes to this block device are decrypted from and encrypted to the "
8485 "underlying C<device> respectively."
8489 #: ../src/guestfs-actions.pod:2677
8491 "If this block device contains LVM volume groups, then calling "
8492 "C<guestfs_vgscan> followed by C<guestfs_vg_activate_all> will make them "
8497 #: ../src/guestfs-actions.pod:2687
8498 msgid "guestfs_luks_open_ro"
8502 #: ../src/guestfs-actions.pod:2689
8505 " int guestfs_luks_open_ro (guestfs_h *g,\n"
8506 "\t\tconst char *device,\n"
8507 "\t\tconst char *key,\n"
8508 "\t\tconst char *mapname);\n"
8513 #: ../src/guestfs-actions.pod:2694
8515 "This is the same as C<guestfs_luks_open> except that a read-only mapping is "
8520 #: ../src/guestfs-actions.pod:2703
8521 msgid "guestfs_lvcreate"
8525 #: ../src/guestfs-actions.pod:2705
8528 " int guestfs_lvcreate (guestfs_h *g,\n"
8529 "\t\tconst char *logvol,\n"
8530 "\t\tconst char *volgroup,\n"
8531 "\t\tint mbytes);\n"
8536 #: ../src/guestfs-actions.pod:2710 ../fish/guestfish-actions.pod:2119
8538 "This creates an LVM logical volume called C<logvol> on the volume group "
8539 "C<volgroup>, with C<size> megabytes."
8543 #: ../src/guestfs-actions.pod:2715
8544 msgid "guestfs_lvm_clear_filter"
8548 #: ../src/guestfs-actions.pod:2717
8551 " int guestfs_lvm_clear_filter (guestfs_h *g);\n"
8556 #: ../src/guestfs-actions.pod:2719
8558 "This undoes the effect of C<guestfs_lvm_set_filter>. LVM will be able to "
8559 "see every block device."
8563 #: ../src/guestfs-actions.pod:2722 ../src/guestfs-actions.pod:2758
8564 #: ../fish/guestfish-actions.pod:2129 ../fish/guestfish-actions.pod:2160
8566 "This command also clears the LVM cache and performs a volume group scan."
8570 #: ../src/guestfs-actions.pod:2727
8571 msgid "guestfs_lvm_remove_all"
8575 #: ../src/guestfs-actions.pod:2729
8578 " int guestfs_lvm_remove_all (guestfs_h *g);\n"
8583 #: ../src/guestfs-actions.pod:2731 ../fish/guestfish-actions.pod:2136
8585 "This command removes all LVM logical volumes, volume groups and physical "
8590 #: ../src/guestfs-actions.pod:2739
8591 msgid "guestfs_lvm_set_filter"
8595 #: ../src/guestfs-actions.pod:2741
8598 " int guestfs_lvm_set_filter (guestfs_h *g,\n"
8599 "\t\tchar *const *devices);\n"
8604 #: ../src/guestfs-actions.pod:2744 ../fish/guestfish-actions.pod:2146
8606 "This sets the LVM device filter so that LVM will only be able to \"see\" the "
8607 "block devices in the list C<devices>, and will ignore all other attached "
8612 #: ../src/guestfs-actions.pod:2748 ../fish/guestfish-actions.pod:2150
8614 "Where disk image(s) contain duplicate PVs or VGs, this command is useful to "
8615 "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also "
8616 "there are two types of duplication possible: either cloned PVs/VGs which "
8617 "have identical UUIDs; or VGs that are not cloned but just happen to have the "
8618 "same name. In normal operation you cannot create this situation, but you "
8619 "can do it outside LVM, eg. by cloning disk images or by bit twiddling "
8620 "inside the LVM metadata."
8624 #: ../src/guestfs-actions.pod:2761 ../fish/guestfish-actions.pod:2163
8625 msgid "You can filter whole block devices or individual partitions."
8629 #: ../src/guestfs-actions.pod:2763 ../fish/guestfish-actions.pod:2165
8631 "You cannot use this if any VG is currently in use (eg. contains a mounted "
8632 "filesystem), even if you are not filtering out that VG."
8636 #: ../src/guestfs-actions.pod:2769
8637 msgid "guestfs_lvremove"
8641 #: ../src/guestfs-actions.pod:2771
8644 " int guestfs_lvremove (guestfs_h *g,\n"
8645 "\t\tconst char *device);\n"
8650 #: ../src/guestfs-actions.pod:2774 ../fish/guestfish-actions.pod:2173
8652 "Remove an LVM logical volume C<device>, where C<device> is the path to the "
8653 "LV, such as C</dev/VG/LV>."
8657 #: ../src/guestfs-actions.pod:2777 ../fish/guestfish-actions.pod:2176
8659 "You can also remove all LVs in a volume group by specifying the VG name, C</"
8664 #: ../src/guestfs-actions.pod:2782
8665 msgid "guestfs_lvrename"
8669 #: ../src/guestfs-actions.pod:2784
8672 " int guestfs_lvrename (guestfs_h *g,\n"
8673 "\t\tconst char *logvol,\n"
8674 "\t\tconst char *newlogvol);\n"
8679 #: ../src/guestfs-actions.pod:2788 ../fish/guestfish-actions.pod:2183
8680 msgid "Rename a logical volume C<logvol> with the new name C<newlogvol>."
8684 #: ../src/guestfs-actions.pod:2792
8685 msgid "guestfs_lvresize"
8689 #: ../src/guestfs-actions.pod:2794
8692 " int guestfs_lvresize (guestfs_h *g,\n"
8693 "\t\tconst char *device,\n"
8694 "\t\tint mbytes);\n"
8699 #: ../src/guestfs-actions.pod:2798 ../fish/guestfish-actions.pod:2189
8701 "This resizes (expands or shrinks) an existing LVM logical volume to "
8702 "C<mbytes>. When reducing, data in the reduced part is lost."
8706 #: ../src/guestfs-actions.pod:2804
8707 msgid "guestfs_lvresize_free"
8711 #: ../src/guestfs-actions.pod:2806
8714 " int guestfs_lvresize_free (guestfs_h *g,\n"
8715 "\t\tconst char *lv,\n"
8716 "\t\tint percent);\n"
8721 #: ../src/guestfs-actions.pod:2810 ../fish/guestfish-actions.pod:2197
8723 "This expands an existing logical volume C<lv> so that it fills C<pc>% of the "
8724 "remaining free space in the volume group. Commonly you would call this with "
8725 "pc = 100 which expands the logical volume as much as possible, using all "
8726 "remaining free space in the volume group."
8730 #: ../src/guestfs-actions.pod:2818
8735 #: ../src/guestfs-actions.pod:2820
8738 " char **guestfs_lvs (guestfs_h *g);\n"
8743 #: ../src/guestfs-actions.pod:2822 ../fish/guestfish-actions.pod:2207
8745 "List all the logical volumes detected. This is the equivalent of the L<lvs"
8750 #: ../src/guestfs-actions.pod:2825 ../fish/guestfish-actions.pod:2210
8752 "This returns a list of the logical volume device names (eg. C</dev/"
8753 "VolGroup00/LogVol00>)."
8757 #: ../src/guestfs-actions.pod:2828
8758 msgid "See also C<guestfs_lvs_full>."
8762 #: ../src/guestfs-actions.pod:2834
8763 msgid "guestfs_lvs_full"
8767 #: ../src/guestfs-actions.pod:2836
8770 " struct guestfs_lvm_lv_list *guestfs_lvs_full (guestfs_h *g);\n"
8775 #: ../src/guestfs-actions.pod:2838 ../fish/guestfish-actions.pod:2219
8777 "List all the logical volumes detected. This is the equivalent of the L<lvs"
8778 "(8)> command. The \"full\" version includes all fields."
8782 #: ../src/guestfs-actions.pod:2841
8784 "This function returns a C<struct guestfs_lvm_lv_list *> (see E<lt>guestfs-"
8785 "structs.hE<gt>), or NULL if there was an error. I<The caller must call "
8786 "C<guestfs_free_lvm_lv_list> after use>."
8790 #: ../src/guestfs-actions.pod:2846
8791 msgid "guestfs_lvuuid"
8795 #: ../src/guestfs-actions.pod:2848
8798 " char *guestfs_lvuuid (guestfs_h *g,\n"
8799 "\t\tconst char *device);\n"
8804 #: ../src/guestfs-actions.pod:2851 ../fish/guestfish-actions.pod:2226
8805 msgid "This command returns the UUID of the LVM LV C<device>."
8809 #: ../src/guestfs-actions.pod:2856
8810 msgid "guestfs_lxattrlist"
8814 #: ../src/guestfs-actions.pod:2858
8817 " struct guestfs_xattr_list *guestfs_lxattrlist (guestfs_h *g,\n"
8818 "\t\tconst char *path,\n"
8819 "\t\tchar *const *names);\n"
8824 #: ../src/guestfs-actions.pod:2862 ../fish/guestfish-actions.pod:2232
8826 "This call allows you to get the extended attributes of multiple files, where "
8827 "all files are in the directory C<path>. C<names> is the list of files from "
8832 #: ../src/guestfs-actions.pod:2866 ../fish/guestfish-actions.pod:2236
8834 "On return you get a flat list of xattr structs which must be interpreted "
8835 "sequentially. The first xattr struct always has a zero-length C<attrname>. "
8836 "C<attrval> in this struct is zero-length to indicate there was an error "
8837 "doing C<lgetxattr> for this file, I<or> is a C string which is a decimal "
8838 "number (the number of following attributes for this file, which could be C<"
8839 "\"0\">). Then after the first xattr struct are the zero or more attributes "
8840 "for the first named file. This repeats for the second and subsequent files."
8844 #: ../src/guestfs-actions.pod:2876
8846 "This call is intended for programs that want to efficiently list a directory "
8847 "contents without making many round-trips. See also C<guestfs_lstatlist> for "
8848 "a similarly efficient call for getting standard stats. Very long directory "
8849 "listings might cause the protocol message size to be exceeded, causing this "
8850 "call to fail. The caller must split up such requests into smaller groups of "
8855 #: ../src/guestfs-actions.pod:2889
8856 msgid "guestfs_mkdir"
8860 #: ../src/guestfs-actions.pod:2891
8863 " int guestfs_mkdir (guestfs_h *g,\n"
8864 "\t\tconst char *path);\n"
8869 #: ../src/guestfs-actions.pod:2894 ../fish/guestfish-actions.pod:2258
8870 msgid "Create a directory named C<path>."
8874 #: ../src/guestfs-actions.pod:2898
8875 msgid "guestfs_mkdir_mode"
8879 #: ../src/guestfs-actions.pod:2900
8882 " int guestfs_mkdir_mode (guestfs_h *g,\n"
8883 "\t\tconst char *path,\n"
8889 #: ../src/guestfs-actions.pod:2904 ../fish/guestfish-actions.pod:2264
8891 "This command creates a directory, setting the initial permissions of the "
8892 "directory to C<mode>."
8896 #: ../src/guestfs-actions.pod:2907 ../fish/guestfish-actions.pod:2267
8898 "For common Linux filesystems, the actual mode which is set will be C<mode & "
8899 "~umask & 01777>. Non-native-Linux filesystems may interpret the mode in "
8904 #: ../src/guestfs-actions.pod:2911
8905 msgid "See also C<guestfs_mkdir>, C<guestfs_umask>"
8909 #: ../src/guestfs-actions.pod:2915
8910 msgid "guestfs_mkdir_p"
8914 #: ../src/guestfs-actions.pod:2917
8917 " int guestfs_mkdir_p (guestfs_h *g,\n"
8918 "\t\tconst char *path);\n"
8923 #: ../src/guestfs-actions.pod:2920 ../fish/guestfish-actions.pod:2277
8925 "Create a directory named C<path>, creating any parent directories as "
8926 "necessary. This is like the C<mkdir -p> shell command."
8930 #: ../src/guestfs-actions.pod:2925
8931 msgid "guestfs_mkdtemp"
8935 #: ../src/guestfs-actions.pod:2927
8938 " char *guestfs_mkdtemp (guestfs_h *g,\n"
8939 "\t\tconst char *template);\n"
8944 #: ../src/guestfs-actions.pod:2930 ../fish/guestfish-actions.pod:2284
8946 "This command creates a temporary directory. The C<template> parameter "
8947 "should be a full pathname for the temporary directory name with the final "
8948 "six characters being \"XXXXXX\"."
8952 #: ../src/guestfs-actions.pod:2935 ../fish/guestfish-actions.pod:2289
8954 "For example: \"/tmp/myprogXXXXXX\" or \"/Temp/myprogXXXXXX\", the second one "
8955 "being suitable for Windows filesystems."
8959 #: ../src/guestfs-actions.pod:2938 ../fish/guestfish-actions.pod:2292
8960 msgid "The name of the temporary directory that was created is returned."
8964 #: ../src/guestfs-actions.pod:2941 ../fish/guestfish-actions.pod:2295
8965 msgid "The temporary directory is created with mode 0700 and is owned by root."
8969 #: ../src/guestfs-actions.pod:2944 ../fish/guestfish-actions.pod:2298
8971 "The caller is responsible for deleting the temporary directory and its "
8972 "contents after use."
8976 #: ../src/guestfs-actions.pod:2947 ../fish/guestfish-actions.pod:2301
8977 msgid "See also: L<mkdtemp(3)>"
8981 #: ../src/guestfs-actions.pod:2952
8982 msgid "guestfs_mke2fs_J"
8986 #: ../src/guestfs-actions.pod:2954
8989 " int guestfs_mke2fs_J (guestfs_h *g,\n"
8990 "\t\tconst char *fstype,\n"
8991 "\t\tint blocksize,\n"
8992 "\t\tconst char *device,\n"
8993 "\t\tconst char *journal);\n"
8998 #: ../src/guestfs-actions.pod:2960 ../fish/guestfish-actions.pod:2307
9000 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
9001 "C<journal>. It is equivalent to the command:"
9005 #: ../src/guestfs-actions.pod:2964 ../fish/guestfish-actions.pod:2311
9008 " mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
9013 #: ../src/guestfs-actions.pod:2966
9014 msgid "See also C<guestfs_mke2journal>."
9018 #: ../src/guestfs-actions.pod:2970
9019 msgid "guestfs_mke2fs_JL"
9023 #: ../src/guestfs-actions.pod:2972
9026 " int guestfs_mke2fs_JL (guestfs_h *g,\n"
9027 "\t\tconst char *fstype,\n"
9028 "\t\tint blocksize,\n"
9029 "\t\tconst char *device,\n"
9030 "\t\tconst char *label);\n"
9035 #: ../src/guestfs-actions.pod:2978 ../fish/guestfish-actions.pod:2319
9037 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
9038 "the journal labeled C<label>."
9042 #: ../src/guestfs-actions.pod:2981
9043 msgid "See also C<guestfs_mke2journal_L>."
9047 #: ../src/guestfs-actions.pod:2985
9048 msgid "guestfs_mke2fs_JU"
9052 #: ../src/guestfs-actions.pod:2987
9055 " int guestfs_mke2fs_JU (guestfs_h *g,\n"
9056 "\t\tconst char *fstype,\n"
9057 "\t\tint blocksize,\n"
9058 "\t\tconst char *device,\n"
9059 "\t\tconst char *uuid);\n"
9064 #: ../src/guestfs-actions.pod:2993 ../fish/guestfish-actions.pod:2328
9066 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
9067 "the journal with UUID C<uuid>."
9071 #: ../src/guestfs-actions.pod:2996
9072 msgid "See also C<guestfs_mke2journal_U>."
9076 #: ../src/guestfs-actions.pod:3000
9077 msgid "guestfs_mke2journal"
9081 #: ../src/guestfs-actions.pod:3002
9084 " int guestfs_mke2journal (guestfs_h *g,\n"
9085 "\t\tint blocksize,\n"
9086 "\t\tconst char *device);\n"
9091 #: ../src/guestfs-actions.pod:3006 ../fish/guestfish-actions.pod:2337
9093 "This creates an ext2 external journal on C<device>. It is equivalent to the "
9098 #: ../src/guestfs-actions.pod:3009 ../fish/guestfish-actions.pod:2340
9101 " mke2fs -O journal_dev -b blocksize device\n"
9106 #: ../src/guestfs-actions.pod:3013
9107 msgid "guestfs_mke2journal_L"
9111 #: ../src/guestfs-actions.pod:3015
9114 " int guestfs_mke2journal_L (guestfs_h *g,\n"
9115 "\t\tint blocksize,\n"
9116 "\t\tconst char *label,\n"
9117 "\t\tconst char *device);\n"
9122 #: ../src/guestfs-actions.pod:3020 ../fish/guestfish-actions.pod:2346
9123 msgid "This creates an ext2 external journal on C<device> with label C<label>."
9127 #: ../src/guestfs-actions.pod:3024
9128 msgid "guestfs_mke2journal_U"
9132 #: ../src/guestfs-actions.pod:3026
9135 " int guestfs_mke2journal_U (guestfs_h *g,\n"
9136 "\t\tint blocksize,\n"
9137 "\t\tconst char *uuid,\n"
9138 "\t\tconst char *device);\n"
9143 #: ../src/guestfs-actions.pod:3031 ../fish/guestfish-actions.pod:2352
9144 msgid "This creates an ext2 external journal on C<device> with UUID C<uuid>."
9148 #: ../src/guestfs-actions.pod:3035
9149 msgid "guestfs_mkfifo"
9153 #: ../src/guestfs-actions.pod:3037
9156 " int guestfs_mkfifo (guestfs_h *g,\n"
9158 "\t\tconst char *path);\n"
9163 #: ../src/guestfs-actions.pod:3041
9165 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
9166 "is just a convenient wrapper around C<guestfs_mknod>."
9170 #: ../src/guestfs-actions.pod:3049
9171 msgid "guestfs_mkfs"
9175 #: ../src/guestfs-actions.pod:3051
9178 " int guestfs_mkfs (guestfs_h *g,\n"
9179 "\t\tconst char *fstype,\n"
9180 "\t\tconst char *device);\n"
9185 #: ../src/guestfs-actions.pod:3055 ../fish/guestfish-actions.pod:2368
9187 "This creates a filesystem on C<device> (usually a partition or LVM logical "
9188 "volume). The filesystem type is C<fstype>, for example C<ext3>."
9192 #: ../src/guestfs-actions.pod:3061
9193 msgid "guestfs_mkfs_b"
9197 #: ../src/guestfs-actions.pod:3063
9200 " int guestfs_mkfs_b (guestfs_h *g,\n"
9201 "\t\tconst char *fstype,\n"
9202 "\t\tint blocksize,\n"
9203 "\t\tconst char *device);\n"
9208 #: ../src/guestfs-actions.pod:3068
9210 "This call is similar to C<guestfs_mkfs>, but it allows you to control the "
9211 "block size of the resulting filesystem. Supported block sizes depend on the "
9212 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
9216 #: ../src/guestfs-actions.pod:3073 ../fish/guestfish-actions.pod:2381
9218 "For VFAT and NTFS the C<blocksize> parameter is treated as the requested "
9223 #: ../src/guestfs-actions.pod:3078
9224 msgid "guestfs_mkmountpoint"
9228 #: ../src/guestfs-actions.pod:3080
9231 " int guestfs_mkmountpoint (guestfs_h *g,\n"
9232 "\t\tconst char *exemptpath);\n"
9237 #: ../src/guestfs-actions.pod:3083
9239 "C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are specialized calls "
9240 "that can be used to create extra mountpoints before mounting the first "
9245 #: ../src/guestfs-actions.pod:3087 ../fish/guestfish-actions.pod:2392
9247 "These calls are I<only> necessary in some very limited circumstances, mainly "
9248 "the case where you want to mount a mix of unrelated and/or read-only "
9249 "filesystems together."
9253 #: ../src/guestfs-actions.pod:3091 ../fish/guestfish-actions.pod:2396
9255 "For example, live CDs often contain a \"Russian doll\" nest of filesystems, "
9256 "an ISO outer layer, with a squashfs image inside, with an ext2/3 image "
9257 "inside that. You can unpack this as follows in guestfish:"
9261 #: ../src/guestfs-actions.pod:3096 ../fish/guestfish-actions.pod:2401
9264 " add-ro Fedora-11-i686-Live.iso\n"
9266 " mkmountpoint /cd\n"
9267 " mkmountpoint /squash\n"
9268 " mkmountpoint /ext3\n"
9269 " mount /dev/sda /cd\n"
9270 " mount-loop /cd/LiveOS/squashfs.img /squash\n"
9271 " mount-loop /squash/LiveOS/ext3fs.img /ext3\n"
9276 #: ../src/guestfs-actions.pod:3105 ../fish/guestfish-actions.pod:2410
9277 msgid "The inner filesystem is now unpacked under the /ext3 mountpoint."
9281 #: ../src/guestfs-actions.pod:3109
9282 msgid "guestfs_mknod"
9286 #: ../src/guestfs-actions.pod:3111
9289 " int guestfs_mknod (guestfs_h *g,\n"
9291 "\t\tint devmajor,\n"
9292 "\t\tint devminor,\n"
9293 "\t\tconst char *path);\n"
9298 #: ../src/guestfs-actions.pod:3117 ../fish/guestfish-actions.pod:2416
9300 "This call creates block or character special devices, or named pipes (FIFOs)."
9304 #: ../src/guestfs-actions.pod:3120 ../fish/guestfish-actions.pod:2419
9306 "The C<mode> parameter should be the mode, using the standard constants. "
9307 "C<devmajor> and C<devminor> are the device major and minor numbers, only "
9308 "used when creating block and character special devices."
9312 #: ../src/guestfs-actions.pod:3125
9314 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
9315 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
9316 "regular file). These constants are available in the standard Linux header "
9317 "files, or you can use C<guestfs_mknod_b>, C<guestfs_mknod_c> or "
9318 "C<guestfs_mkfifo> which are wrappers around this command which bitwise OR in "
9319 "the appropriate constant for you."
9323 #: ../src/guestfs-actions.pod:3137
9324 msgid "guestfs_mknod_b"
9328 #: ../src/guestfs-actions.pod:3139
9331 " int guestfs_mknod_b (guestfs_h *g,\n"
9333 "\t\tint devmajor,\n"
9334 "\t\tint devminor,\n"
9335 "\t\tconst char *path);\n"
9340 #: ../src/guestfs-actions.pod:3145
9342 "This call creates a block device node called C<path> with mode C<mode> and "
9343 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
9344 "wrapper around C<guestfs_mknod>."
9348 #: ../src/guestfs-actions.pod:3153
9349 msgid "guestfs_mknod_c"
9353 #: ../src/guestfs-actions.pod:3155
9356 " int guestfs_mknod_c (guestfs_h *g,\n"
9358 "\t\tint devmajor,\n"
9359 "\t\tint devminor,\n"
9360 "\t\tconst char *path);\n"
9365 #: ../src/guestfs-actions.pod:3161
9367 "This call creates a char device node called C<path> with mode C<mode> and "
9368 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
9369 "wrapper around C<guestfs_mknod>."
9373 #: ../src/guestfs-actions.pod:3169
9374 msgid "guestfs_mkswap"
9378 #: ../src/guestfs-actions.pod:3171
9381 " int guestfs_mkswap (guestfs_h *g,\n"
9382 "\t\tconst char *device);\n"
9387 #: ../src/guestfs-actions.pod:3174 ../fish/guestfish-actions.pod:2458
9388 msgid "Create a swap partition on C<device>."
9392 #: ../src/guestfs-actions.pod:3178
9393 msgid "guestfs_mkswap_L"
9397 #: ../src/guestfs-actions.pod:3180
9400 " int guestfs_mkswap_L (guestfs_h *g,\n"
9401 "\t\tconst char *label,\n"
9402 "\t\tconst char *device);\n"
9407 #: ../src/guestfs-actions.pod:3184 ../fish/guestfish-actions.pod:2464
9408 msgid "Create a swap partition on C<device> with label C<label>."
9412 #: ../src/guestfs-actions.pod:3186 ../fish/guestfish-actions.pod:2466
9414 "Note that you cannot attach a swap label to a block device (eg. C</dev/"
9415 "sda>), just to a partition. This appears to be a limitation of the kernel "
9420 #: ../src/guestfs-actions.pod:3192
9421 msgid "guestfs_mkswap_U"
9425 #: ../src/guestfs-actions.pod:3194
9428 " int guestfs_mkswap_U (guestfs_h *g,\n"
9429 "\t\tconst char *uuid,\n"
9430 "\t\tconst char *device);\n"
9435 #: ../src/guestfs-actions.pod:3198 ../fish/guestfish-actions.pod:2474
9436 msgid "Create a swap partition on C<device> with UUID C<uuid>."
9440 #: ../src/guestfs-actions.pod:3202
9441 msgid "guestfs_mkswap_file"
9445 #: ../src/guestfs-actions.pod:3204
9448 " int guestfs_mkswap_file (guestfs_h *g,\n"
9449 "\t\tconst char *path);\n"
9454 #: ../src/guestfs-actions.pod:3207 ../fish/guestfish-actions.pod:2480
9455 msgid "Create a swap file."
9459 #: ../src/guestfs-actions.pod:3209
9461 "This command just writes a swap file signature to an existing file. To "
9462 "create the file itself, use something like C<guestfs_fallocate>."
9466 #: ../src/guestfs-actions.pod:3214
9467 msgid "guestfs_modprobe"
9471 #: ../src/guestfs-actions.pod:3216
9474 " int guestfs_modprobe (guestfs_h *g,\n"
9475 "\t\tconst char *modulename);\n"
9480 #: ../src/guestfs-actions.pod:3219 ../fish/guestfish-actions.pod:2489
9481 msgid "This loads a kernel module in the appliance."
9485 #: ../src/guestfs-actions.pod:3221 ../fish/guestfish-actions.pod:2491
9487 "The kernel module must have been whitelisted when libguestfs was built (see "
9488 "C<appliance/kmod.whitelist.in> in the source)."
9492 #: ../src/guestfs-actions.pod:3226
9493 msgid "guestfs_mount"
9497 #: ../src/guestfs-actions.pod:3228
9500 " int guestfs_mount (guestfs_h *g,\n"
9501 "\t\tconst char *device,\n"
9502 "\t\tconst char *mountpoint);\n"
9507 #: ../src/guestfs-actions.pod:3232 ../fish/guestfish-actions.pod:2498
9509 "Mount a guest disk at a position in the filesystem. Block devices are named "
9510 "C</dev/sda>, C</dev/sdb> and so on, as they were added to the guest. If "
9511 "those block devices contain partitions, they will have the usual names (eg. "
9512 "C</dev/sda1>). Also LVM C</dev/VG/LV>-style names can be used."
9516 #: ../src/guestfs-actions.pod:3238 ../fish/guestfish-actions.pod:2504
9518 "The rules are the same as for L<mount(2)>: A filesystem must first be "
9519 "mounted on C</> before others can be mounted. Other filesystems can only be "
9520 "mounted on directories which already exist."
9524 #: ../src/guestfs-actions.pod:3243 ../fish/guestfish-actions.pod:2509
9526 "The mounted filesystem is writable, if we have sufficient permissions on the "
9527 "underlying device."
9531 #: ../src/guestfs-actions.pod:3246
9533 "B<Important note:> When you use this call, the filesystem options C<sync> "
9534 "and C<noatime> are set implicitly. This was originally done because we "
9535 "thought it would improve reliability, but it turns out that I<-o sync> has a "
9536 "very large negative performance impact and negligible effect on "
9537 "reliability. Therefore we recommend that you avoid using C<guestfs_mount> "
9538 "in any code that needs performance, and instead use C<guestfs_mount_options> "
9539 "(use an empty string for the first parameter if you don't want any options)."
9543 #: ../src/guestfs-actions.pod:3258
9544 msgid "guestfs_mount_loop"
9548 #: ../src/guestfs-actions.pod:3260
9551 " int guestfs_mount_loop (guestfs_h *g,\n"
9552 "\t\tconst char *file,\n"
9553 "\t\tconst char *mountpoint);\n"
9558 #: ../src/guestfs-actions.pod:3264 ../fish/guestfish-actions.pod:2526
9560 "This command lets you mount C<file> (a filesystem image in a file) on a "
9561 "mount point. It is entirely equivalent to the command C<mount -o loop file "
9566 #: ../src/guestfs-actions.pod:3270
9567 msgid "guestfs_mount_options"
9571 #: ../src/guestfs-actions.pod:3272
9574 " int guestfs_mount_options (guestfs_h *g,\n"
9575 "\t\tconst char *options,\n"
9576 "\t\tconst char *device,\n"
9577 "\t\tconst char *mountpoint);\n"
9582 #: ../src/guestfs-actions.pod:3277
9584 "This is the same as the C<guestfs_mount> command, but it allows you to set "
9585 "the mount options as for the L<mount(8)> I<-o> flag."
9589 #: ../src/guestfs-actions.pod:3281 ../fish/guestfish-actions.pod:2538
9591 "If the C<options> parameter is an empty string, then no options are passed "
9592 "(all options default to whatever the filesystem uses)."
9596 #: ../src/guestfs-actions.pod:3287
9597 msgid "guestfs_mount_ro"
9601 #: ../src/guestfs-actions.pod:3289
9604 " int guestfs_mount_ro (guestfs_h *g,\n"
9605 "\t\tconst char *device,\n"
9606 "\t\tconst char *mountpoint);\n"
9611 #: ../src/guestfs-actions.pod:3293
9613 "This is the same as the C<guestfs_mount> command, but it mounts the "
9614 "filesystem with the read-only (I<-o ro>) flag."
9618 #: ../src/guestfs-actions.pod:3298
9619 msgid "guestfs_mount_vfs"
9623 #: ../src/guestfs-actions.pod:3300
9626 " int guestfs_mount_vfs (guestfs_h *g,\n"
9627 "\t\tconst char *options,\n"
9628 "\t\tconst char *vfstype,\n"
9629 "\t\tconst char *device,\n"
9630 "\t\tconst char *mountpoint);\n"
9635 #: ../src/guestfs-actions.pod:3306
9637 "This is the same as the C<guestfs_mount> command, but it allows you to set "
9638 "both the mount options and the vfstype as for the L<mount(8)> I<-o> and I<-"
9643 #: ../src/guestfs-actions.pod:3312
9644 msgid "guestfs_mountpoints"
9648 #: ../src/guestfs-actions.pod:3314
9651 " char **guestfs_mountpoints (guestfs_h *g);\n"
9656 #: ../src/guestfs-actions.pod:3316
9658 "This call is similar to C<guestfs_mounts>. That call returns a list of "
9659 "devices. This one returns a hash table (map) of device name to directory "
9660 "where the device is mounted."
9664 #: ../src/guestfs-actions.pod:3326
9665 msgid "guestfs_mounts"
9669 #: ../src/guestfs-actions.pod:3328
9672 " char **guestfs_mounts (guestfs_h *g);\n"
9677 #: ../src/guestfs-actions.pod:3330 ../fish/guestfish-actions.pod:2569
9679 "This returns the list of currently mounted filesystems. It returns the list "
9680 "of devices (eg. C</dev/sda1>, C</dev/VG/LV>)."
9684 #: ../src/guestfs-actions.pod:3333 ../fish/guestfish-actions.pod:2572
9685 msgid "Some internal mounts are not shown."
9689 #: ../src/guestfs-actions.pod:3335
9690 msgid "See also: C<guestfs_mountpoints>"
9694 #: ../src/guestfs-actions.pod:3341
9699 #: ../src/guestfs-actions.pod:3343
9702 " int guestfs_mv (guestfs_h *g,\n"
9703 "\t\tconst char *src,\n"
9704 "\t\tconst char *dest);\n"
9709 #: ../src/guestfs-actions.pod:3347 ../fish/guestfish-actions.pod:2580
9711 "This moves a file from C<src> to C<dest> where C<dest> is either a "
9712 "destination filename or destination directory."
9716 #: ../src/guestfs-actions.pod:3352
9717 msgid "guestfs_ntfs_3g_probe"
9721 #: ../src/guestfs-actions.pod:3354
9724 " int guestfs_ntfs_3g_probe (guestfs_h *g,\n"
9726 "\t\tconst char *device);\n"
9731 #: ../src/guestfs-actions.pod:3358 ../fish/guestfish-actions.pod:2587
9733 "This command runs the L<ntfs-3g.probe(8)> command which probes an NTFS "
9734 "C<device> for mountability. (Not all NTFS volumes can be mounted read-"
9735 "write, and some cannot be mounted at all)."
9739 #: ../src/guestfs-actions.pod:3362 ../fish/guestfish-actions.pod:2591
9741 "C<rw> is a boolean flag. Set it to true if you want to test if the volume "
9742 "can be mounted read-write. Set it to false if you want to test if the "
9743 "volume can be mounted read-only."
9747 #: ../src/guestfs-actions.pod:3366 ../fish/guestfish-actions.pod:2595
9749 "The return value is an integer which C<0> if the operation would succeed, or "
9750 "some non-zero value documented in the L<ntfs-3g.probe(8)> manual page."
9754 #: ../src/guestfs-actions.pod:3372
9755 msgid "guestfs_ntfsresize"
9759 #: ../src/guestfs-actions.pod:3374
9762 " int guestfs_ntfsresize (guestfs_h *g,\n"
9763 "\t\tconst char *device);\n"
9768 #: ../src/guestfs-actions.pod:3377 ../fish/guestfish-actions.pod:2603
9770 "This command resizes an NTFS filesystem, expanding or shrinking it to the "
9771 "size of the underlying device. See also L<ntfsresize(8)>."
9775 #: ../src/guestfs-actions.pod:3383
9776 msgid "guestfs_ntfsresize_size"
9780 #: ../src/guestfs-actions.pod:3385
9783 " int guestfs_ntfsresize_size (guestfs_h *g,\n"
9784 "\t\tconst char *device,\n"
9785 "\t\tint64_t size);\n"
9790 #: ../src/guestfs-actions.pod:3389
9792 "This command is the same as C<guestfs_ntfsresize> except that it allows you "
9793 "to specify the new size (in bytes) explicitly."
9797 #: ../src/guestfs-actions.pod:3394
9798 msgid "guestfs_part_add"
9802 #: ../src/guestfs-actions.pod:3396
9805 " int guestfs_part_add (guestfs_h *g,\n"
9806 "\t\tconst char *device,\n"
9807 "\t\tconst char *prlogex,\n"
9808 "\t\tint64_t startsect,\n"
9809 "\t\tint64_t endsect);\n"
9814 #: ../src/guestfs-actions.pod:3402
9816 "This command adds a partition to C<device>. If there is no partition table "
9817 "on the device, call C<guestfs_part_init> first."
9821 #: ../src/guestfs-actions.pod:3405 ../fish/guestfish-actions.pod:2621
9823 "The C<prlogex> parameter is the type of partition. Normally you should pass "
9824 "C<p> or C<primary> here, but MBR partition tables also support C<l> (or "
9825 "C<logical>) and C<e> (or C<extended>) partition types."
9829 #: ../src/guestfs-actions.pod:3410 ../fish/guestfish-actions.pod:2626
9831 "C<startsect> and C<endsect> are the start and end of the partition in "
9832 "I<sectors>. C<endsect> may be negative, which means it counts backwards "
9833 "from the end of the disk (C<-1> is the last sector)."
9837 #: ../src/guestfs-actions.pod:3414
9839 "Creating a partition which covers the whole disk is not so easy. Use "
9840 "C<guestfs_part_disk> to do that."
9844 #: ../src/guestfs-actions.pod:3419
9845 msgid "guestfs_part_del"
9849 #: ../src/guestfs-actions.pod:3421
9852 " int guestfs_part_del (guestfs_h *g,\n"
9853 "\t\tconst char *device,\n"
9854 "\t\tint partnum);\n"
9859 #: ../src/guestfs-actions.pod:3425 ../fish/guestfish-actions.pod:2637
9860 msgid "This command deletes the partition numbered C<partnum> on C<device>."
9864 #: ../src/guestfs-actions.pod:3427 ../fish/guestfish-actions.pod:2639
9866 "Note that in the case of MBR partitioning, deleting an extended partition "
9867 "also deletes any logical partitions it contains."
9871 #: ../src/guestfs-actions.pod:3433
9872 msgid "guestfs_part_disk"
9876 #: ../src/guestfs-actions.pod:3435
9879 " int guestfs_part_disk (guestfs_h *g,\n"
9880 "\t\tconst char *device,\n"
9881 "\t\tconst char *parttype);\n"
9886 #: ../src/guestfs-actions.pod:3439
9888 "This command is simply a combination of C<guestfs_part_init> followed by "
9889 "C<guestfs_part_add> to create a single primary partition covering the whole "
9894 #: ../src/guestfs-actions.pod:3443
9896 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
9897 "possible values are described in C<guestfs_part_init>."
9901 #: ../src/guestfs-actions.pod:3451
9902 msgid "guestfs_part_get_bootable"
9906 #: ../src/guestfs-actions.pod:3453
9909 " int guestfs_part_get_bootable (guestfs_h *g,\n"
9910 "\t\tconst char *device,\n"
9911 "\t\tint partnum);\n"
9916 #: ../src/guestfs-actions.pod:3457 ../fish/guestfish-actions.pod:2661
9918 "This command returns true if the partition C<partnum> on C<device> has the "
9919 "bootable flag set."
9923 #: ../src/guestfs-actions.pod:3460
9924 msgid "See also C<guestfs_part_set_bootable>."
9928 #: ../src/guestfs-actions.pod:3464
9929 msgid "guestfs_part_get_mbr_id"
9933 #: ../src/guestfs-actions.pod:3466
9936 " int guestfs_part_get_mbr_id (guestfs_h *g,\n"
9937 "\t\tconst char *device,\n"
9938 "\t\tint partnum);\n"
9943 #: ../src/guestfs-actions.pod:3470 ../fish/guestfish-actions.pod:2670
9945 "Returns the MBR type byte (also known as the ID byte) from the numbered "
9946 "partition C<partnum>."
9950 #: ../src/guestfs-actions.pod:3473 ../src/guestfs-actions.pod:3635
9952 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
9953 "undefined results for other partition table types (see "
9954 "C<guestfs_part_get_parttype>)."
9958 #: ../src/guestfs-actions.pod:3479
9959 msgid "guestfs_part_get_parttype"
9963 #: ../src/guestfs-actions.pod:3481
9966 " char *guestfs_part_get_parttype (guestfs_h *g,\n"
9967 "\t\tconst char *device);\n"
9972 #: ../src/guestfs-actions.pod:3484 ../fish/guestfish-actions.pod:2681
9974 "This command examines the partition table on C<device> and returns the "
9975 "partition table type (format) being used."
9979 #: ../src/guestfs-actions.pod:3487
9981 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
9982 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
9983 "possible, although unusual. See C<guestfs_part_init> for a full list."
9987 #: ../src/guestfs-actions.pod:3495
9988 msgid "guestfs_part_init"
9992 #: ../src/guestfs-actions.pod:3497
9995 " int guestfs_part_init (guestfs_h *g,\n"
9996 "\t\tconst char *device,\n"
9997 "\t\tconst char *parttype);\n"
10002 #: ../src/guestfs-actions.pod:3501 ../fish/guestfish-actions.pod:2693
10004 "This creates an empty partition table on C<device> of one of the partition "
10005 "types listed below. Usually C<parttype> should be either C<msdos> or C<gpt> "
10006 "(for large disks)."
10010 #: ../src/guestfs-actions.pod:3505
10012 "Initially there are no partitions. Following this, you should call "
10013 "C<guestfs_part_add> for each partition required."
10017 #: ../src/guestfs-actions.pod:3508 ../fish/guestfish-actions.pod:2700
10018 msgid "Possible values for C<parttype> are:"
10022 #: ../src/guestfs-actions.pod:3512 ../fish/guestfish-actions.pod:2704
10023 msgid "B<efi> | B<gpt>"
10027 #: ../src/guestfs-actions.pod:3514 ../fish/guestfish-actions.pod:2706
10028 msgid "Intel EFI / GPT partition table."
10032 #: ../src/guestfs-actions.pod:3516 ../fish/guestfish-actions.pod:2708
10034 "This is recommended for >= 2 TB partitions that will be accessed from Linux "
10035 "and Intel-based Mac OS X. It also has limited backwards compatibility with "
10036 "the C<mbr> format."
10040 #: ../src/guestfs-actions.pod:3520 ../fish/guestfish-actions.pod:2712
10041 msgid "B<mbr> | B<msdos>"
10045 #: ../src/guestfs-actions.pod:3522 ../fish/guestfish-actions.pod:2714
10047 "The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and "
10048 "Windows. This partition type will B<only> work for device sizes up to 2 "
10049 "TB. For large disks we recommend using C<gpt>."
10053 #: ../src/guestfs-actions.pod:3529 ../fish/guestfish-actions.pod:2721
10055 "Other partition table types that may work but are not supported include:"
10059 #: ../src/guestfs-actions.pod:3534 ../fish/guestfish-actions.pod:2726
10064 #: ../src/guestfs-actions.pod:3536 ../fish/guestfish-actions.pod:2728
10065 msgid "AIX disk labels."
10069 #: ../src/guestfs-actions.pod:3538 ../fish/guestfish-actions.pod:2730
10070 msgid "B<amiga> | B<rdb>"
10074 #: ../src/guestfs-actions.pod:3540 ../fish/guestfish-actions.pod:2732
10075 msgid "Amiga \"Rigid Disk Block\" format."
10079 #: ../src/guestfs-actions.pod:3542 ../fish/guestfish-actions.pod:2734
10084 #: ../src/guestfs-actions.pod:3544 ../fish/guestfish-actions.pod:2736
10085 msgid "BSD disk labels."
10089 #: ../src/guestfs-actions.pod:3546 ../fish/guestfish-actions.pod:2738
10094 #: ../src/guestfs-actions.pod:3548 ../fish/guestfish-actions.pod:2740
10095 msgid "DASD, used on IBM mainframes."
10099 #: ../src/guestfs-actions.pod:3550 ../fish/guestfish-actions.pod:2742
10104 #: ../src/guestfs-actions.pod:3552 ../fish/guestfish-actions.pod:2744
10105 msgid "MIPS/SGI volumes."
10109 #: ../src/guestfs-actions.pod:3554 ../fish/guestfish-actions.pod:2746
10114 #: ../src/guestfs-actions.pod:3556 ../fish/guestfish-actions.pod:2748
10115 msgid "Old Mac partition format. Modern Macs use C<gpt>."
10119 #: ../src/guestfs-actions.pod:3558 ../fish/guestfish-actions.pod:2750
10124 #: ../src/guestfs-actions.pod:3560 ../fish/guestfish-actions.pod:2752
10125 msgid "NEC PC-98 format, common in Japan apparently."
10129 #: ../src/guestfs-actions.pod:3562 ../fish/guestfish-actions.pod:2754
10134 #: ../src/guestfs-actions.pod:3564 ../fish/guestfish-actions.pod:2756
10135 msgid "Sun disk labels."
10139 #: ../src/guestfs-actions.pod:3570
10140 msgid "guestfs_part_list"
10144 #: ../src/guestfs-actions.pod:3572
10147 " struct guestfs_partition_list *guestfs_part_list (guestfs_h *g,\n"
10148 "\t\tconst char *device);\n"
10153 #: ../src/guestfs-actions.pod:3575 ../fish/guestfish-actions.pod:2764
10155 "This command parses the partition table on C<device> and returns the list of "
10156 "partitions found."
10160 #: ../src/guestfs-actions.pod:3578 ../fish/guestfish-actions.pod:2767
10161 msgid "The fields in the returned structure are:"
10165 #: ../src/guestfs-actions.pod:3582 ../fish/guestfish-actions.pod:2771
10166 msgid "B<part_num>"
10170 #: ../src/guestfs-actions.pod:3584 ../fish/guestfish-actions.pod:2773
10171 msgid "Partition number, counting from 1."
10175 #: ../src/guestfs-actions.pod:3586 ../fish/guestfish-actions.pod:2775
10176 msgid "B<part_start>"
10180 #: ../src/guestfs-actions.pod:3588
10182 "Start of the partition I<in bytes>. To get sectors you have to divide by "
10183 "the device's sector size, see C<guestfs_blockdev_getss>."
10187 #: ../src/guestfs-actions.pod:3591 ../fish/guestfish-actions.pod:2780
10188 msgid "B<part_end>"
10192 #: ../src/guestfs-actions.pod:3593 ../fish/guestfish-actions.pod:2782
10193 msgid "End of the partition in bytes."
10197 #: ../src/guestfs-actions.pod:3595 ../fish/guestfish-actions.pod:2784
10198 msgid "B<part_size>"
10202 #: ../src/guestfs-actions.pod:3597 ../fish/guestfish-actions.pod:2786
10203 msgid "Size of the partition in bytes."
10207 #: ../src/guestfs-actions.pod:3601
10209 "This function returns a C<struct guestfs_partition_list *> (see E<lt>guestfs-"
10210 "structs.hE<gt>), or NULL if there was an error. I<The caller must call "
10211 "C<guestfs_free_partition_list> after use>."
10215 #: ../src/guestfs-actions.pod:3606
10216 msgid "guestfs_part_set_bootable"
10220 #: ../src/guestfs-actions.pod:3608
10223 " int guestfs_part_set_bootable (guestfs_h *g,\n"
10224 "\t\tconst char *device,\n"
10225 "\t\tint partnum,\n"
10226 "\t\tint bootable);\n"
10231 #: ../src/guestfs-actions.pod:3613 ../fish/guestfish-actions.pod:2794
10233 "This sets the bootable flag on partition numbered C<partnum> on device "
10234 "C<device>. Note that partitions are numbered from 1."
10238 #: ../src/guestfs-actions.pod:3616 ../fish/guestfish-actions.pod:2797
10240 "The bootable flag is used by some operating systems (notably Windows) to "
10241 "determine which partition to boot from. It is by no means universally "
10246 #: ../src/guestfs-actions.pod:3622
10247 msgid "guestfs_part_set_mbr_id"
10251 #: ../src/guestfs-actions.pod:3624
10254 " int guestfs_part_set_mbr_id (guestfs_h *g,\n"
10255 "\t\tconst char *device,\n"
10256 "\t\tint partnum,\n"
10257 "\t\tint idbyte);\n"
10262 #: ../src/guestfs-actions.pod:3629 ../fish/guestfish-actions.pod:2805
10264 "Sets the MBR type byte (also known as the ID byte) of the numbered partition "
10265 "C<partnum> to C<idbyte>. Note that the type bytes quoted in most "
10266 "documentation are in fact hexadecimal numbers, but usually documented "
10267 "without any leading \"0x\" which might be confusing."
10271 #: ../src/guestfs-actions.pod:3641
10272 msgid "guestfs_part_set_name"
10276 #: ../src/guestfs-actions.pod:3643
10279 " int guestfs_part_set_name (guestfs_h *g,\n"
10280 "\t\tconst char *device,\n"
10281 "\t\tint partnum,\n"
10282 "\t\tconst char *name);\n"
10287 #: ../src/guestfs-actions.pod:3648 ../fish/guestfish-actions.pod:2819
10289 "This sets the partition name on partition numbered C<partnum> on device "
10290 "C<device>. Note that partitions are numbered from 1."
10294 #: ../src/guestfs-actions.pod:3651 ../fish/guestfish-actions.pod:2822
10296 "The partition name can only be set on certain types of partition table. "
10297 "This works on C<gpt> but not on C<mbr> partitions."
10301 #: ../src/guestfs-actions.pod:3656
10302 msgid "guestfs_ping_daemon"
10306 #: ../src/guestfs-actions.pod:3658
10309 " int guestfs_ping_daemon (guestfs_h *g);\n"
10314 #: ../src/guestfs-actions.pod:3660 ../fish/guestfish-actions.pod:2829
10316 "This is a test probe into the guestfs daemon running inside the qemu "
10317 "subprocess. Calling this function checks that the daemon responds to the "
10318 "ping message, without affecting the daemon or attached block device(s) in "
10323 #: ../src/guestfs-actions.pod:3667
10324 msgid "guestfs_pread"
10328 #: ../src/guestfs-actions.pod:3669
10331 " char *guestfs_pread (guestfs_h *g,\n"
10332 "\t\tconst char *path,\n"
10334 "\t\tint64_t offset,\n"
10335 "\t\tsize_t *size_r);\n"
10340 #: ../src/guestfs-actions.pod:3675 ../fish/guestfish-actions.pod:2838
10342 "This command lets you read part of a file. It reads C<count> bytes of the "
10343 "file, starting at C<offset>, from file C<path>."
10347 #: ../src/guestfs-actions.pod:3678 ../fish/guestfish-actions.pod:2841
10349 "This may read fewer bytes than requested. For further details see the "
10350 "L<pread(2)> system call."
10354 #: ../src/guestfs-actions.pod:3681
10355 msgid "See also C<guestfs_pwrite>."
10359 #: ../src/guestfs-actions.pod:3690
10360 msgid "guestfs_pvcreate"
10364 #: ../src/guestfs-actions.pod:3692
10367 " int guestfs_pvcreate (guestfs_h *g,\n"
10368 "\t\tconst char *device);\n"
10373 #: ../src/guestfs-actions.pod:3695 ../fish/guestfish-actions.pod:2853
10375 "This creates an LVM physical volume on the named C<device>, where C<device> "
10376 "should usually be a partition name such as C</dev/sda1>."
10380 #: ../src/guestfs-actions.pod:3701
10381 msgid "guestfs_pvremove"
10385 #: ../src/guestfs-actions.pod:3703
10388 " int guestfs_pvremove (guestfs_h *g,\n"
10389 "\t\tconst char *device);\n"
10394 #: ../src/guestfs-actions.pod:3706 ../fish/guestfish-actions.pod:2861
10396 "This wipes a physical volume C<device> so that LVM will no longer recognise "
10401 #: ../src/guestfs-actions.pod:3709 ../fish/guestfish-actions.pod:2864
10403 "The implementation uses the C<pvremove> command which refuses to wipe "
10404 "physical volumes that contain any volume groups, so you have to remove those "
10409 #: ../src/guestfs-actions.pod:3715
10410 msgid "guestfs_pvresize"
10414 #: ../src/guestfs-actions.pod:3717
10417 " int guestfs_pvresize (guestfs_h *g,\n"
10418 "\t\tconst char *device);\n"
10423 #: ../src/guestfs-actions.pod:3720 ../fish/guestfish-actions.pod:2872
10425 "This resizes (expands or shrinks) an existing LVM physical volume to match "
10426 "the new size of the underlying device."
10430 #: ../src/guestfs-actions.pod:3725
10431 msgid "guestfs_pvresize_size"
10435 #: ../src/guestfs-actions.pod:3727
10438 " int guestfs_pvresize_size (guestfs_h *g,\n"
10439 "\t\tconst char *device,\n"
10440 "\t\tint64_t size);\n"
10445 #: ../src/guestfs-actions.pod:3731
10447 "This command is the same as C<guestfs_pvresize> except that it allows you to "
10448 "specify the new size (in bytes) explicitly."
10452 #: ../src/guestfs-actions.pod:3736
10453 msgid "guestfs_pvs"
10457 #: ../src/guestfs-actions.pod:3738
10460 " char **guestfs_pvs (guestfs_h *g);\n"
10465 #: ../src/guestfs-actions.pod:3740 ../fish/guestfish-actions.pod:2886
10467 "List all the physical volumes detected. This is the equivalent of the L<pvs"
10472 #: ../src/guestfs-actions.pod:3743 ../fish/guestfish-actions.pod:2889
10474 "This returns a list of just the device names that contain PVs (eg. C</dev/"
10479 #: ../src/guestfs-actions.pod:3746
10480 msgid "See also C<guestfs_pvs_full>."
10484 #: ../src/guestfs-actions.pod:3752
10485 msgid "guestfs_pvs_full"
10489 #: ../src/guestfs-actions.pod:3754
10492 " struct guestfs_lvm_pv_list *guestfs_pvs_full (guestfs_h *g);\n"
10497 #: ../src/guestfs-actions.pod:3756 ../fish/guestfish-actions.pod:2898
10499 "List all the physical volumes detected. This is the equivalent of the L<pvs"
10500 "(8)> command. The \"full\" version includes all fields."
10504 #: ../src/guestfs-actions.pod:3759
10506 "This function returns a C<struct guestfs_lvm_pv_list *> (see E<lt>guestfs-"
10507 "structs.hE<gt>), or NULL if there was an error. I<The caller must call "
10508 "C<guestfs_free_lvm_pv_list> after use>."
10512 #: ../src/guestfs-actions.pod:3764
10513 msgid "guestfs_pvuuid"
10517 #: ../src/guestfs-actions.pod:3766
10520 " char *guestfs_pvuuid (guestfs_h *g,\n"
10521 "\t\tconst char *device);\n"
10526 #: ../src/guestfs-actions.pod:3769 ../fish/guestfish-actions.pod:2905
10527 msgid "This command returns the UUID of the LVM PV C<device>."
10531 #: ../src/guestfs-actions.pod:3774
10532 msgid "guestfs_pwrite"
10536 #: ../src/guestfs-actions.pod:3776
10539 " int guestfs_pwrite (guestfs_h *g,\n"
10540 "\t\tconst char *path,\n"
10541 "\t\tconst char *content,\n"
10542 "\t\tsize_t content_size,\n"
10543 "\t\tint64_t offset);\n"
10548 #: ../src/guestfs-actions.pod:3782 ../fish/guestfish-actions.pod:2911
10550 "This command writes to part of a file. It writes the data buffer C<content> "
10551 "to the file C<path> starting at offset C<offset>."
10555 #: ../src/guestfs-actions.pod:3785 ../fish/guestfish-actions.pod:2914
10557 "This command implements the L<pwrite(2)> system call, and like that system "
10558 "call it may not write the full data requested. The return value is the "
10559 "number of bytes that were actually written to the file. This could even be "
10560 "0, although short writes are unlikely for regular files in ordinary "
10565 #: ../src/guestfs-actions.pod:3791
10566 msgid "See also C<guestfs_pread>."
10570 #: ../src/guestfs-actions.pod:3798
10571 msgid "guestfs_read_file"
10575 #: ../src/guestfs-actions.pod:3800
10578 " char *guestfs_read_file (guestfs_h *g,\n"
10579 "\t\tconst char *path,\n"
10580 "\t\tsize_t *size_r);\n"
10585 #: ../src/guestfs-actions.pod:3804 ../fish/guestfish-actions.pod:2929
10586 msgid "This calls returns the contents of the file C<path> as a buffer."
10590 #: ../src/guestfs-actions.pod:3807
10592 "Unlike C<guestfs_cat>, this function can correctly handle files that contain "
10593 "embedded ASCII NUL characters. However unlike C<guestfs_download>, this "
10594 "function is limited in the total size of file that can be handled."
10598 #: ../src/guestfs-actions.pod:3819
10599 msgid "guestfs_read_lines"
10603 #: ../src/guestfs-actions.pod:3821
10606 " char **guestfs_read_lines (guestfs_h *g,\n"
10607 "\t\tconst char *path);\n"
10612 #: ../src/guestfs-actions.pod:3826 ../fish/guestfish-actions.pod:2946
10614 "The file contents are returned as a list of lines. Trailing C<LF> and "
10615 "C<CRLF> character sequences are I<not> returned."
10619 #: ../src/guestfs-actions.pod:3829
10621 "Note that this function cannot correctly handle binary files (specifically, "
10622 "files containing C<\\0> character which is treated as end of line). For "
10623 "those you need to use the C<guestfs_read_file> function which has a more "
10624 "complex interface."
10628 #: ../src/guestfs-actions.pod:3838
10629 msgid "guestfs_readdir"
10633 #: ../src/guestfs-actions.pod:3840
10636 " struct guestfs_dirent_list *guestfs_readdir (guestfs_h *g,\n"
10637 "\t\tconst char *dir);\n"
10642 #: ../src/guestfs-actions.pod:3843 ../fish/guestfish-actions.pod:2958
10643 msgid "This returns the list of directory entries in directory C<dir>."
10647 #: ../src/guestfs-actions.pod:3845 ../fish/guestfish-actions.pod:2960
10649 "All entries in the directory are returned, including C<.> and C<..>. The "
10650 "entries are I<not> sorted, but returned in the same order as the underlying "
10655 #: ../src/guestfs-actions.pod:3849 ../fish/guestfish-actions.pod:2964
10657 "Also this call returns basic file type information about each file. The "
10658 "C<ftyp> field will contain one of the following characters:"
10662 #: ../src/guestfs-actions.pod:3854 ../fish/guestfish-actions.pod:2969
10667 #: ../src/guestfs-actions.pod:3856 ../fish/guestfish-actions.pod:2971
10668 msgid "Block special"
10672 #: ../src/guestfs-actions.pod:3858 ../fish/guestfish-actions.pod:2973
10677 #: ../src/guestfs-actions.pod:3860 ../fish/guestfish-actions.pod:2975
10678 msgid "Char special"
10682 #: ../src/guestfs-actions.pod:3862 ../fish/guestfish-actions.pod:2977
10687 #: ../src/guestfs-actions.pod:3864 ../fish/guestfish-actions.pod:2979
10692 #: ../src/guestfs-actions.pod:3866 ../fish/guestfish-actions.pod:2981
10697 #: ../src/guestfs-actions.pod:3868 ../fish/guestfish-actions.pod:2983
10698 msgid "FIFO (named pipe)"
10702 #: ../src/guestfs-actions.pod:3870 ../fish/guestfish-actions.pod:2985
10707 #: ../src/guestfs-actions.pod:3872 ../fish/guestfish-actions.pod:2987
10708 msgid "Symbolic link"
10712 #: ../src/guestfs-actions.pod:3874 ../fish/guestfish-actions.pod:2989
10717 #: ../src/guestfs-actions.pod:3876 ../fish/guestfish-actions.pod:2991
10718 msgid "Regular file"
10722 #: ../src/guestfs-actions.pod:3878 ../fish/guestfish-actions.pod:2993
10727 #: ../src/guestfs-actions.pod:3880 ../fish/guestfish-actions.pod:2995
10732 #: ../src/guestfs-actions.pod:3882 ../fish/guestfish-actions.pod:2997
10737 #: ../src/guestfs-actions.pod:3884 ../fish/guestfish-actions.pod:2999
10738 msgid "Unknown file type"
10742 #: ../src/guestfs-actions.pod:3886 ../fish/guestfish-actions.pod:3001
10747 #: ../src/guestfs-actions.pod:3888 ../fish/guestfish-actions.pod:3003
10749 "The L<readdir(3)> call returned a C<d_type> field with an unexpected value"
10753 #: ../src/guestfs-actions.pod:3893
10755 "This function is primarily intended for use by programs. To get a simple "
10756 "list of names, use C<guestfs_ls>. To get a printable directory for human "
10757 "consumption, use C<guestfs_ll>."
10761 #: ../src/guestfs-actions.pod:3897
10763 "This function returns a C<struct guestfs_dirent_list *> (see E<lt>guestfs-"
10764 "structs.hE<gt>), or NULL if there was an error. I<The caller must call "
10765 "C<guestfs_free_dirent_list> after use>."
10769 #: ../src/guestfs-actions.pod:3902
10770 msgid "guestfs_readlink"
10774 #: ../src/guestfs-actions.pod:3904
10777 " char *guestfs_readlink (guestfs_h *g,\n"
10778 "\t\tconst char *path);\n"
10783 #: ../src/guestfs-actions.pod:3907 ../fish/guestfish-actions.pod:3016
10784 msgid "This command reads the target of a symbolic link."
10788 #: ../src/guestfs-actions.pod:3912
10789 msgid "guestfs_readlinklist"
10793 #: ../src/guestfs-actions.pod:3914
10796 " char **guestfs_readlinklist (guestfs_h *g,\n"
10797 "\t\tconst char *path,\n"
10798 "\t\tchar *const *names);\n"
10803 #: ../src/guestfs-actions.pod:3918 ../fish/guestfish-actions.pod:3022
10805 "This call allows you to do a C<readlink> operation on multiple files, where "
10806 "all files are in the directory C<path>. C<names> is the list of files from "
10811 #: ../src/guestfs-actions.pod:3922 ../fish/guestfish-actions.pod:3026
10813 "On return you get a list of strings, with a one-to-one correspondence to the "
10814 "C<names> list. Each string is the value of the symbolic link."
10818 #: ../src/guestfs-actions.pod:3926 ../fish/guestfish-actions.pod:3030
10820 "If the C<readlink(2)> operation fails on any name, then the corresponding "
10821 "result string is the empty string C<\"\">. However the whole operation is "
10822 "completed even if there were C<readlink(2)> errors, and so you can call this "
10823 "function with names where you don't know if they are symbolic links already "
10824 "(albeit slightly less efficient)."
10828 #: ../src/guestfs-actions.pod:3933 ../fish/guestfish-actions.pod:3037
10830 "This call is intended for programs that want to efficiently list a directory "
10831 "contents without making many round-trips. Very long directory listings "
10832 "might cause the protocol message size to be exceeded, causing this call to "
10833 "fail. The caller must split up such requests into smaller groups of names."
10837 #: ../src/guestfs-actions.pod:3944
10838 msgid "guestfs_realpath"
10842 #: ../src/guestfs-actions.pod:3946
10845 " char *guestfs_realpath (guestfs_h *g,\n"
10846 "\t\tconst char *path);\n"
10851 #: ../src/guestfs-actions.pod:3949 ../fish/guestfish-actions.pod:3048
10853 "Return the canonicalized absolute pathname of C<path>. The returned path "
10854 "has no C<.>, C<..> or symbolic link path elements."
10858 #: ../src/guestfs-actions.pod:3955
10859 msgid "guestfs_removexattr"
10863 #: ../src/guestfs-actions.pod:3957
10866 " int guestfs_removexattr (guestfs_h *g,\n"
10867 "\t\tconst char *xattr,\n"
10868 "\t\tconst char *path);\n"
10873 #: ../src/guestfs-actions.pod:3961 ../fish/guestfish-actions.pod:3055
10875 "This call removes the extended attribute named C<xattr> of the file C<path>."
10879 #: ../src/guestfs-actions.pod:3964
10880 msgid "See also: C<guestfs_lremovexattr>, L<attr(5)>."
10884 #: ../src/guestfs-actions.pod:3968
10885 msgid "guestfs_resize2fs"
10889 #: ../src/guestfs-actions.pod:3970
10892 " int guestfs_resize2fs (guestfs_h *g,\n"
10893 "\t\tconst char *device);\n"
10898 #: ../src/guestfs-actions.pod:3973 ../fish/guestfish-actions.pod:3064
10900 "This resizes an ext2, ext3 or ext4 filesystem to match the size of the "
10901 "underlying device."
10905 #: ../src/guestfs-actions.pod:3976
10907 "I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> on the "
10908 "C<device> before calling this command. For unknown reasons C<resize2fs> "
10909 "sometimes gives an error about this and sometimes not. In any case, it is "
10910 "always safe to call C<guestfs_e2fsck_f> before calling this function."
10914 #: ../src/guestfs-actions.pod:3984
10915 msgid "guestfs_resize2fs_size"
10919 #: ../src/guestfs-actions.pod:3986
10922 " int guestfs_resize2fs_size (guestfs_h *g,\n"
10923 "\t\tconst char *device,\n"
10924 "\t\tint64_t size);\n"
10929 #: ../src/guestfs-actions.pod:3990
10931 "This command is the same as C<guestfs_resize2fs> except that it allows you "
10932 "to specify the new size (in bytes) explicitly."
10936 #: ../src/guestfs-actions.pod:3995
10941 #: ../src/guestfs-actions.pod:3997
10944 " int guestfs_rm (guestfs_h *g,\n"
10945 "\t\tconst char *path);\n"
10950 #: ../src/guestfs-actions.pod:4000 ../fish/guestfish-actions.pod:3084
10951 msgid "Remove the single file C<path>."
10955 #: ../src/guestfs-actions.pod:4004
10956 msgid "guestfs_rm_rf"
10960 #: ../src/guestfs-actions.pod:4006
10963 " int guestfs_rm_rf (guestfs_h *g,\n"
10964 "\t\tconst char *path);\n"
10969 #: ../src/guestfs-actions.pod:4009 ../fish/guestfish-actions.pod:3090
10971 "Remove the file or directory C<path>, recursively removing the contents if "
10972 "its a directory. This is like the C<rm -rf> shell command."
10976 #: ../src/guestfs-actions.pod:4015
10977 msgid "guestfs_rmdir"
10981 #: ../src/guestfs-actions.pod:4017
10984 " int guestfs_rmdir (guestfs_h *g,\n"
10985 "\t\tconst char *path);\n"
10990 #: ../src/guestfs-actions.pod:4020 ../fish/guestfish-actions.pod:3098
10991 msgid "Remove the single directory C<path>."
10995 #: ../src/guestfs-actions.pod:4024
10996 msgid "guestfs_rmmountpoint"
11000 #: ../src/guestfs-actions.pod:4026
11003 " int guestfs_rmmountpoint (guestfs_h *g,\n"
11004 "\t\tconst char *exemptpath);\n"
11009 #: ../src/guestfs-actions.pod:4029
11011 "This calls removes a mountpoint that was previously created with "
11012 "C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> for full details."
11016 #: ../src/guestfs-actions.pod:4035
11017 msgid "guestfs_scrub_device"
11021 #: ../src/guestfs-actions.pod:4037
11024 " int guestfs_scrub_device (guestfs_h *g,\n"
11025 "\t\tconst char *device);\n"
11030 #: ../src/guestfs-actions.pod:4040 ../fish/guestfish-actions.pod:3112
11032 "This command writes patterns over C<device> to make data retrieval more "
11037 #: ../src/guestfs-actions.pod:4043 ../src/guestfs-actions.pod:4061
11038 #: ../src/guestfs-actions.pod:4077 ../fish/guestfish-actions.pod:3115
11039 #: ../fish/guestfish-actions.pod:3130 ../fish/guestfish-actions.pod:3143
11041 "It is an interface to the L<scrub(1)> program. See that manual page for "
11046 #: ../src/guestfs-actions.pod:4051
11047 msgid "guestfs_scrub_file"
11051 #: ../src/guestfs-actions.pod:4053
11054 " int guestfs_scrub_file (guestfs_h *g,\n"
11055 "\t\tconst char *file);\n"
11060 #: ../src/guestfs-actions.pod:4056 ../fish/guestfish-actions.pod:3125
11062 "This command writes patterns over a file to make data retrieval more "
11067 #: ../src/guestfs-actions.pod:4059 ../fish/guestfish-actions.pod:3128
11068 msgid "The file is I<removed> after scrubbing."
11072 #: ../src/guestfs-actions.pod:4066
11073 msgid "guestfs_scrub_freespace"
11077 #: ../src/guestfs-actions.pod:4068
11080 " int guestfs_scrub_freespace (guestfs_h *g,\n"
11081 "\t\tconst char *dir);\n"
11086 #: ../src/guestfs-actions.pod:4071
11088 "This command creates the directory C<dir> and then fills it with files until "
11089 "the filesystem is full, and scrubs the files as for C<guestfs_scrub_file>, "
11090 "and deletes them. The intention is to scrub any free space on the partition "
11091 "containing C<dir>."
11095 #: ../src/guestfs-actions.pod:4082
11096 msgid "guestfs_set_append"
11100 #: ../src/guestfs-actions.pod:4084
11103 " int guestfs_set_append (guestfs_h *g,\n"
11104 "\t\tconst char *append);\n"
11109 #: ../src/guestfs-actions.pod:4087 ../fish/guestfish-actions.pod:3150
11111 "This function is used to add additional options to the guest kernel command "
11116 #: ../src/guestfs-actions.pod:4090 ../fish/guestfish-actions.pod:3153
11118 "The default is C<NULL> unless overridden by setting C<LIBGUESTFS_APPEND> "
11119 "environment variable."
11123 #: ../src/guestfs-actions.pod:4093 ../fish/guestfish-actions.pod:3156
11125 "Setting C<append> to C<NULL> means I<no> additional options are passed "
11126 "(libguestfs always adds a few of its own)."
11130 #: ../src/guestfs-actions.pod:4098
11131 msgid "guestfs_set_autosync"
11135 #: ../src/guestfs-actions.pod:4100
11138 " int guestfs_set_autosync (guestfs_h *g,\n"
11139 "\t\tint autosync);\n"
11144 #: ../src/guestfs-actions.pod:4103
11146 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
11147 "effort attempt to run C<guestfs_umount_all> followed by C<guestfs_sync> when "
11148 "the handle is closed (also if the program exits without closing handles)."
11152 #: ../src/guestfs-actions.pod:4108 ../fish/guestfish-actions.pod:3168
11154 "This is disabled by default (except in guestfish where it is enabled by "
11159 #: ../src/guestfs-actions.pod:4113
11160 msgid "guestfs_set_direct"
11164 #: ../src/guestfs-actions.pod:4115
11167 " int guestfs_set_direct (guestfs_h *g,\n"
11168 "\t\tint direct);\n"
11173 #: ../src/guestfs-actions.pod:4118 ../fish/guestfish-actions.pod:3175
11175 "If the direct appliance mode flag is enabled, then stdin and stdout are "
11176 "passed directly through to the appliance once it is launched."
11180 #: ../src/guestfs-actions.pod:4122
11182 "One consequence of this is that log messages aren't caught by the library "
11183 "and handled by C<guestfs_set_log_message_callback>, but go straight to "
11188 #: ../src/guestfs-actions.pod:4126 ../fish/guestfish-actions.pod:3183
11189 msgid "You probably don't want to use this unless you know what you are doing."
11193 #: ../src/guestfs-actions.pod:4129 ../fish/guestfish-actions.pod:3186
11194 msgid "The default is disabled."
11198 #: ../src/guestfs-actions.pod:4133
11199 msgid "guestfs_set_e2label"
11203 #: ../src/guestfs-actions.pod:4135
11206 " int guestfs_set_e2label (guestfs_h *g,\n"
11207 "\t\tconst char *device,\n"
11208 "\t\tconst char *label);\n"
11213 #: ../src/guestfs-actions.pod:4139 ../fish/guestfish-actions.pod:3192
11215 "This sets the ext2/3/4 filesystem label of the filesystem on C<device> to "
11216 "C<label>. Filesystem labels are limited to 16 characters."
11220 #: ../src/guestfs-actions.pod:4143
11222 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label> to return "
11223 "the existing label on a filesystem."
11227 #: ../src/guestfs-actions.pod:4148
11228 msgid "guestfs_set_e2uuid"
11232 #: ../src/guestfs-actions.pod:4150
11235 " int guestfs_set_e2uuid (guestfs_h *g,\n"
11236 "\t\tconst char *device,\n"
11237 "\t\tconst char *uuid);\n"
11242 #: ../src/guestfs-actions.pod:4154 ../fish/guestfish-actions.pod:3203
11244 "This sets the ext2/3/4 filesystem UUID of the filesystem on C<device> to "
11245 "C<uuid>. The format of the UUID and alternatives such as C<clear>, "
11246 "C<random> and C<time> are described in the L<tune2fs(8)> manpage."
11250 #: ../src/guestfs-actions.pod:4159
11252 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid> to return "
11253 "the existing UUID of a filesystem."
11257 #: ../src/guestfs-actions.pod:4164
11258 msgid "guestfs_set_memsize"
11262 #: ../src/guestfs-actions.pod:4166
11265 " int guestfs_set_memsize (guestfs_h *g,\n"
11266 "\t\tint memsize);\n"
11271 #: ../src/guestfs-actions.pod:4169
11273 "This sets the memory size in megabytes allocated to the qemu subprocess. "
11274 "This only has any effect if called before C<guestfs_launch>."
11278 #: ../src/guestfs-actions.pod:4173 ../fish/guestfish-actions.pod:3219
11280 "You can also change this by setting the environment variable "
11281 "C<LIBGUESTFS_MEMSIZE> before the handle is created."
11285 #: ../src/guestfs-actions.pod:4182
11286 msgid "guestfs_set_network"
11290 #: ../src/guestfs-actions.pod:4184
11293 " int guestfs_set_network (guestfs_h *g,\n"
11294 "\t\tint network);\n"
11299 #: ../src/guestfs-actions.pod:4187 ../fish/guestfish-actions.pod:3230
11301 "If C<network> is true, then the network is enabled in the libguestfs "
11302 "appliance. The default is false."
11306 #: ../src/guestfs-actions.pod:4190 ../fish/guestfish-actions.pod:3233
11308 "This affects whether commands are able to access the network (see L<guestfs"
11309 "(3)/RUNNING COMMANDS>)."
11313 #: ../src/guestfs-actions.pod:4193
11315 "You must call this before calling C<guestfs_launch>, otherwise it has no "
11320 #: ../src/guestfs-actions.pod:4198
11321 msgid "guestfs_set_path"
11325 #: ../src/guestfs-actions.pod:4200
11328 " int guestfs_set_path (guestfs_h *g,\n"
11329 "\t\tconst char *searchpath);\n"
11334 #: ../src/guestfs-actions.pod:4203 ../fish/guestfish-actions.pod:3243
11335 msgid "Set the path that libguestfs searches for kernel and initrd.img."
11339 #: ../src/guestfs-actions.pod:4205 ../fish/guestfish-actions.pod:3245
11341 "The default is C<$libdir/guestfs> unless overridden by setting "
11342 "C<LIBGUESTFS_PATH> environment variable."
11346 #: ../src/guestfs-actions.pod:4208 ../fish/guestfish-actions.pod:3248
11347 msgid "Setting C<path> to C<NULL> restores the default path."
11351 #: ../src/guestfs-actions.pod:4212
11352 msgid "guestfs_set_qemu"
11356 #: ../src/guestfs-actions.pod:4214
11359 " int guestfs_set_qemu (guestfs_h *g,\n"
11360 "\t\tconst char *qemu);\n"
11365 #: ../src/guestfs-actions.pod:4217 ../fish/guestfish-actions.pod:3254
11366 msgid "Set the qemu binary that we will use."
11370 #: ../src/guestfs-actions.pod:4219 ../fish/guestfish-actions.pod:3256
11372 "The default is chosen when the library was compiled by the configure script."
11376 #: ../src/guestfs-actions.pod:4222 ../fish/guestfish-actions.pod:3259
11378 "You can also override this by setting the C<LIBGUESTFS_QEMU> environment "
11383 #: ../src/guestfs-actions.pod:4225 ../fish/guestfish-actions.pod:3262
11384 msgid "Setting C<qemu> to C<NULL> restores the default qemu binary."
11388 #: ../src/guestfs-actions.pod:4227 ../fish/guestfish-actions.pod:3264
11390 "Note that you should call this function as early as possible after creating "
11391 "the handle. This is because some pre-launch operations depend on testing "
11392 "qemu features (by running C<qemu -help>). If the qemu binary changes, we "
11393 "don't retest features, and so you might see inconsistent results. Using the "
11394 "environment variable C<LIBGUESTFS_QEMU> is safest of all since that picks "
11395 "the qemu binary at the same time as the handle is created."
11399 #: ../src/guestfs-actions.pod:4237
11400 msgid "guestfs_set_recovery_proc"
11404 #: ../src/guestfs-actions.pod:4239
11407 " int guestfs_set_recovery_proc (guestfs_h *g,\n"
11408 "\t\tint recoveryproc);\n"
11413 #: ../src/guestfs-actions.pod:4242
11415 "If this is called with the parameter C<false> then C<guestfs_launch> does "
11416 "not create a recovery process. The purpose of the recovery process is to "
11417 "stop runaway qemu processes in the case where the main program aborts "
11422 #: ../src/guestfs-actions.pod:4247
11424 "This only has any effect if called before C<guestfs_launch>, and the default "
11429 #: ../src/guestfs-actions.pod:4250 ../fish/guestfish-actions.pod:3284
11431 "About the only time when you would want to disable this is if the main "
11432 "process will fork itself into the background (\"daemonize\" itself). In "
11433 "this case the recovery process thinks that the main program has disappeared "
11434 "and so kills qemu, which is not very helpful."
11438 #: ../src/guestfs-actions.pod:4258
11439 msgid "guestfs_set_selinux"
11443 #: ../src/guestfs-actions.pod:4260
11446 " int guestfs_set_selinux (guestfs_h *g,\n"
11447 "\t\tint selinux);\n"
11452 #: ../src/guestfs-actions.pod:4263 ../fish/guestfish-actions.pod:3294
11454 "This sets the selinux flag that is passed to the appliance at boot time. "
11455 "The default is C<selinux=0> (disabled)."
11459 #: ../src/guestfs-actions.pod:4266 ../fish/guestfish-actions.pod:3297
11461 "Note that if SELinux is enabled, it is always in Permissive mode "
11462 "(C<enforcing=0>)."
11466 #: ../src/guestfs-actions.pod:4274
11467 msgid "guestfs_set_trace"
11471 #: ../src/guestfs-actions.pod:4276
11474 " int guestfs_set_trace (guestfs_h *g,\n"
11475 "\t\tint trace);\n"
11480 #: ../src/guestfs-actions.pod:4279 ../fish/guestfish-actions.pod:3307
11482 "If the command trace flag is set to 1, then commands are printed on stderr "
11483 "before they are executed in a format which is very similar to the one used "
11484 "by guestfish. In other words, you can run a program with this enabled, and "
11485 "you will get out a script which you can feed to guestfish to perform the "
11486 "same set of actions."
11490 #: ../src/guestfs-actions.pod:4286 ../fish/guestfish-actions.pod:3314
11492 "If you want to trace C API calls into libguestfs (and other libraries) then "
11493 "possibly a better way is to use the external ltrace(1) command."
11497 #: ../src/guestfs-actions.pod:4290 ../fish/guestfish-actions.pod:3318
11499 "Command traces are disabled unless the environment variable "
11500 "C<LIBGUESTFS_TRACE> is defined and set to C<1>."
11504 #: ../src/guestfs-actions.pod:4295
11505 msgid "guestfs_set_verbose"
11509 #: ../src/guestfs-actions.pod:4297
11512 " int guestfs_set_verbose (guestfs_h *g,\n"
11513 "\t\tint verbose);\n"
11518 #: ../src/guestfs-actions.pod:4300 ../fish/guestfish-actions.pod:3325
11519 msgid "If C<verbose> is true, this turns on verbose messages (to C<stderr>)."
11523 #: ../src/guestfs-actions.pod:4302 ../fish/guestfish-actions.pod:3327
11525 "Verbose messages are disabled unless the environment variable "
11526 "C<LIBGUESTFS_DEBUG> is defined and set to C<1>."
11530 #: ../src/guestfs-actions.pod:4307
11531 msgid "guestfs_setcon"
11535 #: ../src/guestfs-actions.pod:4309
11538 " int guestfs_setcon (guestfs_h *g,\n"
11539 "\t\tconst char *context);\n"
11544 #: ../src/guestfs-actions.pod:4312 ../fish/guestfish-actions.pod:3334
11546 "This sets the SELinux security context of the daemon to the string "
11551 #: ../src/guestfs-actions.pod:4315 ../fish/guestfish-actions.pod:3337
11552 msgid "See the documentation about SELINUX in L<guestfs(3)>."
11556 #: ../src/guestfs-actions.pod:4319
11557 msgid "guestfs_setxattr"
11561 #: ../src/guestfs-actions.pod:4321
11564 " int guestfs_setxattr (guestfs_h *g,\n"
11565 "\t\tconst char *xattr,\n"
11566 "\t\tconst char *val,\n"
11567 "\t\tint vallen,\n"
11568 "\t\tconst char *path);\n"
11573 #: ../src/guestfs-actions.pod:4327 ../fish/guestfish-actions.pod:3343
11575 "This call sets the extended attribute named C<xattr> of the file C<path> to "
11576 "the value C<val> (of length C<vallen>). The value is arbitrary 8 bit data."
11580 #: ../src/guestfs-actions.pod:4331
11581 msgid "See also: C<guestfs_lsetxattr>, L<attr(5)>."
11585 #: ../src/guestfs-actions.pod:4335
11586 msgid "guestfs_sfdisk"
11590 #: ../src/guestfs-actions.pod:4337
11593 " int guestfs_sfdisk (guestfs_h *g,\n"
11594 "\t\tconst char *device,\n"
11597 "\t\tint sectors,\n"
11598 "\t\tchar *const *lines);\n"
11603 #: ../src/guestfs-actions.pod:4344 ../fish/guestfish-actions.pod:3353
11605 "This is a direct interface to the L<sfdisk(8)> program for creating "
11606 "partitions on block devices."
11610 #: ../src/guestfs-actions.pod:4347 ../fish/guestfish-actions.pod:3356
11611 msgid "C<device> should be a block device, for example C</dev/sda>."
11615 #: ../src/guestfs-actions.pod:4349 ../fish/guestfish-actions.pod:3358
11617 "C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads and "
11618 "sectors on the device, which are passed directly to sfdisk as the I<-C>, I<-"
11619 "H> and I<-S> parameters. If you pass C<0> for any of these, then the "
11620 "corresponding parameter is omitted. Usually for 'large' disks, you can just "
11621 "pass C<0> for these, but for small (floppy-sized) disks, sfdisk (or rather, "
11622 "the kernel) cannot work out the right geometry and you will need to tell it."
11626 #: ../src/guestfs-actions.pod:4357 ../fish/guestfish-actions.pod:3366
11628 "C<lines> is a list of lines that we feed to C<sfdisk>. For more information "
11629 "refer to the L<sfdisk(8)> manpage."
11633 #: ../src/guestfs-actions.pod:4360 ../fish/guestfish-actions.pod:3369
11635 "To create a single partition occupying the whole disk, you would pass "
11636 "C<lines> as a single element list, when the single element being the string "
11641 #: ../src/guestfs-actions.pod:4364
11643 "See also: C<guestfs_sfdisk_l>, C<guestfs_sfdisk_N>, C<guestfs_part_init>"
11647 #: ../src/guestfs-actions.pod:4372
11648 msgid "guestfs_sfdiskM"
11652 #: ../src/guestfs-actions.pod:4374
11655 " int guestfs_sfdiskM (guestfs_h *g,\n"
11656 "\t\tconst char *device,\n"
11657 "\t\tchar *const *lines);\n"
11662 #: ../src/guestfs-actions.pod:4378
11664 "This is a simplified interface to the C<guestfs_sfdisk> command, where "
11665 "partition sizes are specified in megabytes only (rounded to the nearest "
11666 "cylinder) and you don't need to specify the cyls, heads and sectors "
11667 "parameters which were rarely if ever used anyway."
11671 #: ../src/guestfs-actions.pod:4384
11673 "See also: C<guestfs_sfdisk>, the L<sfdisk(8)> manpage and "
11674 "C<guestfs_part_disk>"
11678 #: ../src/guestfs-actions.pod:4392
11679 msgid "guestfs_sfdisk_N"
11683 #: ../src/guestfs-actions.pod:4394
11686 " int guestfs_sfdisk_N (guestfs_h *g,\n"
11687 "\t\tconst char *device,\n"
11688 "\t\tint partnum,\n"
11691 "\t\tint sectors,\n"
11692 "\t\tconst char *line);\n"
11697 #: ../src/guestfs-actions.pod:4402 ../fish/guestfish-actions.pod:3399
11699 "This runs L<sfdisk(8)> option to modify just the single partition C<n> "
11700 "(note: C<n> counts from 1)."
11704 #: ../src/guestfs-actions.pod:4405
11706 "For other parameters, see C<guestfs_sfdisk>. You should usually pass C<0> "
11707 "for the cyls/heads/sectors parameters."
11711 #: ../src/guestfs-actions.pod:4408
11712 msgid "See also: C<guestfs_part_add>"
11716 #: ../src/guestfs-actions.pod:4415
11717 msgid "guestfs_sfdisk_disk_geometry"
11721 #: ../src/guestfs-actions.pod:4417
11724 " char *guestfs_sfdisk_disk_geometry (guestfs_h *g,\n"
11725 "\t\tconst char *device);\n"
11730 #: ../src/guestfs-actions.pod:4420
11732 "This displays the disk geometry of C<device> read from the partition table. "
11733 "Especially in the case where the underlying block device has been resized, "
11734 "this can be different from the kernel's idea of the geometry (see "
11735 "C<guestfs_sfdisk_kernel_geometry>)."
11739 #: ../src/guestfs-actions.pod:4425 ../src/guestfs-actions.pod:4438
11740 #: ../fish/guestfish-actions.pod:3419 ../fish/guestfish-actions.pod:3428
11741 msgid "The result is in human-readable format, and not designed to be parsed."
11745 #: ../src/guestfs-actions.pod:4431
11746 msgid "guestfs_sfdisk_kernel_geometry"
11750 #: ../src/guestfs-actions.pod:4433
11753 " char *guestfs_sfdisk_kernel_geometry (guestfs_h *g,\n"
11754 "\t\tconst char *device);\n"
11759 #: ../src/guestfs-actions.pod:4436 ../fish/guestfish-actions.pod:3426
11760 msgid "This displays the kernel's idea of the geometry of C<device>."
11764 #: ../src/guestfs-actions.pod:4444
11765 msgid "guestfs_sfdisk_l"
11769 #: ../src/guestfs-actions.pod:4446
11772 " char *guestfs_sfdisk_l (guestfs_h *g,\n"
11773 "\t\tconst char *device);\n"
11778 #: ../src/guestfs-actions.pod:4449 ../fish/guestfish-actions.pod:3435
11780 "This displays the partition table on C<device>, in the human-readable output "
11781 "of the L<sfdisk(8)> command. It is not intended to be parsed."
11785 #: ../src/guestfs-actions.pod:4453
11786 msgid "See also: C<guestfs_part_list>"
11790 #: ../src/guestfs-actions.pod:4458
11795 #: ../src/guestfs-actions.pod:4460
11798 " char *guestfs_sh (guestfs_h *g,\n"
11799 "\t\tconst char *command);\n"
11804 #: ../src/guestfs-actions.pod:4463 ../fish/guestfish-actions.pod:3445
11806 "This call runs a command from the guest filesystem via the guest's C</bin/"
11811 #: ../src/guestfs-actions.pod:4466
11812 msgid "This is like C<guestfs_command>, but passes the command to:"
11816 #: ../src/guestfs-actions.pod:4468 ../fish/guestfish-actions.pod:3450
11819 " /bin/sh -c \"command\"\n"
11824 #: ../src/guestfs-actions.pod:4470 ../fish/guestfish-actions.pod:3452
11826 "Depending on the guest's shell, this usually results in wildcards being "
11827 "expanded, shell expressions being interpolated and so on."
11831 #: ../src/guestfs-actions.pod:4474
11832 msgid "All the provisos about C<guestfs_command> apply to this call."
11836 #: ../src/guestfs-actions.pod:4479
11837 msgid "guestfs_sh_lines"
11841 #: ../src/guestfs-actions.pod:4481
11844 " char **guestfs_sh_lines (guestfs_h *g,\n"
11845 "\t\tconst char *command);\n"
11850 #: ../src/guestfs-actions.pod:4484
11852 "This is the same as C<guestfs_sh>, but splits the result into a list of "
11857 #: ../src/guestfs-actions.pod:4487
11858 msgid "See also: C<guestfs_command_lines>"
11862 #: ../src/guestfs-actions.pod:4493
11863 msgid "guestfs_sleep"
11867 #: ../src/guestfs-actions.pod:4495
11870 " int guestfs_sleep (guestfs_h *g,\n"
11876 #: ../src/guestfs-actions.pod:4498 ../fish/guestfish-actions.pod:3471
11877 msgid "Sleep for C<secs> seconds."
11881 #: ../src/guestfs-actions.pod:4502 ../src/guestfs-structs.pod:109
11882 msgid "guestfs_stat"
11886 #: ../src/guestfs-actions.pod:4504
11889 " struct guestfs_stat *guestfs_stat (guestfs_h *g,\n"
11890 "\t\tconst char *path);\n"
11895 #: ../src/guestfs-actions.pod:4509 ../fish/guestfish-actions.pod:3479
11896 msgid "This is the same as the C<stat(2)> system call."
11900 #: ../src/guestfs-actions.pod:4515 ../src/guestfs-structs.pod:135
11901 msgid "guestfs_statvfs"
11905 #: ../src/guestfs-actions.pod:4517
11908 " struct guestfs_statvfs *guestfs_statvfs (guestfs_h *g,\n"
11909 "\t\tconst char *path);\n"
11914 #: ../src/guestfs-actions.pod:4520 ../fish/guestfish-actions.pod:3485
11916 "Returns file system statistics for any mounted file system. C<path> should "
11917 "be a file or directory in the mounted file system (typically it is the mount "
11918 "point itself, but it doesn't need to be)."
11922 #: ../src/guestfs-actions.pod:4524 ../fish/guestfish-actions.pod:3489
11923 msgid "This is the same as the C<statvfs(2)> system call."
11927 #: ../src/guestfs-actions.pod:4526
11929 "This function returns a C<struct guestfs_statvfs *>, or NULL if there was an "
11930 "error. I<The caller must call C<guestfs_free_statvfs> after use>."
11934 #: ../src/guestfs-actions.pod:4530
11935 msgid "guestfs_strings"
11939 #: ../src/guestfs-actions.pod:4532
11942 " char **guestfs_strings (guestfs_h *g,\n"
11943 "\t\tconst char *path);\n"
11948 #: ../src/guestfs-actions.pod:4535 ../fish/guestfish-actions.pod:3495
11950 "This runs the L<strings(1)> command on a file and returns the list of "
11951 "printable strings found."
11955 #: ../src/guestfs-actions.pod:4545
11956 msgid "guestfs_strings_e"
11960 #: ../src/guestfs-actions.pod:4547
11963 " char **guestfs_strings_e (guestfs_h *g,\n"
11964 "\t\tconst char *encoding,\n"
11965 "\t\tconst char *path);\n"
11970 #: ../src/guestfs-actions.pod:4551
11972 "This is like the C<guestfs_strings> command, but allows you to specify the "
11973 "encoding of strings that are looked for in the source file C<path>."
11977 #: ../src/guestfs-actions.pod:4555 ../fish/guestfish-actions.pod:3509
11978 msgid "Allowed encodings are:"
11982 #: ../src/guestfs-actions.pod:4559 ../fish/guestfish-actions.pod:3513
11987 #: ../src/guestfs-actions.pod:4561
11989 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
11990 "ISO-8859-X (this is what C<guestfs_strings> uses)."
11994 #: ../src/guestfs-actions.pod:4564 ../fish/guestfish-actions.pod:3518
11999 #: ../src/guestfs-actions.pod:4566 ../fish/guestfish-actions.pod:3520
12000 msgid "Single 8-bit-byte characters."
12004 #: ../src/guestfs-actions.pod:4568 ../fish/guestfish-actions.pod:3522
12009 #: ../src/guestfs-actions.pod:4570 ../fish/guestfish-actions.pod:3524
12010 msgid "16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE."
12014 #: ../src/guestfs-actions.pod:4573 ../fish/guestfish-actions.pod:3527
12015 msgid "l (lower case letter L)"
12019 #: ../src/guestfs-actions.pod:4575 ../fish/guestfish-actions.pod:3529
12021 "16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for "
12022 "examining binaries in Windows guests."
12026 #: ../src/guestfs-actions.pod:4578 ../fish/guestfish-actions.pod:3532
12031 #: ../src/guestfs-actions.pod:4580 ../fish/guestfish-actions.pod:3534
12032 msgid "32-bit big endian such as UCS-4BE."
12036 #: ../src/guestfs-actions.pod:4582 ../fish/guestfish-actions.pod:3536
12041 #: ../src/guestfs-actions.pod:4584 ../fish/guestfish-actions.pod:3538
12042 msgid "32-bit little endian such as UCS-4LE."
12046 #: ../src/guestfs-actions.pod:4588 ../fish/guestfish-actions.pod:3542
12047 msgid "The returned strings are transcoded to UTF-8."
12051 #: ../src/guestfs-actions.pod:4597
12052 msgid "guestfs_swapoff_device"
12056 #: ../src/guestfs-actions.pod:4599
12059 " int guestfs_swapoff_device (guestfs_h *g,\n"
12060 "\t\tconst char *device);\n"
12065 #: ../src/guestfs-actions.pod:4602
12067 "This command disables the libguestfs appliance swap device or partition "
12068 "named C<device>. See C<guestfs_swapon_device>."
12072 #: ../src/guestfs-actions.pod:4608
12073 msgid "guestfs_swapoff_file"
12077 #: ../src/guestfs-actions.pod:4610
12080 " int guestfs_swapoff_file (guestfs_h *g,\n"
12081 "\t\tconst char *file);\n"
12086 #: ../src/guestfs-actions.pod:4613 ../fish/guestfish-actions.pod:3559
12087 msgid "This command disables the libguestfs appliance swap on file."
12091 #: ../src/guestfs-actions.pod:4617
12092 msgid "guestfs_swapoff_label"
12096 #: ../src/guestfs-actions.pod:4619
12099 " int guestfs_swapoff_label (guestfs_h *g,\n"
12100 "\t\tconst char *label);\n"
12105 #: ../src/guestfs-actions.pod:4622 ../fish/guestfish-actions.pod:3565
12107 "This command disables the libguestfs appliance swap on labeled swap "
12112 #: ../src/guestfs-actions.pod:4627
12113 msgid "guestfs_swapoff_uuid"
12117 #: ../src/guestfs-actions.pod:4629
12120 " int guestfs_swapoff_uuid (guestfs_h *g,\n"
12121 "\t\tconst char *uuid);\n"
12126 #: ../src/guestfs-actions.pod:4632 ../fish/guestfish-actions.pod:3572
12128 "This command disables the libguestfs appliance swap partition with the given "
12133 #: ../src/guestfs-actions.pod:4637
12134 msgid "guestfs_swapon_device"
12138 #: ../src/guestfs-actions.pod:4639
12141 " int guestfs_swapon_device (guestfs_h *g,\n"
12142 "\t\tconst char *device);\n"
12147 #: ../src/guestfs-actions.pod:4642
12149 "This command enables the libguestfs appliance to use the swap device or "
12150 "partition named C<device>. The increased memory is made available for all "
12151 "commands, for example those run using C<guestfs_command> or C<guestfs_sh>."
12155 #: ../src/guestfs-actions.pod:4647 ../fish/guestfish-actions.pod:3584
12157 "Note that you should not swap to existing guest swap partitions unless you "
12158 "know what you are doing. They may contain hibernation information, or other "
12159 "information that the guest doesn't want you to trash. You also risk leaking "
12160 "information about the host to the guest this way. Instead, attach a new "
12161 "host device to the guest and swap on that."
12165 #: ../src/guestfs-actions.pod:4656
12166 msgid "guestfs_swapon_file"
12170 #: ../src/guestfs-actions.pod:4658
12173 " int guestfs_swapon_file (guestfs_h *g,\n"
12174 "\t\tconst char *file);\n"
12179 #: ../src/guestfs-actions.pod:4661
12181 "This command enables swap to a file. See C<guestfs_swapon_device> for other "
12186 #: ../src/guestfs-actions.pod:4666
12187 msgid "guestfs_swapon_label"
12191 #: ../src/guestfs-actions.pod:4668
12194 " int guestfs_swapon_label (guestfs_h *g,\n"
12195 "\t\tconst char *label);\n"
12200 #: ../src/guestfs-actions.pod:4671
12202 "This command enables swap to a labeled swap partition. See "
12203 "C<guestfs_swapon_device> for other notes."
12207 #: ../src/guestfs-actions.pod:4676
12208 msgid "guestfs_swapon_uuid"
12212 #: ../src/guestfs-actions.pod:4678
12215 " int guestfs_swapon_uuid (guestfs_h *g,\n"
12216 "\t\tconst char *uuid);\n"
12221 #: ../src/guestfs-actions.pod:4681
12223 "This command enables swap to a swap partition with the given UUID. See "
12224 "C<guestfs_swapon_device> for other notes."
12228 #: ../src/guestfs-actions.pod:4686
12229 msgid "guestfs_sync"
12233 #: ../src/guestfs-actions.pod:4688
12236 " int guestfs_sync (guestfs_h *g);\n"
12241 #: ../src/guestfs-actions.pod:4690 ../fish/guestfish-actions.pod:3616
12243 "This syncs the disk, so that any writes are flushed through to the "
12244 "underlying disk image."
12248 #: ../src/guestfs-actions.pod:4693 ../fish/guestfish-actions.pod:3619
12250 "You should always call this if you have modified a disk image, before "
12251 "closing the handle."
12255 #: ../src/guestfs-actions.pod:4698
12256 msgid "guestfs_tail"
12260 #: ../src/guestfs-actions.pod:4700
12263 " char **guestfs_tail (guestfs_h *g,\n"
12264 "\t\tconst char *path);\n"
12269 #: ../src/guestfs-actions.pod:4703 ../fish/guestfish-actions.pod:3626
12271 "This command returns up to the last 10 lines of a file as a list of strings."
12275 #: ../src/guestfs-actions.pod:4713
12276 msgid "guestfs_tail_n"
12280 #: ../src/guestfs-actions.pod:4715
12283 " char **guestfs_tail_n (guestfs_h *g,\n"
12284 "\t\tint nrlines,\n"
12285 "\t\tconst char *path);\n"
12290 #: ../src/guestfs-actions.pod:4719 ../fish/guestfish-actions.pod:3636
12292 "If the parameter C<nrlines> is a positive number, this returns the last "
12293 "C<nrlines> lines of the file C<path>."
12297 #: ../src/guestfs-actions.pod:4722 ../fish/guestfish-actions.pod:3639
12299 "If the parameter C<nrlines> is a negative number, this returns lines from "
12300 "the file C<path>, starting with the C<-nrlines>th line."
12304 #: ../src/guestfs-actions.pod:4734
12305 msgid "guestfs_tar_in"
12309 #: ../src/guestfs-actions.pod:4736
12312 " int guestfs_tar_in (guestfs_h *g,\n"
12313 "\t\tconst char *tarfile,\n"
12314 "\t\tconst char *directory);\n"
12319 #: ../src/guestfs-actions.pod:4740 ../fish/guestfish-actions.pod:3651
12321 "This command uploads and unpacks local file C<tarfile> (an I<uncompressed> "
12322 "tar file) into C<directory>."
12326 #: ../src/guestfs-actions.pod:4743
12328 "To upload a compressed tarball, use C<guestfs_tgz_in> or C<guestfs_txz_in>."
12332 #: ../src/guestfs-actions.pod:4748
12333 msgid "guestfs_tar_out"
12337 #: ../src/guestfs-actions.pod:4750
12340 " int guestfs_tar_out (guestfs_h *g,\n"
12341 "\t\tconst char *directory,\n"
12342 "\t\tconst char *tarfile);\n"
12347 #: ../src/guestfs-actions.pod:4754 ../fish/guestfish-actions.pod:3663
12349 "This command packs the contents of C<directory> and downloads it to local "
12354 #: ../src/guestfs-actions.pod:4757
12356 "To download a compressed tarball, use C<guestfs_tgz_out> or "
12357 "C<guestfs_txz_out>."
12361 #: ../src/guestfs-actions.pod:4762
12362 msgid "guestfs_tgz_in"
12366 #: ../src/guestfs-actions.pod:4764
12369 " int guestfs_tgz_in (guestfs_h *g,\n"
12370 "\t\tconst char *tarball,\n"
12371 "\t\tconst char *directory);\n"
12376 #: ../src/guestfs-actions.pod:4768 ../fish/guestfish-actions.pod:3675
12378 "This command uploads and unpacks local file C<tarball> (a I<gzip compressed> "
12379 "tar file) into C<directory>."
12383 #: ../src/guestfs-actions.pod:4771
12384 msgid "To upload an uncompressed tarball, use C<guestfs_tar_in>."
12388 #: ../src/guestfs-actions.pod:4775
12389 msgid "guestfs_tgz_out"
12393 #: ../src/guestfs-actions.pod:4777
12396 " int guestfs_tgz_out (guestfs_h *g,\n"
12397 "\t\tconst char *directory,\n"
12398 "\t\tconst char *tarball);\n"
12403 #: ../src/guestfs-actions.pod:4781 ../fish/guestfish-actions.pod:3686
12405 "This command packs the contents of C<directory> and downloads it to local "
12410 #: ../src/guestfs-actions.pod:4784
12411 msgid "To download an uncompressed tarball, use C<guestfs_tar_out>."
12415 #: ../src/guestfs-actions.pod:4788
12416 msgid "guestfs_touch"
12420 #: ../src/guestfs-actions.pod:4790
12423 " int guestfs_touch (guestfs_h *g,\n"
12424 "\t\tconst char *path);\n"
12429 #: ../src/guestfs-actions.pod:4793 ../fish/guestfish-actions.pod:3697
12431 "Touch acts like the L<touch(1)> command. It can be used to update the "
12432 "timestamps on a file, or, if the file does not exist, to create a new zero-"
12437 #: ../src/guestfs-actions.pod:4797 ../fish/guestfish-actions.pod:3701
12439 "This command only works on regular files, and will fail on other file types "
12440 "such as directories, symbolic links, block special etc."
12444 #: ../src/guestfs-actions.pod:4802
12445 msgid "guestfs_truncate"
12449 #: ../src/guestfs-actions.pod:4804
12452 " int guestfs_truncate (guestfs_h *g,\n"
12453 "\t\tconst char *path);\n"
12458 #: ../src/guestfs-actions.pod:4807 ../fish/guestfish-actions.pod:3708
12460 "This command truncates C<path> to a zero-length file. The file must exist "
12465 #: ../src/guestfs-actions.pod:4812
12466 msgid "guestfs_truncate_size"
12470 #: ../src/guestfs-actions.pod:4814
12473 " int guestfs_truncate_size (guestfs_h *g,\n"
12474 "\t\tconst char *path,\n"
12475 "\t\tint64_t size);\n"
12480 #: ../src/guestfs-actions.pod:4818 ../fish/guestfish-actions.pod:3715
12482 "This command truncates C<path> to size C<size> bytes. The file must exist "
12487 #: ../src/guestfs-actions.pod:4821
12489 "If the current file size is less than C<size> then the file is extended to "
12490 "the required size with zero bytes. This creates a sparse file (ie. disk "
12491 "blocks are not allocated for the file until you write to it). To create a "
12492 "non-sparse file of zeroes, use C<guestfs_fallocate64> instead."
12496 #: ../src/guestfs-actions.pod:4829
12497 msgid "guestfs_tune2fs_l"
12501 #: ../src/guestfs-actions.pod:4831
12504 " char **guestfs_tune2fs_l (guestfs_h *g,\n"
12505 "\t\tconst char *device);\n"
12510 #: ../src/guestfs-actions.pod:4834 ../fish/guestfish-actions.pod:3728
12512 "This returns the contents of the ext2, ext3 or ext4 filesystem superblock on "
12517 #: ../src/guestfs-actions.pod:4837 ../fish/guestfish-actions.pod:3731
12519 "It is the same as running C<tune2fs -l device>. See L<tune2fs(8)> manpage "
12520 "for more details. The list of fields returned isn't clearly defined, and "
12521 "depends on both the version of C<tune2fs> that libguestfs was built against, "
12522 "and the filesystem itself."
12526 #: ../src/guestfs-actions.pod:4848
12527 msgid "guestfs_txz_in"
12531 #: ../src/guestfs-actions.pod:4850
12534 " int guestfs_txz_in (guestfs_h *g,\n"
12535 "\t\tconst char *tarball,\n"
12536 "\t\tconst char *directory);\n"
12541 #: ../src/guestfs-actions.pod:4854 ../fish/guestfish-actions.pod:3740
12543 "This command uploads and unpacks local file C<tarball> (an I<xz compressed> "
12544 "tar file) into C<directory>."
12548 #: ../src/guestfs-actions.pod:4859
12549 msgid "guestfs_txz_out"
12553 #: ../src/guestfs-actions.pod:4861
12556 " int guestfs_txz_out (guestfs_h *g,\n"
12557 "\t\tconst char *directory,\n"
12558 "\t\tconst char *tarball);\n"
12563 #: ../src/guestfs-actions.pod:4865 ../fish/guestfish-actions.pod:3749
12565 "This command packs the contents of C<directory> and downloads it to local "
12566 "file C<tarball> (as an xz compressed tar archive)."
12570 #: ../src/guestfs-actions.pod:4870
12571 msgid "guestfs_umask"
12575 #: ../src/guestfs-actions.pod:4872
12578 " int guestfs_umask (guestfs_h *g,\n"
12584 #: ../src/guestfs-actions.pod:4875 ../fish/guestfish-actions.pod:3758
12586 "This function sets the mask used for creating new files and device nodes to "
12591 #: ../src/guestfs-actions.pod:4878 ../fish/guestfish-actions.pod:3761
12593 "Typical umask values would be C<022> which creates new files with "
12594 "permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and C<002> which creates "
12595 "new files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\"."
12599 #: ../src/guestfs-actions.pod:4883 ../fish/guestfish-actions.pod:3766
12601 "The default umask is C<022>. This is important because it means that "
12602 "directories and device nodes will be created with C<0644> or C<0755> mode "
12603 "even if you specify C<0777>."
12607 #: ../src/guestfs-actions.pod:4887
12609 "See also C<guestfs_get_umask>, L<umask(2)>, C<guestfs_mknod>, "
12610 "C<guestfs_mkdir>."
12614 #: ../src/guestfs-actions.pod:4890 ../fish/guestfish-actions.pod:3773
12615 msgid "This call returns the previous umask."
12619 #: ../src/guestfs-actions.pod:4894
12620 msgid "guestfs_umount"
12624 #: ../src/guestfs-actions.pod:4896
12627 " int guestfs_umount (guestfs_h *g,\n"
12628 "\t\tconst char *pathordevice);\n"
12633 #: ../src/guestfs-actions.pod:4899 ../fish/guestfish-actions.pod:3779
12635 "This unmounts the given filesystem. The filesystem may be specified either "
12636 "by its mountpoint (path) or the device which contains the filesystem."
12640 #: ../src/guestfs-actions.pod:4905
12641 msgid "guestfs_umount_all"
12645 #: ../src/guestfs-actions.pod:4907
12648 " int guestfs_umount_all (guestfs_h *g);\n"
12653 #: ../src/guestfs-actions.pod:4909 ../fish/guestfish-actions.pod:3787
12654 msgid "This unmounts all mounted filesystems."
12658 #: ../src/guestfs-actions.pod:4911 ../fish/guestfish-actions.pod:3789
12659 msgid "Some internal mounts are not unmounted by this call."
12663 #: ../src/guestfs-actions.pod:4915
12664 msgid "guestfs_upload"
12668 #: ../src/guestfs-actions.pod:4917
12671 " int guestfs_upload (guestfs_h *g,\n"
12672 "\t\tconst char *filename,\n"
12673 "\t\tconst char *remotefilename);\n"
12678 #: ../src/guestfs-actions.pod:4921 ../fish/guestfish-actions.pod:3795
12679 msgid "Upload local file C<filename> to C<remotefilename> on the filesystem."
12683 #: ../src/guestfs-actions.pod:4926
12684 msgid "See also C<guestfs_download>."
12688 #: ../src/guestfs-actions.pod:4930
12689 msgid "guestfs_utimens"
12693 #: ../src/guestfs-actions.pod:4932
12696 " int guestfs_utimens (guestfs_h *g,\n"
12697 "\t\tconst char *path,\n"
12698 "\t\tint64_t atsecs,\n"
12699 "\t\tint64_t atnsecs,\n"
12700 "\t\tint64_t mtsecs,\n"
12701 "\t\tint64_t mtnsecs);\n"
12706 #: ../src/guestfs-actions.pod:4939 ../fish/guestfish-actions.pod:3808
12707 msgid "This command sets the timestamps of a file with nanosecond precision."
12711 #: ../src/guestfs-actions.pod:4942 ../fish/guestfish-actions.pod:3811
12713 "C<atsecs, atnsecs> are the last access time (atime) in secs and nanoseconds "
12718 #: ../src/guestfs-actions.pod:4945 ../fish/guestfish-actions.pod:3814
12720 "C<mtsecs, mtnsecs> are the last modification time (mtime) in secs and "
12721 "nanoseconds from the epoch."
12725 #: ../src/guestfs-actions.pod:4948 ../fish/guestfish-actions.pod:3817
12727 "If the C<*nsecs> field contains the special value C<-1> then the "
12728 "corresponding timestamp is set to the current time. (The C<*secs> field is "
12729 "ignored in this case)."
12733 #: ../src/guestfs-actions.pod:4952 ../fish/guestfish-actions.pod:3821
12735 "If the C<*nsecs> field contains the special value C<-2> then the "
12736 "corresponding timestamp is left unchanged. (The C<*secs> field is ignored "
12741 #: ../src/guestfs-actions.pod:4958 ../src/guestfs-structs.pod:175
12742 msgid "guestfs_version"
12746 #: ../src/guestfs-actions.pod:4960
12749 " struct guestfs_version *guestfs_version (guestfs_h *g);\n"
12754 #: ../src/guestfs-actions.pod:4962 ../fish/guestfish-actions.pod:3829
12756 "Return the libguestfs version number that the program is linked against."
12760 #: ../src/guestfs-actions.pod:4965 ../fish/guestfish-actions.pod:3832
12762 "Note that because of dynamic linking this is not necessarily the version of "
12763 "libguestfs that you compiled against. You can compile the program, and then "
12764 "at runtime dynamically link against a completely different C<libguestfs.so> "
12769 #: ../src/guestfs-actions.pod:4970 ../fish/guestfish-actions.pod:3837
12771 "This call was added in version C<1.0.58>. In previous versions of "
12772 "libguestfs there was no way to get the version number. From C code you can "
12773 "use dynamic linker functions to find out if this symbol exists (if it "
12774 "doesn't, then it's an earlier version)."
12778 #: ../src/guestfs-actions.pod:4976 ../fish/guestfish-actions.pod:3843
12780 "The call returns a structure with four elements. The first three (C<major>, "
12781 "C<minor> and C<release>) are numbers and correspond to the usual version "
12782 "triplet. The fourth element (C<extra>) is a string and is normally empty, "
12783 "but may be used for distro-specific information."
12787 #: ../src/guestfs-actions.pod:4982 ../fish/guestfish-actions.pod:3849
12789 "To construct the original version string: C<$major.$minor.$release$extra>"
12793 #: ../src/guestfs-actions.pod:4985 ../fish/guestfish-actions.pod:3852
12794 msgid "See also: L<guestfs(3)/LIBGUESTFS VERSION NUMBERS>."
12798 #: ../src/guestfs-actions.pod:4987
12800 "I<Note:> Don't use this call to test for availability of features. In "
12801 "enterprise distributions we backport features from later versions into "
12802 "earlier versions, making this an unreliable way to test for features. Use "
12803 "C<guestfs_available> instead."
12807 #: ../src/guestfs-actions.pod:4993
12809 "This function returns a C<struct guestfs_version *>, or NULL if there was an "
12810 "error. I<The caller must call C<guestfs_free_version> after use>."
12814 #: ../src/guestfs-actions.pod:4997
12815 msgid "guestfs_vfs_label"
12819 #: ../src/guestfs-actions.pod:4999
12822 " char *guestfs_vfs_label (guestfs_h *g,\n"
12823 "\t\tconst char *device);\n"
12828 #: ../src/guestfs-actions.pod:5002 ../fish/guestfish-actions.pod:3864
12829 msgid "This returns the filesystem label of the filesystem on C<device>."
12833 #: ../src/guestfs-actions.pod:5005 ../fish/guestfish-actions.pod:3867
12834 msgid "If the filesystem is unlabeled, this returns the empty string."
12838 #: ../src/guestfs-actions.pod:5007
12839 msgid "To find a filesystem from the label, use C<guestfs_findfs_label>."
12843 #: ../src/guestfs-actions.pod:5012
12844 msgid "guestfs_vfs_type"
12848 #: ../src/guestfs-actions.pod:5014
12851 " char *guestfs_vfs_type (guestfs_h *g,\n"
12852 "\t\tconst char *device);\n"
12857 #: ../src/guestfs-actions.pod:5017 ../fish/guestfish-actions.pod:3875
12859 "This command gets the filesystem type corresponding to the filesystem on "
12864 #: ../src/guestfs-actions.pod:5020 ../fish/guestfish-actions.pod:3878
12866 "For most filesystems, the result is the name of the Linux VFS module which "
12867 "would be used to mount this filesystem if you mounted it without specifying "
12868 "the filesystem type. For example a string such as C<ext3> or C<ntfs>."
12872 #: ../src/guestfs-actions.pod:5028
12873 msgid "guestfs_vfs_uuid"
12877 #: ../src/guestfs-actions.pod:5030
12880 " char *guestfs_vfs_uuid (guestfs_h *g,\n"
12881 "\t\tconst char *device);\n"
12886 #: ../src/guestfs-actions.pod:5033 ../fish/guestfish-actions.pod:3887
12887 msgid "This returns the filesystem UUID of the filesystem on C<device>."
12891 #: ../src/guestfs-actions.pod:5036 ../fish/guestfish-actions.pod:3890
12892 msgid "If the filesystem does not have a UUID, this returns the empty string."
12896 #: ../src/guestfs-actions.pod:5038
12897 msgid "To find a filesystem from the UUID, use C<guestfs_findfs_uuid>."
12901 #: ../src/guestfs-actions.pod:5043
12902 msgid "guestfs_vg_activate"
12906 #: ../src/guestfs-actions.pod:5045
12909 " int guestfs_vg_activate (guestfs_h *g,\n"
12910 "\t\tint activate,\n"
12911 "\t\tchar *const *volgroups);\n"
12916 #: ../src/guestfs-actions.pod:5049 ../fish/guestfish-actions.pod:3898
12918 "This command activates or (if C<activate> is false) deactivates all logical "
12919 "volumes in the listed volume groups C<volgroups>. If activated, then they "
12920 "are made known to the kernel, ie. they appear as C</dev/mapper> devices. If "
12921 "deactivated, then those devices disappear."
12925 #: ../src/guestfs-actions.pod:5055 ../fish/guestfish-actions.pod:3904
12926 msgid "This command is the same as running C<vgchange -a y|n volgroups...>"
12930 #: ../src/guestfs-actions.pod:5057 ../fish/guestfish-actions.pod:3906
12932 "Note that if C<volgroups> is an empty list then B<all> volume groups are "
12933 "activated or deactivated."
12937 #: ../src/guestfs-actions.pod:5062
12938 msgid "guestfs_vg_activate_all"
12942 #: ../src/guestfs-actions.pod:5064
12945 " int guestfs_vg_activate_all (guestfs_h *g,\n"
12946 "\t\tint activate);\n"
12951 #: ../src/guestfs-actions.pod:5067 ../fish/guestfish-actions.pod:3913
12953 "This command activates or (if C<activate> is false) deactivates all logical "
12954 "volumes in all volume groups. If activated, then they are made known to the "
12955 "kernel, ie. they appear as C</dev/mapper> devices. If deactivated, then "
12956 "those devices disappear."
12960 #: ../src/guestfs-actions.pod:5073 ../fish/guestfish-actions.pod:3919
12961 msgid "This command is the same as running C<vgchange -a y|n>"
12965 #: ../src/guestfs-actions.pod:5077
12966 msgid "guestfs_vgcreate"
12970 #: ../src/guestfs-actions.pod:5079
12973 " int guestfs_vgcreate (guestfs_h *g,\n"
12974 "\t\tconst char *volgroup,\n"
12975 "\t\tchar *const *physvols);\n"
12980 #: ../src/guestfs-actions.pod:5083 ../fish/guestfish-actions.pod:3925
12982 "This creates an LVM volume group called C<volgroup> from the non-empty list "
12983 "of physical volumes C<physvols>."
12987 #: ../src/guestfs-actions.pod:5088
12988 msgid "guestfs_vglvuuids"
12992 #: ../src/guestfs-actions.pod:5090
12995 " char **guestfs_vglvuuids (guestfs_h *g,\n"
12996 "\t\tconst char *vgname);\n"
13001 #: ../src/guestfs-actions.pod:5093 ../fish/guestfish-actions.pod:3932
13003 "Given a VG called C<vgname>, this returns the UUIDs of all the logical "
13004 "volumes created in this volume group."
13008 #: ../src/guestfs-actions.pod:5096
13010 "You can use this along with C<guestfs_lvs> and C<guestfs_lvuuid> calls to "
13011 "associate logical volumes and volume groups."
13015 #: ../src/guestfs-actions.pod:5099
13016 msgid "See also C<guestfs_vgpvuuids>."
13020 #: ../src/guestfs-actions.pod:5105
13021 msgid "guestfs_vgpvuuids"
13025 #: ../src/guestfs-actions.pod:5107
13028 " char **guestfs_vgpvuuids (guestfs_h *g,\n"
13029 "\t\tconst char *vgname);\n"
13034 #: ../src/guestfs-actions.pod:5110 ../fish/guestfish-actions.pod:3944
13036 "Given a VG called C<vgname>, this returns the UUIDs of all the physical "
13037 "volumes that this volume group resides on."
13041 #: ../src/guestfs-actions.pod:5113
13043 "You can use this along with C<guestfs_pvs> and C<guestfs_pvuuid> calls to "
13044 "associate physical volumes and volume groups."
13048 #: ../src/guestfs-actions.pod:5116
13049 msgid "See also C<guestfs_vglvuuids>."
13053 #: ../src/guestfs-actions.pod:5122
13054 msgid "guestfs_vgremove"
13058 #: ../src/guestfs-actions.pod:5124
13061 " int guestfs_vgremove (guestfs_h *g,\n"
13062 "\t\tconst char *vgname);\n"
13067 #: ../src/guestfs-actions.pod:5127 ../fish/guestfish-actions.pod:3956
13068 msgid "Remove an LVM volume group C<vgname>, (for example C<VG>)."
13072 #: ../src/guestfs-actions.pod:5129 ../fish/guestfish-actions.pod:3958
13074 "This also forcibly removes all logical volumes in the volume group (if any)."
13078 #: ../src/guestfs-actions.pod:5134
13079 msgid "guestfs_vgrename"
13083 #: ../src/guestfs-actions.pod:5136
13086 " int guestfs_vgrename (guestfs_h *g,\n"
13087 "\t\tconst char *volgroup,\n"
13088 "\t\tconst char *newvolgroup);\n"
13093 #: ../src/guestfs-actions.pod:5140 ../fish/guestfish-actions.pod:3965
13094 msgid "Rename a volume group C<volgroup> with the new name C<newvolgroup>."
13098 #: ../src/guestfs-actions.pod:5144
13099 msgid "guestfs_vgs"
13103 #: ../src/guestfs-actions.pod:5146
13106 " char **guestfs_vgs (guestfs_h *g);\n"
13111 #: ../src/guestfs-actions.pod:5148 ../fish/guestfish-actions.pod:3971
13113 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
13118 #: ../src/guestfs-actions.pod:5151 ../fish/guestfish-actions.pod:3974
13120 "This returns a list of just the volume group names that were detected (eg. "
13125 #: ../src/guestfs-actions.pod:5154
13126 msgid "See also C<guestfs_vgs_full>."
13130 #: ../src/guestfs-actions.pod:5160
13131 msgid "guestfs_vgs_full"
13135 #: ../src/guestfs-actions.pod:5162
13138 " struct guestfs_lvm_vg_list *guestfs_vgs_full (guestfs_h *g);\n"
13143 #: ../src/guestfs-actions.pod:5164 ../fish/guestfish-actions.pod:3983
13145 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
13146 "> command. The \"full\" version includes all fields."
13150 #: ../src/guestfs-actions.pod:5167
13152 "This function returns a C<struct guestfs_lvm_vg_list *> (see E<lt>guestfs-"
13153 "structs.hE<gt>), or NULL if there was an error. I<The caller must call "
13154 "C<guestfs_free_lvm_vg_list> after use>."
13158 #: ../src/guestfs-actions.pod:5172
13159 msgid "guestfs_vgscan"
13163 #: ../src/guestfs-actions.pod:5174
13166 " int guestfs_vgscan (guestfs_h *g);\n"
13171 #: ../src/guestfs-actions.pod:5176 ../fish/guestfish-actions.pod:3990
13173 "This rescans all block devices and rebuilds the list of LVM physical "
13174 "volumes, volume groups and logical volumes."
13178 #: ../src/guestfs-actions.pod:5181
13179 msgid "guestfs_vguuid"
13183 #: ../src/guestfs-actions.pod:5183
13186 " char *guestfs_vguuid (guestfs_h *g,\n"
13187 "\t\tconst char *vgname);\n"
13192 #: ../src/guestfs-actions.pod:5186 ../fish/guestfish-actions.pod:3997
13193 msgid "This command returns the UUID of the LVM VG named C<vgname>."
13197 #: ../src/guestfs-actions.pod:5191
13198 msgid "guestfs_wait_ready"
13202 #: ../src/guestfs-actions.pod:5193
13205 " int guestfs_wait_ready (guestfs_h *g);\n"
13210 #: ../src/guestfs-actions.pod:5195
13211 msgid "This function is a no op."
13215 #: ../src/guestfs-actions.pod:5197
13217 "In versions of the API E<lt> 1.0.71 you had to call this function just after "
13218 "calling C<guestfs_launch> to wait for the launch to complete. However this "
13219 "is no longer necessary because C<guestfs_launch> now does the waiting."
13223 #: ../src/guestfs-actions.pod:5202
13225 "If you see any calls to this function in code then you can just remove them, "
13226 "unless you want to retain compatibility with older versions of the API."
13230 #: ../src/guestfs-actions.pod:5208
13231 msgid "guestfs_wc_c"
13235 #: ../src/guestfs-actions.pod:5210
13238 " int guestfs_wc_c (guestfs_h *g,\n"
13239 "\t\tconst char *path);\n"
13244 #: ../src/guestfs-actions.pod:5213 ../fish/guestfish-actions.pod:4003
13246 "This command counts the characters in a file, using the C<wc -c> external "
13251 #: ../src/guestfs-actions.pod:5218
13252 msgid "guestfs_wc_l"
13256 #: ../src/guestfs-actions.pod:5220
13259 " int guestfs_wc_l (guestfs_h *g,\n"
13260 "\t\tconst char *path);\n"
13265 #: ../src/guestfs-actions.pod:5223 ../fish/guestfish-actions.pod:4010
13267 "This command counts the lines in a file, using the C<wc -l> external command."
13271 #: ../src/guestfs-actions.pod:5228
13272 msgid "guestfs_wc_w"
13276 #: ../src/guestfs-actions.pod:5230
13279 " int guestfs_wc_w (guestfs_h *g,\n"
13280 "\t\tconst char *path);\n"
13285 #: ../src/guestfs-actions.pod:5233 ../fish/guestfish-actions.pod:4017
13287 "This command counts the words in a file, using the C<wc -w> external command."
13291 #: ../src/guestfs-actions.pod:5238
13292 msgid "guestfs_write"
13296 #: ../src/guestfs-actions.pod:5240
13299 " int guestfs_write (guestfs_h *g,\n"
13300 "\t\tconst char *path,\n"
13301 "\t\tconst char *content,\n"
13302 "\t\tsize_t content_size);\n"
13307 #: ../src/guestfs-actions.pod:5245 ../fish/guestfish-actions.pod:4024
13309 "This call creates a file called C<path>. The content of the file is the "
13310 "string C<content> (which can contain any 8 bit data)."
13314 #: ../src/guestfs-actions.pod:5253
13315 msgid "guestfs_write_file"
13319 #: ../src/guestfs-actions.pod:5255
13322 " int guestfs_write_file (guestfs_h *g,\n"
13323 "\t\tconst char *path,\n"
13324 "\t\tconst char *content,\n"
13330 #: ../src/guestfs-actions.pod:5260 ../fish/guestfish-actions.pod:4034
13332 "This call creates a file called C<path>. The contents of the file is the "
13333 "string C<content> (which can contain any 8 bit data), with length C<size>."
13337 #: ../src/guestfs-actions.pod:5264 ../fish/guestfish-actions.pod:4038
13339 "As a special case, if C<size> is C<0> then the length is calculated using "
13340 "C<strlen> (so in this case the content cannot contain embedded ASCII NULs)."
13344 #: ../src/guestfs-actions.pod:5268 ../fish/guestfish-actions.pod:4042
13346 "I<NB.> Owing to a bug, writing content containing ASCII NUL characters does "
13347 "I<not> work, even if the length is specified."
13351 #: ../src/guestfs-actions.pod:5276 ../fish/guestfish-actions.pod:4048
13353 "This function is deprecated. In new code, use the C<write> call instead."
13357 #: ../src/guestfs-actions.pod:5283
13358 msgid "guestfs_zegrep"
13362 #: ../src/guestfs-actions.pod:5285
13365 " char **guestfs_zegrep (guestfs_h *g,\n"
13366 "\t\tconst char *regex,\n"
13367 "\t\tconst char *path);\n"
13372 #: ../src/guestfs-actions.pod:5289 ../fish/guestfish-actions.pod:4059
13374 "This calls the external C<zegrep> program and returns the matching lines."
13378 #: ../src/guestfs-actions.pod:5299
13379 msgid "guestfs_zegrepi"
13383 #: ../src/guestfs-actions.pod:5301
13386 " char **guestfs_zegrepi (guestfs_h *g,\n"
13387 "\t\tconst char *regex,\n"
13388 "\t\tconst char *path);\n"
13393 #: ../src/guestfs-actions.pod:5305 ../fish/guestfish-actions.pod:4069
13395 "This calls the external C<zegrep -i> program and returns the matching lines."
13399 #: ../src/guestfs-actions.pod:5315
13400 msgid "guestfs_zero"
13404 #: ../src/guestfs-actions.pod:5317
13407 " int guestfs_zero (guestfs_h *g,\n"
13408 "\t\tconst char *device);\n"
13413 #: ../src/guestfs-actions.pod:5320 ../fish/guestfish-actions.pod:4079
13414 msgid "This command writes zeroes over the first few blocks of C<device>."
13418 #: ../src/guestfs-actions.pod:5322 ../fish/guestfish-actions.pod:4081
13420 "How many blocks are zeroed isn't specified (but it's I<not> enough to "
13421 "securely wipe the device). It should be sufficient to remove any partition "
13422 "tables, filesystem superblocks and so on."
13426 #: ../src/guestfs-actions.pod:5326
13427 msgid "See also: C<guestfs_zero_device>, C<guestfs_scrub_device>."
13431 #: ../src/guestfs-actions.pod:5335
13432 msgid "guestfs_zero_device"
13436 #: ../src/guestfs-actions.pod:5337
13439 " int guestfs_zero_device (guestfs_h *g,\n"
13440 "\t\tconst char *device);\n"
13445 #: ../src/guestfs-actions.pod:5340
13447 "This command writes zeroes over the entire C<device>. Compare with "
13448 "C<guestfs_zero> which just zeroes the first few blocks of a device."
13452 #: ../src/guestfs-actions.pod:5354
13453 msgid "guestfs_zerofree"
13457 #: ../src/guestfs-actions.pod:5356
13460 " int guestfs_zerofree (guestfs_h *g,\n"
13461 "\t\tconst char *device);\n"
13466 #: ../src/guestfs-actions.pod:5359 ../fish/guestfish-actions.pod:4102
13468 "This runs the I<zerofree> program on C<device>. This program claims to zero "
13469 "unused inodes and disk blocks on an ext2/3 filesystem, thus making it "
13470 "possible to compress the filesystem more effectively."
13474 #: ../src/guestfs-actions.pod:5364 ../fish/guestfish-actions.pod:4107
13475 msgid "You should B<not> run this program if the filesystem is mounted."
13479 #: ../src/guestfs-actions.pod:5367 ../fish/guestfish-actions.pod:4110
13481 "It is possible that using this program can damage the filesystem or data on "
13486 #: ../src/guestfs-actions.pod:5372
13487 msgid "guestfs_zfgrep"
13491 #: ../src/guestfs-actions.pod:5374
13494 " char **guestfs_zfgrep (guestfs_h *g,\n"
13495 "\t\tconst char *pattern,\n"
13496 "\t\tconst char *path);\n"
13501 #: ../src/guestfs-actions.pod:5378 ../fish/guestfish-actions.pod:4117
13503 "This calls the external C<zfgrep> program and returns the matching lines."
13507 #: ../src/guestfs-actions.pod:5388
13508 msgid "guestfs_zfgrepi"
13512 #: ../src/guestfs-actions.pod:5390
13515 " char **guestfs_zfgrepi (guestfs_h *g,\n"
13516 "\t\tconst char *pattern,\n"
13517 "\t\tconst char *path);\n"
13522 #: ../src/guestfs-actions.pod:5394 ../fish/guestfish-actions.pod:4127
13524 "This calls the external C<zfgrep -i> program and returns the matching lines."
13528 #: ../src/guestfs-actions.pod:5404
13529 msgid "guestfs_zfile"
13533 #: ../src/guestfs-actions.pod:5406
13536 " char *guestfs_zfile (guestfs_h *g,\n"
13537 "\t\tconst char *meth,\n"
13538 "\t\tconst char *path);\n"
13543 #: ../src/guestfs-actions.pod:5410 ../fish/guestfish-actions.pod:4137
13545 "This command runs C<file> after first decompressing C<path> using C<method>."
13549 #: ../src/guestfs-actions.pod:5413 ../fish/guestfish-actions.pod:4140
13550 msgid "C<method> must be one of C<gzip>, C<compress> or C<bzip2>."
13554 #: ../src/guestfs-actions.pod:5415
13556 "Since 1.0.63, use C<guestfs_file> instead which can now process compressed "
13561 #: ../src/guestfs-actions.pod:5421 ../fish/guestfish-actions.pod:4145
13563 "This function is deprecated. In new code, use the C<file> call instead."
13567 #: ../src/guestfs-actions.pod:5428
13568 msgid "guestfs_zgrep"
13572 #: ../src/guestfs-actions.pod:5430
13575 " char **guestfs_zgrep (guestfs_h *g,\n"
13576 "\t\tconst char *regex,\n"
13577 "\t\tconst char *path);\n"
13582 #: ../src/guestfs-actions.pod:5434 ../fish/guestfish-actions.pod:4156
13584 "This calls the external C<zgrep> program and returns the matching lines."
13588 #: ../src/guestfs-actions.pod:5444
13589 msgid "guestfs_zgrepi"
13593 #: ../src/guestfs-actions.pod:5446
13596 " char **guestfs_zgrepi (guestfs_h *g,\n"
13597 "\t\tconst char *regex,\n"
13598 "\t\tconst char *path);\n"
13603 #: ../src/guestfs-actions.pod:5450 ../fish/guestfish-actions.pod:4166
13605 "This calls the external C<zgrep -i> program and returns the matching lines."
13609 #: ../src/guestfs-availability.pod:3
13614 #: ../src/guestfs-availability.pod:5
13616 "The following functions: L</guestfs_aug_clear> L</guestfs_aug_close> L</"
13617 "guestfs_aug_defnode> L</guestfs_aug_defvar> L</guestfs_aug_get> L</"
13618 "guestfs_aug_init> L</guestfs_aug_insert> L</guestfs_aug_load> L</"
13619 "guestfs_aug_ls> L</guestfs_aug_match> L</guestfs_aug_mv> L</guestfs_aug_rm> "
13620 "L</guestfs_aug_save> L</guestfs_aug_set>"
13624 #: ../src/guestfs-availability.pod:21
13629 #: ../src/guestfs-availability.pod:23
13631 "The following functions: L</guestfs_inotify_add_watch> L</"
13632 "guestfs_inotify_close> L</guestfs_inotify_files> L</guestfs_inotify_init> L</"
13633 "guestfs_inotify_read> L</guestfs_inotify_rm_watch>"
13637 #: ../src/guestfs-availability.pod:31
13638 msgid "B<linuxfsuuid>"
13642 #: ../src/guestfs-availability.pod:33
13644 "The following functions: L</guestfs_mke2fs_JU> L</guestfs_mke2journal_U> L</"
13645 "guestfs_mkswap_U> L</guestfs_swapoff_uuid> L</guestfs_swapon_uuid>"
13649 #: ../src/guestfs-availability.pod:40
13650 msgid "B<linuxmodules>"
13654 #: ../src/guestfs-availability.pod:42
13655 msgid "The following functions: L</guestfs_modprobe>"
13659 #: ../src/guestfs-availability.pod:45
13660 msgid "B<linuxxattrs>"
13664 #: ../src/guestfs-availability.pod:47
13666 "The following functions: L</guestfs_getxattrs> L</guestfs_lgetxattrs> L</"
13667 "guestfs_lremovexattr> L</guestfs_lsetxattr> L</guestfs_lxattrlist> L</"
13668 "guestfs_removexattr> L</guestfs_setxattr>"
13672 #: ../src/guestfs-availability.pod:56
13677 #: ../src/guestfs-availability.pod:58
13679 "The following functions: L</guestfs_luks_add_key> L</guestfs_luks_close> L</"
13680 "guestfs_luks_format> L</guestfs_luks_format_cipher> L</"
13681 "guestfs_luks_kill_slot> L</guestfs_luks_open> L</guestfs_luks_open_ro>"
13685 #: ../src/guestfs-availability.pod:67
13690 #: ../src/guestfs-availability.pod:69
13692 "The following functions: L</guestfs_is_lv> L</guestfs_lvcreate> L</"
13693 "guestfs_lvm_remove_all> L</guestfs_lvm_set_filter> L</guestfs_lvremove> L</"
13694 "guestfs_lvresize> L</guestfs_lvresize_free> L</guestfs_lvs> L</"
13695 "guestfs_lvs_full> L</guestfs_pvcreate> L</guestfs_pvremove> L</"
13696 "guestfs_pvresize> L</guestfs_pvresize_size> L</guestfs_pvs> L</"
13697 "guestfs_pvs_full> L</guestfs_vg_activate> L</guestfs_vg_activate_all> L</"
13698 "guestfs_vgcreate> L</guestfs_vgremove> L</guestfs_vgs> L</guestfs_vgs_full>"
13702 #: ../src/guestfs-availability.pod:92
13707 #: ../src/guestfs-availability.pod:94
13709 "The following functions: L</guestfs_mkfifo> L</guestfs_mknod> L</"
13710 "guestfs_mknod_b> L</guestfs_mknod_c>"
13714 #: ../src/guestfs-availability.pod:100
13719 #: ../src/guestfs-availability.pod:102
13720 msgid "The following functions: L</guestfs_ntfs_3g_probe>"
13724 #: ../src/guestfs-availability.pod:105
13725 msgid "B<ntfsprogs>"
13729 #: ../src/guestfs-availability.pod:107
13731 "The following functions: L</guestfs_ntfsresize> L</guestfs_ntfsresize_size>"
13735 #: ../src/guestfs-availability.pod:111
13736 msgid "B<realpath>"
13740 #: ../src/guestfs-availability.pod:113
13741 msgid "The following functions: L</guestfs_realpath>"
13745 #: ../src/guestfs-availability.pod:116
13750 #: ../src/guestfs-availability.pod:118
13752 "The following functions: L</guestfs_scrub_device> L</guestfs_scrub_file> L</"
13753 "guestfs_scrub_freespace>"
13757 #: ../src/guestfs-availability.pod:123
13762 #: ../src/guestfs-availability.pod:125
13763 msgid "The following functions: L</guestfs_getcon> L</guestfs_setcon>"
13767 #: ../src/guestfs-availability.pod:129
13772 #: ../src/guestfs-availability.pod:131
13773 msgid "The following functions: L</guestfs_txz_in> L</guestfs_txz_out>"
13777 #: ../src/guestfs-availability.pod:135
13778 msgid "B<zerofree>"
13782 #: ../src/guestfs-availability.pod:137
13783 msgid "The following functions: L</guestfs_zerofree>"
13787 #: ../src/guestfs-structs.pod:1
13788 msgid "guestfs_int_bool"
13792 #: ../src/guestfs-structs.pod:3
13795 " struct guestfs_int_bool {\n"
13803 #: ../src/guestfs-structs.pod:8
13806 " struct guestfs_int_bool_list {\n"
13807 " uint32_t len; /* Number of elements in list. */\n"
13808 " struct guestfs_int_bool *val; /* Elements. */\n"
13814 #: ../src/guestfs-structs.pod:13
13817 " void guestfs_free_int_bool (struct guestfs_free_int_bool *);\n"
13818 " void guestfs_free_int_bool_list (struct guestfs_free_int_bool_list *);\n"
13823 #: ../src/guestfs-structs.pod:16
13824 msgid "guestfs_lvm_pv"
13828 #: ../src/guestfs-structs.pod:18
13831 " struct guestfs_lvm_pv {\n"
13832 " char *pv_name;\n"
13833 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
13834 " char pv_uuid[32];\n"
13836 " uint64_t pv_size;\n"
13837 " uint64_t dev_size;\n"
13838 " uint64_t pv_free;\n"
13839 " uint64_t pv_used;\n"
13840 " char *pv_attr;\n"
13841 " int64_t pv_pe_count;\n"
13842 " int64_t pv_pe_alloc_count;\n"
13843 " char *pv_tags;\n"
13844 " uint64_t pe_start;\n"
13845 " int64_t pv_mda_count;\n"
13846 " uint64_t pv_mda_free;\n"
13852 #: ../src/guestfs-structs.pod:36
13855 " struct guestfs_lvm_pv_list {\n"
13856 " uint32_t len; /* Number of elements in list. */\n"
13857 " struct guestfs_lvm_pv *val; /* Elements. */\n"
13863 #: ../src/guestfs-structs.pod:41
13866 " void guestfs_free_lvm_pv (struct guestfs_free_lvm_pv *);\n"
13867 " void guestfs_free_lvm_pv_list (struct guestfs_free_lvm_pv_list *);\n"
13872 #: ../src/guestfs-structs.pod:44
13873 msgid "guestfs_lvm_vg"
13877 #: ../src/guestfs-structs.pod:46
13880 " struct guestfs_lvm_vg {\n"
13881 " char *vg_name;\n"
13882 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
13883 " char vg_uuid[32];\n"
13885 " char *vg_attr;\n"
13886 " uint64_t vg_size;\n"
13887 " uint64_t vg_free;\n"
13888 " char *vg_sysid;\n"
13889 " uint64_t vg_extent_size;\n"
13890 " int64_t vg_extent_count;\n"
13891 " int64_t vg_free_count;\n"
13892 " int64_t max_lv;\n"
13893 " int64_t max_pv;\n"
13894 " int64_t pv_count;\n"
13895 " int64_t lv_count;\n"
13896 " int64_t snap_count;\n"
13897 " int64_t vg_seqno;\n"
13898 " char *vg_tags;\n"
13899 " int64_t vg_mda_count;\n"
13900 " uint64_t vg_mda_free;\n"
13906 #: ../src/guestfs-structs.pod:69
13909 " struct guestfs_lvm_vg_list {\n"
13910 " uint32_t len; /* Number of elements in list. */\n"
13911 " struct guestfs_lvm_vg *val; /* Elements. */\n"
13917 #: ../src/guestfs-structs.pod:74
13920 " void guestfs_free_lvm_vg (struct guestfs_free_lvm_vg *);\n"
13921 " void guestfs_free_lvm_vg_list (struct guestfs_free_lvm_vg_list *);\n"
13926 #: ../src/guestfs-structs.pod:77
13927 msgid "guestfs_lvm_lv"
13931 #: ../src/guestfs-structs.pod:79
13934 " struct guestfs_lvm_lv {\n"
13935 " char *lv_name;\n"
13936 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
13937 " char lv_uuid[32];\n"
13938 " char *lv_attr;\n"
13939 " int64_t lv_major;\n"
13940 " int64_t lv_minor;\n"
13941 " int64_t lv_kernel_major;\n"
13942 " int64_t lv_kernel_minor;\n"
13943 " uint64_t lv_size;\n"
13944 " int64_t seg_count;\n"
13946 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
13947 " float snap_percent;\n"
13948 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
13949 " float copy_percent;\n"
13950 " char *move_pv;\n"
13951 " char *lv_tags;\n"
13952 " char *mirror_log;\n"
13953 " char *modules;\n"
13959 #: ../src/guestfs-structs.pod:101
13962 " struct guestfs_lvm_lv_list {\n"
13963 " uint32_t len; /* Number of elements in list. */\n"
13964 " struct guestfs_lvm_lv *val; /* Elements. */\n"
13970 #: ../src/guestfs-structs.pod:106
13973 " void guestfs_free_lvm_lv (struct guestfs_free_lvm_lv *);\n"
13974 " void guestfs_free_lvm_lv_list (struct guestfs_free_lvm_lv_list *);\n"
13979 #: ../src/guestfs-structs.pod:111
13982 " struct guestfs_stat {\n"
13986 " int64_t nlink;\n"
13991 " int64_t blksize;\n"
13992 " int64_t blocks;\n"
13993 " int64_t atime;\n"
13994 " int64_t mtime;\n"
13995 " int64_t ctime;\n"
14001 #: ../src/guestfs-structs.pod:127
14004 " struct guestfs_stat_list {\n"
14005 " uint32_t len; /* Number of elements in list. */\n"
14006 " struct guestfs_stat *val; /* Elements. */\n"
14012 #: ../src/guestfs-structs.pod:132
14015 " void guestfs_free_stat (struct guestfs_free_stat *);\n"
14016 " void guestfs_free_stat_list (struct guestfs_free_stat_list *);\n"
14021 #: ../src/guestfs-structs.pod:137
14024 " struct guestfs_statvfs {\n"
14025 " int64_t bsize;\n"
14026 " int64_t frsize;\n"
14027 " int64_t blocks;\n"
14028 " int64_t bfree;\n"
14029 " int64_t bavail;\n"
14030 " int64_t files;\n"
14031 " int64_t ffree;\n"
14032 " int64_t favail;\n"
14035 " int64_t namemax;\n"
14041 #: ../src/guestfs-structs.pod:151
14044 " struct guestfs_statvfs_list {\n"
14045 " uint32_t len; /* Number of elements in list. */\n"
14046 " struct guestfs_statvfs *val; /* Elements. */\n"
14052 #: ../src/guestfs-structs.pod:156
14055 " void guestfs_free_statvfs (struct guestfs_free_statvfs *);\n"
14056 " void guestfs_free_statvfs_list (struct guestfs_free_statvfs_list *);\n"
14061 #: ../src/guestfs-structs.pod:159
14062 msgid "guestfs_dirent"
14066 #: ../src/guestfs-structs.pod:161
14069 " struct guestfs_dirent {\n"
14078 #: ../src/guestfs-structs.pod:167
14081 " struct guestfs_dirent_list {\n"
14082 " uint32_t len; /* Number of elements in list. */\n"
14083 " struct guestfs_dirent *val; /* Elements. */\n"
14089 #: ../src/guestfs-structs.pod:172
14092 " void guestfs_free_dirent (struct guestfs_free_dirent *);\n"
14093 " void guestfs_free_dirent_list (struct guestfs_free_dirent_list *);\n"
14098 #: ../src/guestfs-structs.pod:177
14101 " struct guestfs_version {\n"
14102 " int64_t major;\n"
14103 " int64_t minor;\n"
14104 " int64_t release;\n"
14111 #: ../src/guestfs-structs.pod:184
14114 " struct guestfs_version_list {\n"
14115 " uint32_t len; /* Number of elements in list. */\n"
14116 " struct guestfs_version *val; /* Elements. */\n"
14122 #: ../src/guestfs-structs.pod:189
14125 " void guestfs_free_version (struct guestfs_free_version *);\n"
14126 " void guestfs_free_version_list (struct guestfs_free_version_list *);\n"
14131 #: ../src/guestfs-structs.pod:192
14132 msgid "guestfs_xattr"
14136 #: ../src/guestfs-structs.pod:194
14139 " struct guestfs_xattr {\n"
14140 " char *attrname;\n"
14141 " /* The next two fields describe a byte array. */\n"
14142 " uint32_t attrval_len;\n"
14143 " char *attrval;\n"
14149 #: ../src/guestfs-structs.pod:201
14152 " struct guestfs_xattr_list {\n"
14153 " uint32_t len; /* Number of elements in list. */\n"
14154 " struct guestfs_xattr *val; /* Elements. */\n"
14160 #: ../src/guestfs-structs.pod:206
14163 " void guestfs_free_xattr (struct guestfs_free_xattr *);\n"
14164 " void guestfs_free_xattr_list (struct guestfs_free_xattr_list *);\n"
14169 #: ../src/guestfs-structs.pod:209
14170 msgid "guestfs_inotify_event"
14174 #: ../src/guestfs-structs.pod:211
14177 " struct guestfs_inotify_event {\n"
14178 " int64_t in_wd;\n"
14179 " uint32_t in_mask;\n"
14180 " uint32_t in_cookie;\n"
14181 " char *in_name;\n"
14187 #: ../src/guestfs-structs.pod:218
14190 " struct guestfs_inotify_event_list {\n"
14191 " uint32_t len; /* Number of elements in list. */\n"
14192 " struct guestfs_inotify_event *val; /* Elements. */\n"
14198 #: ../src/guestfs-structs.pod:223
14201 " void guestfs_free_inotify_event (struct guestfs_free_inotify_event *);\n"
14202 " void guestfs_free_inotify_event_list (struct guestfs_free_inotify_event_list *);\n"
14207 #: ../src/guestfs-structs.pod:226
14208 msgid "guestfs_partition"
14212 #: ../src/guestfs-structs.pod:228
14215 " struct guestfs_partition {\n"
14216 " int32_t part_num;\n"
14217 " uint64_t part_start;\n"
14218 " uint64_t part_end;\n"
14219 " uint64_t part_size;\n"
14225 #: ../src/guestfs-structs.pod:235
14228 " struct guestfs_partition_list {\n"
14229 " uint32_t len; /* Number of elements in list. */\n"
14230 " struct guestfs_partition *val; /* Elements. */\n"
14236 #: ../src/guestfs-structs.pod:240
14239 " void guestfs_free_partition (struct guestfs_free_partition *);\n"
14240 " void guestfs_free_partition_list (struct guestfs_free_partition_list *);\n"
14245 #: ../fish/guestfish.pod:5
14246 msgid "guestfish - the libguestfs Filesystem Interactive SHell"
14250 #: ../fish/guestfish.pod:9
14253 " guestfish [--options] [commands]\n"
14258 #: ../fish/guestfish.pod:11
14266 #: ../fish/guestfish.pod:13
14269 " guestfish -a disk.img\n"
14274 #: ../fish/guestfish.pod:15
14277 " guestfish -a disk.img -m dev[:mountpoint]\n"
14282 #: ../fish/guestfish.pod:17
14285 " guestfish -d libvirt-domain\n"
14290 #: ../fish/guestfish.pod:19
14293 " guestfish -a disk.img -i\n"
14298 #: ../fish/guestfish.pod:21
14301 " guestfish -d libvirt-domain -i\n"
14306 #: ../fish/guestfish.pod:23 ../fuse/guestmount.pod:11 ../tools/virt-edit.pl:45
14307 #: ../tools/virt-rescue.pl:41 ../tools/virt-tar.pl:60
14308 #: ../tools/virt-win-reg.pl:52
14313 #: ../fish/guestfish.pod:25
14315 "Using guestfish in read/write mode on live virtual machines can be "
14316 "dangerous, potentially causing disk corruption. Use the I<--ro> (read-only) "
14317 "option to use guestfish safely if the disk image or virtual machine might be "
14322 #: ../fish/guestfish.pod:30 ../fish/guestfish.pod:729
14323 #: ../fuse/guestmount.pod:35 ../tools/virt-cat.pl:51 ../tools/virt-edit.pl:59
14324 #: ../tools/virt-resize.pl:66 ../tools/virt-tar.pl:46
14329 #: ../fish/guestfish.pod:32
14330 msgid "As an interactive shell"
14334 #: ../fish/guestfish.pod:34
14342 #: ../fish/guestfish.pod:36
14345 " Welcome to guestfish, the libguestfs filesystem interactive shell for\n"
14346 " editing virtual machine filesystems.\n"
14351 #: ../fish/guestfish.pod:39
14354 " Type: 'help' for a list of commands\n"
14355 " 'man' to read the manual\n"
14356 " 'quit' to quit the shell\n"
14361 #: ../fish/guestfish.pod:43
14369 #: ../fish/guestfish.pod:45
14370 msgid "From shell scripts"
14374 #: ../fish/guestfish.pod:47
14375 msgid "Create a new C</etc/motd> file in a guest:"
14379 #: ../fish/guestfish.pod:49
14382 " guestfish <<_EOF_\n"
14385 " mount /dev/vg_guest/lv_root /\n"
14386 " write /etc/motd \"Welcome, new users\"\n"
14392 #: ../fish/guestfish.pod:56
14393 msgid "List the LVM logical volumes in a guest:"
14397 #: ../fish/guestfish.pod:58
14400 " guestfish -a disk.img --ro <<_EOF_\n"
14408 #: ../fish/guestfish.pod:63
14409 msgid "On one command line"
14413 #: ../fish/guestfish.pod:65
14414 msgid "Update C</etc/resolv.conf> in a guest:"
14418 #: ../fish/guestfish.pod:67
14422 " add disk.img : run : mount /dev/vg_guest/lv_root / : \\\n"
14423 " write /etc/resolv.conf \"nameserver 1.2.3.4\"\n"
14428 #: ../fish/guestfish.pod:71
14429 msgid "Edit C</boot/grub/grub.conf> interactively:"
14433 #: ../fish/guestfish.pod:73
14436 " guestfish --add disk.img \\\n"
14437 " --mount /dev/vg_guest/lv_root \\\n"
14438 " --mount /dev/sda1:/boot \\\n"
14439 " edit /boot/grub/grub.conf\n"
14444 #: ../fish/guestfish.pod:78
14445 msgid "Mount disks automatically"
14449 #: ../fish/guestfish.pod:80
14451 "Use the I<-i> option to automatically mount the disks from a virtual machine:"
14455 #: ../fish/guestfish.pod:83
14458 " guestfish --ro -a disk.img -i cat /etc/group\n"
14463 #: ../fish/guestfish.pod:85
14466 " guestfish --ro -d libvirt-domain -i cat /etc/group\n"
14471 #: ../fish/guestfish.pod:87
14472 msgid "As a script interpreter"
14476 #: ../fish/guestfish.pod:89
14477 msgid "Create a 100MB disk containing an ext2-formatted partition:"
14481 #: ../fish/guestfish.pod:91
14484 " #!/usr/bin/guestfish -f\n"
14485 " sparse test1.img 100M\n"
14487 " part-disk /dev/sda mbr\n"
14488 " mkfs ext2 /dev/sda1\n"
14493 #: ../fish/guestfish.pod:97
14494 msgid "Start with a prepared disk"
14498 #: ../fish/guestfish.pod:99
14500 "An alternate way to create a 100MB disk called C<test1.img> containing a "
14501 "single ext2-formatted partition:"
14505 #: ../fish/guestfish.pod:102
14508 " guestfish -N fs\n"
14513 #: ../fish/guestfish.pod:104
14514 msgid "To list what is available do:"
14518 #: ../fish/guestfish.pod:106 ../fish/guestfish.pod:720
14521 " guestfish -N list | less\n"
14526 #: ../fish/guestfish.pod:108
14527 msgid "Remote control"
14531 #: ../fish/guestfish.pod:110
14534 " eval `guestfish --listen --ro`\n"
14535 " guestfish --remote add disk.img\n"
14536 " guestfish --remote run\n"
14537 " guestfish --remote lvs\n"
14542 #: ../fish/guestfish.pod:117
14544 "Guestfish is a shell and command-line tool for examining and modifying "
14545 "virtual machine filesystems. It uses libguestfs and exposes all of the "
14546 "functionality of the guestfs API, see L<guestfs(3)>."
14550 #: ../fish/guestfish.pod:121
14552 "Guestfish gives you structured access to the libguestfs API, from shell "
14553 "scripts or the command line or interactively. If you want to rescue a "
14554 "broken virtual machine image, you should look at the L<virt-rescue(1)> "
14559 #: ../fish/guestfish.pod:126 ../test-tool/libguestfs-test-tool.pod:37
14560 #: ../fuse/guestmount.pod:70 ../inspector/virt-inspector.pl:75
14561 #: ../tools/virt-cat.pl:80 ../tools/virt-df.pl:71 ../tools/virt-edit.pl:73
14562 #: ../tools/virt-list-filesystems.pl:50 ../tools/virt-list-partitions.pl:51
14563 #: ../tools/virt-ls.pl:79 ../tools/virt-make-fs.pl:153
14564 #: ../tools/virt-rescue.pl:103 ../tools/virt-resize.pl:233
14565 #: ../tools/virt-tar.pl:99 ../tools/virt-win-reg.pl:172
14570 #: ../fish/guestfish.pod:130 ../fuse/guestmount.pod:94
14571 #: ../inspector/virt-inspector.pl:83 ../tools/virt-cat.pl:88
14572 #: ../tools/virt-df.pl:79 ../tools/virt-edit.pl:81
14573 #: ../tools/virt-list-filesystems.pl:58 ../tools/virt-list-partitions.pl:59
14574 #: ../tools/virt-ls.pl:87 ../tools/virt-make-fs.pl:161
14575 #: ../tools/virt-rescue.pl:111 ../tools/virt-resize.pl:241
14576 #: ../tools/virt-tar.pl:107 ../tools/virt-win-reg.pl:180
14581 #: ../fish/guestfish.pod:132
14582 msgid "Displays general help on options."
14586 #: ../fish/guestfish.pod:134
14587 msgid "B<-h> | B<--cmd-help>"
14591 #: ../fish/guestfish.pod:136
14592 msgid "Lists all available guestfish commands."
14596 #: ../fish/guestfish.pod:138
14597 msgid "B<-h cmd> | B<--cmd-help cmd>"
14601 #: ../fish/guestfish.pod:140
14602 msgid "Displays detailed help on a single command C<cmd>."
14606 #: ../fish/guestfish.pod:142 ../fuse/guestmount.pod:74
14607 msgid "B<-a image> | B<--add image>"
14611 #: ../fish/guestfish.pod:144
14612 msgid "Add a block device or virtual machine image to the shell."
14616 #: ../fish/guestfish.pod:146
14617 msgid "B<-c URI> | B<--connect URI>"
14621 #: ../fish/guestfish.pod:148
14623 "When used in conjunction with the I<-d> option, this specifies the libvirt "
14624 "URI to use. The default is to use the default libvirt connection."
14628 #: ../fish/guestfish.pod:152
14629 msgid "B<-d libvirt-domain> | B<--domain libvirt-domain>"
14633 #: ../fish/guestfish.pod:154
14635 "Add disks from the named libvirt domain. If the I<--ro> option is also "
14636 "used, then any libvirt domain can be used. However in write mode, only "
14637 "libvirt domains which are shut down can be named here."
14641 #: ../fish/guestfish.pod:158
14642 msgid "B<-D> | B<--no-dest-paths>"
14646 #: ../fish/guestfish.pod:160
14648 "Don't tab-complete paths on the guest filesystem. It is useful to be able "
14649 "to hit the tab key to complete paths on the guest filesystem, but this "
14650 "causes extra \"hidden\" guestfs calls to be made, so this option is here to "
14651 "allow this feature to be disabled."
14655 #: ../fish/guestfish.pod:165
14656 msgid "B<-f file> | B<--file file>"
14660 #: ../fish/guestfish.pod:167
14661 msgid "Read commands from C<file>. To write pure guestfish scripts, use:"
14665 #: ../fish/guestfish.pod:170
14668 " #!/usr/bin/guestfish -f\n"
14673 #: ../fish/guestfish.pod:172
14674 msgid "B<-i> | B<--inspector>"
14678 #: ../fish/guestfish.pod:174
14680 "Using L<virt-inspector(1)> code, inspect the disks looking for an operating "
14681 "system and mount filesystems as they would be mounted on the real virtual "
14686 #: ../fish/guestfish.pod:178
14687 msgid "Typical usage is either:"
14691 #: ../fish/guestfish.pod:180
14694 " guestfish -d myguest -i\n"
14699 #: ../fish/guestfish.pod:182
14700 msgid "(for an inactive libvirt domain called I<myguest>), or:"
14704 #: ../fish/guestfish.pod:184
14707 " guestfish --ro -d myguest -i\n"
14712 #: ../fish/guestfish.pod:186
14713 msgid "(for active domains, readonly), or specify the block device directly:"
14717 #: ../fish/guestfish.pod:188
14720 " guestfish -a /dev/Guests/MyGuest -i\n"
14725 #: ../fish/guestfish.pod:190
14727 "Note that the command line syntax changed slightly over older versions of "
14728 "guestfish. You can still use the old syntax:"
14732 #: ../fish/guestfish.pod:193
14735 " guestfish [--ro] -i disk.img\n"
14740 #: ../fish/guestfish.pod:195
14743 " guestfish [--ro] -i libvirt-domain\n"
14748 #: ../fish/guestfish.pod:197
14749 msgid "B<--keys-from-stdin>"
14753 #: ../fish/guestfish.pod:199
14755 "Read key or passphrase parameters from stdin. The default is to try to read "
14756 "passphrases from the user by opening C</dev/tty>."
14760 #: ../fish/guestfish.pod:202
14761 msgid "B<--listen>"
14765 #: ../fish/guestfish.pod:204
14767 "Fork into the background and listen for remote commands. See section L</"
14768 "REMOTE CONTROL GUESTFISH OVER A SOCKET> below."
14772 #: ../fish/guestfish.pod:207
14773 msgid "B<-m dev[:mountpoint]> | B<--mount dev[:mountpoint]>"
14777 #: ../fish/guestfish.pod:209
14778 msgid "Mount the named partition or logical volume on the given mountpoint."
14782 #: ../fish/guestfish.pod:211
14783 msgid "If the mountpoint is omitted, it defaults to C</>."
14787 #: ../fish/guestfish.pod:213
14788 msgid "You have to mount something on C</> before most commands will work."
14792 #: ../fish/guestfish.pod:215
14794 "If any I<-m> or I<--mount> options are given, the guest is automatically "
14799 #: ../fish/guestfish.pod:218
14801 "If you don't know what filesystems a disk image contains, you can either run "
14802 "guestfish without this option, then list the partitions and LVs available "
14803 "(see L</list-partitions> and L</lvs> commands), or you can use the L<virt-"
14804 "list-filesystems(1)> program."
14808 #: ../fish/guestfish.pod:223 ../fuse/guestmount.pod:106
14809 msgid "B<-n> | B<--no-sync>"
14813 #: ../fish/guestfish.pod:225
14815 "Disable autosync. This is enabled by default. See the discussion of "
14816 "autosync in the L<guestfs(3)> manpage."
14820 #: ../fish/guestfish.pod:228
14821 msgid "B<-N type> | B<--new type> | B<-N list>"
14825 #: ../fish/guestfish.pod:230
14827 "Prepare a fresh disk image formatted as \"type\". This is an alternative to "
14828 "the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a "
14829 "preformatted disk with a filesystem and adds it. See L</PREPARED DISK "
14834 #: ../fish/guestfish.pod:235
14835 msgid "B<--progress-bars>"
14839 #: ../fish/guestfish.pod:237
14840 msgid "Enable progress bars, even when guestfish is used non-interactively."
14844 #: ../fish/guestfish.pod:239
14846 "Progress bars are enabled by default when guestfish is used as an "
14847 "interactive shell."
14851 #: ../fish/guestfish.pod:242
14852 msgid "B<--no-progress-bars>"
14856 #: ../fish/guestfish.pod:244
14857 msgid "Disable progress bars."
14861 #: ../fish/guestfish.pod:246
14862 msgid "B<--remote[=pid]>"
14866 #: ../fish/guestfish.pod:248
14868 "Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section L</REMOTE "
14869 "CONTROL GUESTFISH OVER A SOCKET> below."
14873 #: ../fish/guestfish.pod:251 ../fuse/guestmount.pod:148
14874 msgid "B<-r> | B<--ro>"
14878 #: ../fish/guestfish.pod:253
14880 "This changes the I<-a> and I<-m> options so that disks are added and mounts "
14881 "are done read-only (see L<guestfs(3)/guestfs_mount_ro>)."
14885 #: ../fish/guestfish.pod:256 ../tools/virt-rescue.pl:162
14887 "The option must always be used if the disk image or virtual machine might be "
14888 "running, and is generally recommended in cases where you don't need write "
14889 "access to the disk."
14893 #: ../fish/guestfish.pod:260
14895 "Note that prepared disk images created with I<-N> are not affected by the "
14900 #: ../fish/guestfish.pod:263 ../fuse/guestmount.pod:158
14901 #: ../tools/virt-rescue.pl:170
14902 msgid "B<--selinux>"
14906 #: ../fish/guestfish.pod:265
14907 msgid "Enable SELinux support for the guest. See L<guestfs(3)/SELINUX>."
14911 #: ../fish/guestfish.pod:267 ../fuse/guestmount.pod:168
14912 msgid "B<-v> | B<--verbose>"
14916 #: ../fish/guestfish.pod:269
14918 "Enable very verbose messages. This is particularly useful if you find a bug."
14922 #: ../fish/guestfish.pod:272 ../fuse/guestmount.pod:172
14923 msgid "B<-V> | B<--version>"
14927 #: ../fish/guestfish.pod:274
14928 msgid "Display the guestfish / libguestfs version number and exit."
14932 #: ../fish/guestfish.pod:276
14937 #: ../fish/guestfish.pod:278
14938 msgid "Echo each command before executing it."
14942 #: ../fish/guestfish.pod:282
14943 msgid "COMMANDS ON COMMAND LINE"
14947 #: ../fish/guestfish.pod:284
14949 "Any additional (non-option) arguments are treated as commands to execute."
14953 #: ../fish/guestfish.pod:287
14955 "Commands to execute should be separated by a colon (C<:>), where the colon "
14956 "is a separate parameter. Thus:"
14960 #: ../fish/guestfish.pod:290
14963 " guestfish cmd [args...] : cmd [args...] : cmd [args...] ...\n"
14968 #: ../fish/guestfish.pod:292
14970 "If there are no additional arguments, then we enter a shell, either an "
14971 "interactive shell with a prompt (if the input is a terminal) or a non-"
14972 "interactive shell."
14976 #: ../fish/guestfish.pod:296
14978 "In either command line mode or non-interactive shell, the first command that "
14979 "gives an error causes the whole shell to exit. In interactive mode (with a "
14980 "prompt) if a command fails, you can continue to enter commands."
14984 #: ../fish/guestfish.pod:301
14985 msgid "USING launch (OR run)"
14989 #: ../fish/guestfish.pod:303
14991 "As with L<guestfs(3)>, you must first configure your guest by adding disks, "
14992 "then launch it, then mount any disks you need, and finally issue actions/"
14993 "commands. So the general order of the day is:"
14997 #: ../fish/guestfish.pod:311
14998 msgid "add or -a/--add"
15002 #: ../fish/guestfish.pod:315
15003 msgid "launch (aka run)"
15007 #: ../fish/guestfish.pod:319
15008 msgid "mount or -m/--mount"
15012 #: ../fish/guestfish.pod:323
15013 msgid "any other commands"
15017 #: ../fish/guestfish.pod:327
15019 "C<run> is a synonym for C<launch>. You must C<launch> (or C<run>) your "
15020 "guest before mounting or performing any other commands."
15024 #: ../fish/guestfish.pod:330
15026 "The only exception is that if the I<-m> or I<--mount> option was given, the "
15027 "guest is automatically run for you (simply because guestfish can't mount the "
15028 "disks you asked for without doing this)."
15032 #: ../fish/guestfish.pod:334
15037 #: ../fish/guestfish.pod:336
15039 "You can quote ordinary parameters using either single or double quotes. For "
15044 #: ../fish/guestfish.pod:339
15047 " add \"file with a space.img\"\n"
15052 #: ../fish/guestfish.pod:341
15055 " rm '/file name'\n"
15060 #: ../fish/guestfish.pod:343
15068 #: ../fish/guestfish.pod:345
15070 "A few commands require a list of strings to be passed. For these, use a "
15071 "whitespace-separated list, enclosed in quotes. Strings containing "
15072 "whitespace to be passed through must be enclosed in single quotes. A "
15073 "literal single quote must be escaped with a backslash."
15077 #: ../fish/guestfish.pod:350
15080 " vgcreate VG \"/dev/sda1 /dev/sdb1\"\n"
15081 " command \"/bin/echo 'foo bar'\"\n"
15082 " command \"/bin/echo \\'foo\\'\"\n"
15087 #: ../fish/guestfish.pod:354
15092 #: ../fish/guestfish.pod:356
15094 "This section applies to all commands which can take integers as parameters."
15098 #: ../fish/guestfish.pod:359
15099 msgid "SIZE SUFFIX"
15103 #: ../fish/guestfish.pod:361
15105 "When the command takes a parameter measured in bytes, you can use one of the "
15106 "following suffixes to specify kilobytes, megabytes and larger sizes:"
15110 #: ../fish/guestfish.pod:367
15111 msgid "B<k> or B<K> or B<KiB>"
15115 #: ../fish/guestfish.pod:369
15116 msgid "The size in kilobytes (multiplied by 1024)."
15120 #: ../fish/guestfish.pod:371
15125 #: ../fish/guestfish.pod:373
15126 msgid "The size in SI 1000 byte units."
15130 #: ../fish/guestfish.pod:375
15131 msgid "B<M> or B<MiB>"
15135 #: ../fish/guestfish.pod:377
15136 msgid "The size in megabytes (multiplied by 1048576)."
15140 #: ../fish/guestfish.pod:379
15145 #: ../fish/guestfish.pod:381
15146 msgid "The size in SI 1000000 byte units."
15150 #: ../fish/guestfish.pod:383
15151 msgid "B<G> or B<GiB>"
15155 #: ../fish/guestfish.pod:385
15156 msgid "The size in gigabytes (multiplied by 2**30)."
15160 #: ../fish/guestfish.pod:387
15165 #: ../fish/guestfish.pod:389
15166 msgid "The size in SI 10**9 byte units."
15170 #: ../fish/guestfish.pod:391
15171 msgid "B<T> or B<TiB>"
15175 #: ../fish/guestfish.pod:393
15176 msgid "The size in terabytes (multiplied by 2**40)."
15180 #: ../fish/guestfish.pod:395
15185 #: ../fish/guestfish.pod:397
15186 msgid "The size in SI 10**12 byte units."
15190 #: ../fish/guestfish.pod:399
15191 msgid "B<P> or B<PiB>"
15195 #: ../fish/guestfish.pod:401
15196 msgid "The size in petabytes (multiplied by 2**50)."
15200 #: ../fish/guestfish.pod:403
15205 #: ../fish/guestfish.pod:405
15206 msgid "The size in SI 10**15 byte units."
15210 #: ../fish/guestfish.pod:407
15211 msgid "B<E> or B<EiB>"
15215 #: ../fish/guestfish.pod:409
15216 msgid "The size in exabytes (multiplied by 2**60)."
15220 #: ../fish/guestfish.pod:411
15225 #: ../fish/guestfish.pod:413
15226 msgid "The size in SI 10**18 byte units."
15230 #: ../fish/guestfish.pod:415
15231 msgid "B<Z> or B<ZiB>"
15235 #: ../fish/guestfish.pod:417
15236 msgid "The size in zettabytes (multiplied by 2**70)."
15240 #: ../fish/guestfish.pod:419
15245 #: ../fish/guestfish.pod:421
15246 msgid "The size in SI 10**21 byte units."
15250 #: ../fish/guestfish.pod:423
15251 msgid "B<Y> or B<YiB>"
15255 #: ../fish/guestfish.pod:425
15256 msgid "The size in yottabytes (multiplied by 2**80)."
15260 #: ../fish/guestfish.pod:427
15265 #: ../fish/guestfish.pod:429
15266 msgid "The size in SI 10**24 byte units."
15270 #: ../fish/guestfish.pod:433
15271 msgid "For example:"
15275 #: ../fish/guestfish.pod:435
15278 " truncate-size /file 1G\n"
15283 #: ../fish/guestfish.pod:437
15284 msgid "would truncate the file to 1 gigabyte."
15288 #: ../fish/guestfish.pod:439
15290 "Be careful because a few commands take sizes in kilobytes or megabytes (eg. "
15291 "the parameter to L</memsize> is specified in megabytes already). Adding a "
15292 "suffix will probably not do what you expect."
15296 #: ../fish/guestfish.pod:443
15297 msgid "OCTAL AND HEXADECIMAL NUMBERS"
15301 #: ../fish/guestfish.pod:445
15303 "For specifying the radix (base) use the C convention: C<0> to prefix an "
15304 "octal number or C<0x> to prefix a hexadecimal number. For example:"
15308 #: ../fish/guestfish.pod:448
15311 " 1234 decimal number 1234\n"
15312 " 02322 octal number, equivalent to decimal 1234\n"
15313 " 0x4d2 hexadecimal number, equivalent to decimal 1234\n"
15318 #: ../fish/guestfish.pod:452
15320 "When using the C<chmod> command, you almost always want to specify an octal "
15321 "number for the mode, and you must prefix it with C<0> (unlike the Unix "
15322 "L<chmod(1)> program):"
15326 #: ../fish/guestfish.pod:456
15329 " chmod 0777 /public # OK\n"
15330 " chmod 777 /public # WRONG! This is mode 777 decimal = 01411 octal.\n"
15335 #: ../fish/guestfish.pod:459
15337 "Commands that return numbers usually print them in decimal, but some "
15338 "commands print numbers in other radices (eg. C<umask> prints the mode in "
15339 "octal, preceeded by C<0>)."
15343 #: ../fish/guestfish.pod:463
15344 msgid "WILDCARDS AND GLOBBING"
15348 #: ../fish/guestfish.pod:465
15350 "Neither guestfish nor the underlying guestfs API performs wildcard expansion "
15351 "(globbing) by default. So for example the following will not do what you "
15356 #: ../fish/guestfish.pod:469
15364 #: ../fish/guestfish.pod:471
15366 "Assuming you don't have a directory literally called C</home/*> then the "
15367 "above command will return an error."
15371 #: ../fish/guestfish.pod:474
15372 msgid "To perform wildcard expansion, use the C<glob> command."
15376 #: ../fish/guestfish.pod:476
15379 " glob rm-rf /home/*\n"
15384 #: ../fish/guestfish.pod:478
15386 "runs C<rm-rf> on each path that matches (ie. potentially running the command "
15387 "many times), equivalent to:"
15391 #: ../fish/guestfish.pod:481
15394 " rm-rf /home/jim\n"
15395 " rm-rf /home/joe\n"
15396 " rm-rf /home/mary\n"
15401 #: ../fish/guestfish.pod:485
15402 msgid "C<glob> only works on simple guest paths and not on device names."
15406 #: ../fish/guestfish.pod:487
15408 "If you have several parameters, each containing a wildcard, then glob will "
15409 "perform a cartesian product."
15413 #: ../fish/guestfish.pod:490
15418 #: ../fish/guestfish.pod:492
15420 "Any line which starts with a I<#> character is treated as a comment and "
15421 "ignored. The I<#> can optionally be preceeded by whitespace, but B<not> by "
15422 "a command. For example:"
15426 #: ../fish/guestfish.pod:496
15429 " # this is a comment\n"
15430 " # this is a comment\n"
15431 " foo # NOT a comment\n"
15436 #: ../fish/guestfish.pod:500
15437 msgid "Blank lines are also ignored."
15441 #: ../fish/guestfish.pod:502
15442 msgid "RUNNING COMMANDS LOCALLY"
15446 #: ../fish/guestfish.pod:504
15448 "Any line which starts with a I<!> character is treated as a command sent to "
15449 "the local shell (C</bin/sh> or whatever L<system(3)> uses). For example:"
15453 #: ../fish/guestfish.pod:508
15457 " tgz-out /remote local/remote-data.tar.gz\n"
15462 #: ../fish/guestfish.pod:511
15464 "will create a directory C<local> on the host, and then export the contents "
15465 "of C</remote> on the mounted filesystem to C<local/remote-data.tar.gz>. "
15466 "(See C<tgz-out>)."
15470 #: ../fish/guestfish.pod:515
15472 "To change the local directory, use the C<lcd> command. C<!cd> will have no "
15473 "effect, due to the way that subprocesses work in Unix."
15477 #: ../fish/guestfish.pod:518
15482 #: ../fish/guestfish.pod:520
15484 "Use C<command E<lt>spaceE<gt> | command> to pipe the output of the first "
15485 "command (a guestfish command) to the second command (any host command). For "
15490 #: ../fish/guestfish.pod:524
15493 " cat /etc/passwd | awk -F: '$3 == 0 { print }'\n"
15498 #: ../fish/guestfish.pod:526
15500 "(where C<cat> is the guestfish cat command, but C<awk> is the host awk "
15501 "program). The above command would list all accounts in the guest filesystem "
15502 "which have UID 0, ie. root accounts including backdoors. Other examples:"
15506 #: ../fish/guestfish.pod:531
15509 " hexdump /bin/ls | head\n"
15510 " list-devices | tail -1\n"
15511 " tgz-out / - | tar ztf -\n"
15516 #: ../fish/guestfish.pod:535
15518 "The space before the pipe symbol is required, any space after the pipe "
15519 "symbol is optional. Everything after the pipe symbol is just passed "
15520 "straight to the host shell, so it can contain redirections, globs and "
15521 "anything else that makes sense on the host side."
15525 #: ../fish/guestfish.pod:540
15527 "To use a literal argument which begins with a pipe symbol, you have to quote "
15532 #: ../fish/guestfish.pod:543
15540 #: ../fish/guestfish.pod:545
15541 msgid "HOME DIRECTORIES"
15545 #: ../fish/guestfish.pod:547
15547 "If a parameter starts with the character C<~> then the tilde may be expanded "
15548 "as a home directory path (either C<~> for the current user's home directory, "
15549 "or C<~user> for another user)."
15553 #: ../fish/guestfish.pod:551
15555 "Note that home directory expansion happens for users known I<on the host>, "
15556 "not in the guest filesystem."
15560 #: ../fish/guestfish.pod:554
15562 "To use a literal argument which begins with a tilde, you have to quote it, "
15567 #: ../fish/guestfish.pod:557
15575 #: ../fish/guestfish.pod:561
15577 "Libguestfs has some support for Linux guests encrypted according to the "
15578 "Linux Unified Key Setup (LUKS) standard, which includes nearly all whole "
15579 "disk encryption systems used by modern Linux guests. Currently only LVM-on-"
15580 "LUKS is supported."
15584 #: ../fish/guestfish.pod:566
15585 msgid "Identify encrypted block devices and partitions using L</vfs-type>:"
15589 #: ../fish/guestfish.pod:568
15592 " ><fs> vfs-type /dev/sda2\n"
15598 #: ../fish/guestfish.pod:571
15600 "Then open those devices using L</luks-open>. This creates a device-mapper "
15601 "device called C</dev/mapper/luksdev>."
15605 #: ../fish/guestfish.pod:574
15608 " ><fs> luks-open /dev/sda2 luksdev\n"
15609 " Enter key or passphrase (\"key\"): <enter the passphrase>\n"
15614 #: ../fish/guestfish.pod:577
15616 "Finally you have to tell LVM to scan for volume groups on the newly created "
15621 #: ../fish/guestfish.pod:580
15625 " ><fs> vg-activate-all true\n"
15630 #: ../fish/guestfish.pod:583
15631 msgid "The logical volume(s) can now be mounted in the usual way."
15635 #: ../fish/guestfish.pod:585
15637 "Before closing a LUKS device you must unmount any logical volumes on it and "
15638 "deactivate the volume groups by calling C<vg-activate false VG> on each "
15639 "one. Then you can close the mapper device:"
15643 #: ../fish/guestfish.pod:589
15646 " ><fs> vg-activate false /dev/VG\n"
15647 " ><fs> luks-close /dev/mapper/luksdev\n"
15652 #: ../fish/guestfish.pod:592
15653 msgid "WINDOWS PATHS"
15657 #: ../fish/guestfish.pod:594
15659 "If a path is prefixed with C<win:> then you can use Windows-style paths "
15660 "(with some limitations). The following commands are equivalent:"
15664 #: ../fish/guestfish.pod:597
15667 " file /WINDOWS/system32/config/system.LOG\n"
15672 #: ../fish/guestfish.pod:599
15675 " file win:/windows/system32/config/system.log\n"
15680 #: ../fish/guestfish.pod:601
15683 " file win:\\windows\\system32\\config\\system.log\n"
15688 #: ../fish/guestfish.pod:603
15691 " file WIN:C:\\Windows\\SYSTEM32\\conFIG\\SYSTEM.LOG\n"
15696 #: ../fish/guestfish.pod:605
15698 "This syntax implicitly calls C<case-sensitive-path> (q.v.) so it also "
15699 "handles case insensitivity like Windows would. This only works in argument "
15700 "positions that expect a path."
15704 #: ../fish/guestfish.pod:609
15705 msgid "UPLOADING AND DOWNLOADING FILES"
15709 #: ../fish/guestfish.pod:611
15711 "For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and "
15712 "others which upload from or download to a local file, you can use the "
15713 "special filename C<-> to mean \"from stdin\" or \"to stdout\". For example:"
15717 #: ../fish/guestfish.pod:615
15725 #: ../fish/guestfish.pod:617
15727 "reads stdin and creates from that a file C</foo> in the disk image, and:"
15731 #: ../fish/guestfish.pod:620
15734 " tar-out /etc - | tar tf -\n"
15739 #: ../fish/guestfish.pod:622
15741 "writes the tarball to stdout and then pipes that into the external \"tar\" "
15742 "command (see L</PIPES>)."
15746 #: ../fish/guestfish.pod:625
15748 "When using C<-> to read from stdin, the input is read up to the end of "
15749 "stdin. You can also use a special \"heredoc\"-like syntax to read up to "
15750 "some arbitrary end marker:"
15754 #: ../fish/guestfish.pod:629
15757 " upload -<<END /foo\n"
15766 #: ../fish/guestfish.pod:635
15768 "Any string of characters can be used instead of C<END>. The end marker must "
15769 "appear on a line of its own, without any preceeding or following characters "
15770 "(not even spaces)."
15774 #: ../fish/guestfish.pod:639
15776 "Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to "
15777 "upload local files (so-called \"FileIn\" parameters in the generator)."
15781 #: ../fish/guestfish.pod:642
15782 msgid "EXIT ON ERROR BEHAVIOUR"
15786 #: ../fish/guestfish.pod:644
15788 "By default, guestfish will ignore any errors when in interactive mode (ie. "
15789 "taking commands from a human over a tty), and will exit on the first error "
15790 "in non-interactive mode (scripts, commands given on the command line)."
15794 #: ../fish/guestfish.pod:649
15796 "If you prefix a command with a I<-> character, then that command will not "
15797 "cause guestfish to exit, even if that (one) command returns an error."
15801 #: ../fish/guestfish.pod:653
15802 msgid "REMOTE CONTROL GUESTFISH OVER A SOCKET"
15806 #: ../fish/guestfish.pod:655
15808 "Guestfish can be remote-controlled over a socket. This is useful "
15809 "particularly in shell scripts where you want to make several different "
15810 "changes to a filesystem, but you don't want the overhead of starting up a "
15811 "guestfish process each time."
15815 #: ../fish/guestfish.pod:660
15816 msgid "Start a guestfish server process using:"
15820 #: ../fish/guestfish.pod:662
15823 " eval `guestfish --listen`\n"
15828 #: ../fish/guestfish.pod:664
15829 msgid "and then send it commands by doing:"
15833 #: ../fish/guestfish.pod:666
15836 " guestfish --remote cmd [...]\n"
15841 #: ../fish/guestfish.pod:668
15842 msgid "To cause the server to exit, send it the exit command:"
15846 #: ../fish/guestfish.pod:670
15849 " guestfish --remote exit\n"
15854 #: ../fish/guestfish.pod:672
15856 "Note that the server will normally exit if there is an error in a command. "
15857 "You can change this in the usual way. See section L</EXIT ON ERROR "
15862 #: ../fish/guestfish.pod:676
15863 msgid "CONTROLLING MULTIPLE GUESTFISH PROCESSES"
15867 #: ../fish/guestfish.pod:678
15869 "The C<eval> statement sets the environment variable C<$GUESTFISH_PID>, which "
15870 "is how the I<--remote> option knows where to send the commands. You can "
15871 "have several guestfish listener processes running using:"
15875 #: ../fish/guestfish.pod:682
15878 " eval `guestfish --listen`\n"
15879 " pid1=$GUESTFISH_PID\n"
15880 " eval `guestfish --listen`\n"
15881 " pid2=$GUESTFISH_PID\n"
15883 " guestfish --remote=$pid1 cmd\n"
15884 " guestfish --remote=$pid2 cmd\n"
15889 #: ../fish/guestfish.pod:690
15890 msgid "REMOTE CONTROL DETAILS"
15894 #: ../fish/guestfish.pod:692
15896 "Remote control happens over a Unix domain socket called C</tmp/.guestfish-"
15897 "$UID/socket-$PID>, where C<$UID> is the effective user ID of the process, "
15898 "and C<$PID> is the process ID of the server."
15902 #: ../fish/guestfish.pod:696
15903 msgid "Guestfish client and server versions must match exactly."
15907 #: ../fish/guestfish.pod:698
15908 msgid "PREPARED DISK IMAGES"
15912 #: ../fish/guestfish.pod:700
15914 "Use the I<-N type> or I<--new type> parameter to select one of a set of "
15915 "preformatted disk images that guestfish can make for you to save typing. "
15916 "This is particularly useful for testing purposes. This option is used "
15917 "instead of the I<-a> option, and like I<-a> can appear multiple times (and "
15918 "can be mixed with I<-a>)."
15922 #: ../fish/guestfish.pod:706
15924 "The new disk is called C<test1.img> for the first I<-N>, C<test2.img> for "
15925 "the second and so on. Existing files in the current directory are "
15930 #: ../fish/guestfish.pod:710
15932 "The type briefly describes how the disk should be sized, partitioned, how "
15933 "filesystem(s) should be created, and how content should be added. "
15934 "Optionally the type can be followed by extra parameters, separated by C<:> "
15935 "(colon) characters. For example, I<-N fs> creates a default 100MB, sparsely-"
15936 "allocated disk, containing a single partition, with the partition formatted "
15937 "as ext2. I<-N fs:ext4:1G> is the same, but for an ext4 filesystem on a 1GB "
15942 #: ../fish/guestfish.pod:718
15943 msgid "To list the available types and any extra parameters they take, run:"
15947 #: ../fish/guestfish.pod:722
15949 "Note that the prepared filesystem is not mounted. You would usually have to "
15950 "use the C<mount /dev/sda1 /> command or add the I<-m /dev/sda1> option."
15954 #: ../fish/guestfish.pod:726
15956 "If any I<-N> or I<--new> options are given, the guest is automatically "
15961 #: ../fish/guestfish.pod:731
15962 msgid "Create a 100MB disk with an ext4-formatted partition:"
15966 #: ../fish/guestfish.pod:733
15969 " guestfish -N fs:ext4\n"
15974 #: ../fish/guestfish.pod:735
15975 msgid "Create a 32MB disk with a VFAT-formatted partition, and mount it:"
15979 #: ../fish/guestfish.pod:737
15982 " guestfish -N fs:vfat:32M -m /dev/sda1\n"
15987 #: ../fish/guestfish.pod:739
15988 msgid "Create a blank 200MB disk:"
15992 #: ../fish/guestfish.pod:741
15995 " guestfish -N disk:200M\n"
16000 #: ../fish/guestfish.pod:743
16001 msgid "PROGRESS BARS"
16005 #: ../fish/guestfish.pod:745
16007 "Some (not all) long-running commands send progress notification messages as "
16008 "they are running. Guestfish turns these messages into progress bars."
16012 #: ../fish/guestfish.pod:749
16014 "When a command that supports progress bars takes longer than two seconds to "
16015 "run, and if progress bars are enabled, then you will see one appearing below "
16020 #: ../fish/guestfish.pod:753
16023 " ><fs> copy-size /large-file /another-file 2048M\n"
16024 " / 10% [#####-----------------------------------------] 00:30\n"
16029 #: ../fish/guestfish.pod:756
16031 "The spinner on the left hand side moves round once for every progress "
16032 "notification received from the backend. This is a (reasonably) golden "
16033 "assurance that the command is \"doing something\" even if the progress bar "
16034 "is not moving, because the command is able to send the progress "
16035 "notifications. When the bar reaches 100% and the command finishes, the "
16036 "spinner disappears."
16040 #: ../fish/guestfish.pod:763
16042 "Progress bars are enabled by default when guestfish is used interactively. "
16043 "You can enable them even for non-interactive modes using I<--progress-bars>, "
16044 "and you can disable them completely using I<--no-progress-bars>."
16048 #: ../fish/guestfish.pod:768
16049 msgid "GUESTFISH COMMANDS"
16053 #: ../fish/guestfish.pod:770
16055 "The commands in this section are guestfish convenience commands, in other "
16056 "words, they are not part of the L<guestfs(3)> API."
16060 #: ../fish/guestfish.pod:773
16061 msgid "alloc | allocate"
16065 #: ../fish/guestfish.pod:775
16068 " alloc filename size\n"
16073 #: ../fish/guestfish.pod:777
16075 "This creates an empty (zeroed) file of the given size, and then adds so it "
16076 "can be further examined."
16080 #: ../fish/guestfish.pod:780 ../fish/guestfish.pod:875
16081 msgid "For more advanced image creation, see L<qemu-img(1)> utility."
16085 #: ../fish/guestfish.pod:782 ../fish/guestfish.pod:877
16086 msgid "Size can be specified using standard suffixes, eg. C<1M>."
16090 #: ../fish/guestfish.pod:784
16095 #: ../fish/guestfish.pod:786
16098 " echo [params ...]\n"
16103 #: ../fish/guestfish.pod:788
16104 msgid "This echos the parameters to the terminal."
16108 #: ../fish/guestfish.pod:790
16109 msgid "edit | vi | emacs"
16113 #: ../fish/guestfish.pod:792
16121 #: ../fish/guestfish.pod:794
16123 "This is used to edit a file. It downloads the file, edits it locally using "
16124 "your editor, then uploads the result."
16128 #: ../fish/guestfish.pod:797
16130 "The editor is C<$EDITOR>. However if you use the alternate commands C<vi> "
16131 "or C<emacs> you will get those corresponding editors."
16135 #: ../fish/guestfish.pod:801 ../fish/guestfish.pod:847
16137 "NOTE: This will not work reliably for large files (> 2 MB) or binary files "
16138 "containing \\0 bytes."
16142 #: ../fish/guestfish.pod:804
16147 #: ../fish/guestfish.pod:806
16150 " glob command args...\n"
16155 #: ../fish/guestfish.pod:808
16157 "Expand wildcards in any paths in the args list, and run C<command> "
16158 "repeatedly on each matching path."
16162 #: ../fish/guestfish.pod:811
16163 msgid "See section WILDCARDS AND GLOBBING."
16167 #: ../fish/guestfish.pod:813
16172 #: ../fish/guestfish.pod:815
16181 #: ../fish/guestfish.pod:818
16183 "Without any parameter, this lists all commands. With a C<cmd> parameter, "
16184 "this displays detailed help for a command."
16188 #: ../fish/guestfish.pod:821
16193 #: ../fish/guestfish.pod:823
16201 #: ../fish/guestfish.pod:825
16203 "Change the local directory, ie. the current directory of guestfish itself."
16207 #: ../fish/guestfish.pod:828
16208 msgid "Note that C<!cd> won't do what you might expect."
16212 #: ../fish/guestfish.pod:830
16213 msgid "man | manual"
16217 #: ../fish/guestfish.pod:832
16225 #: ../fish/guestfish.pod:834
16226 msgid "Opens the manual page for guestfish."
16230 #: ../fish/guestfish.pod:836
16231 msgid "more | less"
16235 #: ../fish/guestfish.pod:838
16243 #: ../fish/guestfish.pod:840
16251 #: ../fish/guestfish.pod:842
16252 msgid "This is used to view a file."
16256 #: ../fish/guestfish.pod:844
16258 "The default viewer is C<$PAGER>. However if you use the alternate command "
16259 "C<less> you will get the C<less> command specifically."
16263 #: ../fish/guestfish.pod:850
16264 msgid "quit | exit"
16268 #: ../fish/guestfish.pod:852
16269 msgid "This exits guestfish. You can also use C<^D> key."
16273 #: ../fish/guestfish.pod:854
16278 #: ../fish/guestfish.pod:856
16286 #: ../fish/guestfish.pod:858
16288 "Close and reopen the libguestfs handle. It is not necessary to use this "
16289 "normally, because the handle is closed properly when guestfish exits. "
16290 "However this is occasionally useful for testing."
16294 #: ../fish/guestfish.pod:862
16299 #: ../fish/guestfish.pod:864
16302 " sparse filename size\n"
16307 #: ../fish/guestfish.pod:866
16309 "This creates an empty sparse file of the given size, and then adds so it can "
16310 "be further examined."
16314 #: ../fish/guestfish.pod:869
16316 "In all respects it works the same as the C<alloc> command, except that the "
16317 "image file is allocated sparsely, which means that disk blocks are not "
16318 "assigned to the file until they are needed. Sparse disk files only use "
16319 "space when written to, but they are slower and there is a danger you could "
16320 "run out of real disk space during a write operation."
16324 #: ../fish/guestfish.pod:879
16329 #: ../fish/guestfish.pod:881
16337 #: ../fish/guestfish.pod:883
16339 "This command returns a list of the optional groups known to the daemon, and "
16340 "indicates which ones are supported by this build of the libguestfs appliance."
16344 #: ../fish/guestfish.pod:887
16345 msgid "See also L<guestfs(3)/AVAILABILITY>."
16349 #: ../fish/guestfish.pod:889
16354 #: ../fish/guestfish.pod:891
16357 " time command args...\n"
16362 #: ../fish/guestfish.pod:893
16364 "Run the command as usual, but print the elapsed time afterwards. This can "
16365 "be useful for benchmarking operations."
16369 #: ../fish/guestfish.pod:896
16374 #: ../fish/guestfish.pod:900 ../test-tool/libguestfs-test-tool.pod:83
16379 #: ../fish/guestfish.pod:902
16381 "guestfish returns 0 if the commands completed without error, or 1 if there "
16386 #: ../fish/guestfish.pod:909
16391 #: ../fish/guestfish.pod:911
16393 "The C<edit> command uses C<$EDITOR> as the editor. If not set, it uses "
16398 #: ../fish/guestfish.pod:914
16399 msgid "GUESTFISH_PID"
16403 #: ../fish/guestfish.pod:916
16405 "Used with the I<--remote> option to specify the remote guestfish process to "
16406 "control. See section L</REMOTE CONTROL GUESTFISH OVER A SOCKET>."
16410 #: ../fish/guestfish.pod:920
16415 #: ../fish/guestfish.pod:922
16417 "If compiled with GNU readline support, various files in the home directory "
16418 "can be used. See L</FILES>."
16422 #: ../fish/guestfish.pod:931
16424 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
16425 "effect as using the B<-v> option."
16429 #: ../fish/guestfish.pod:943
16431 "Set the path that guestfish uses to search for kernel and initrd.img. See "
16432 "the discussion of paths in L<guestfs(3)>."
16436 #: ../fish/guestfish.pod:954
16437 msgid "Set C<LIBGUESTFS_TRACE=1> to enable command traces."
16441 #: ../fish/guestfish.pod:956
16446 #: ../fish/guestfish.pod:958
16448 "The C<more> command uses C<$PAGER> as the pager. If not set, it uses "
16453 #: ../fish/guestfish.pod:973 ../test-tool/libguestfs-test-tool.pod:88
16458 #: ../fish/guestfish.pod:977
16459 msgid "$HOME/.guestfish"
16463 #: ../fish/guestfish.pod:979
16465 "If compiled with GNU readline support, then the command history is saved in "
16470 #: ../fish/guestfish.pod:982
16471 msgid "$HOME/.inputrc"
16475 #: ../fish/guestfish.pod:984
16476 msgid "/etc/inputrc"
16480 #: ../fish/guestfish.pod:986
16482 "If compiled with GNU readline support, then these files can be used to "
16483 "configure readline. For further information, please see L<readline(3)/"
16484 "INITIALIZATION FILE>."
16488 #: ../fish/guestfish.pod:990
16489 msgid "To write rules which only apply to guestfish, use:"
16493 #: ../fish/guestfish.pod:992
16503 #: ../fish/guestfish.pod:996
16505 "Variables that you can set in inputrc that change the behaviour of guestfish "
16506 "in useful ways include:"
16510 #: ../fish/guestfish.pod:1001
16511 msgid "completion-ignore-case (default: on)"
16515 #: ../fish/guestfish.pod:1003
16517 "By default, guestfish will ignore case when tab-completing paths on the "
16522 #: ../fish/guestfish.pod:1006
16525 " set completion-ignore-case off\n"
16530 #: ../fish/guestfish.pod:1008
16531 msgid "to make guestfish case sensitive."
16535 #: ../fish/guestfish.pod:1012
16540 #: ../fish/guestfish.pod:1014
16541 msgid "test2.img (etc)"
16545 #: ../fish/guestfish.pod:1016
16547 "When using the C<-N> or C<--new> option, the prepared disk or filesystem "
16548 "will be created in the file C<test1.img> in the current directory. The "
16549 "second use of C<-N> will use C<test2.img> and so on. Any existing file with "
16550 "the same name will be overwritten."
16554 #: ../fish/guestfish.pod:1025
16556 "L<guestfs(3)>, L<http://libguestfs.org/>, L<virt-cat(1)>, L<virt-df(1)>, "
16557 "L<virt-edit(1)>, L<virt-list-filesystems(1)>, L<virt-list-partitions(1)>, "
16558 "L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-resize(1)>, "
16559 "L<virt-tar(1)>, L<virt-win-reg(1)>."
16563 #: ../fish/guestfish.pod:1048 ../test-tool/libguestfs-test-tool.pod:124
16564 #: ../fuse/guestmount.pod:198 ../inspector/virt-inspector.pl:865
16565 #: ../tools/virt-cat.pl:181 ../tools/virt-df.pl:499 ../tools/virt-edit.pl:345
16566 #: ../tools/virt-list-filesystems.pl:211 ../tools/virt-list-partitions.pl:248
16567 #: ../tools/virt-ls.pl:229 ../tools/virt-make-fs.pl:560
16568 #: ../tools/virt-rescue.pl:249 ../tools/virt-resize.pl:1415
16569 #: ../tools/virt-tar.pl:276 ../tools/virt-win-reg.pl:495
16571 "This program is free software; you can redistribute it and/or modify it "
16572 "under the terms of the GNU General Public License as published by the Free "
16573 "Software Foundation; either version 2 of the License, or (at your option) "
16574 "any later version."
16578 #: ../fish/guestfish.pod:1053 ../test-tool/libguestfs-test-tool.pod:129
16579 #: ../fuse/guestmount.pod:203 ../inspector/virt-inspector.pl:870
16580 #: ../tools/virt-cat.pl:186 ../tools/virt-df.pl:504 ../tools/virt-edit.pl:350
16581 #: ../tools/virt-list-filesystems.pl:216 ../tools/virt-list-partitions.pl:253
16582 #: ../tools/virt-ls.pl:234 ../tools/virt-make-fs.pl:565
16583 #: ../tools/virt-rescue.pl:254 ../tools/virt-resize.pl:1420
16584 #: ../tools/virt-tar.pl:281 ../tools/virt-win-reg.pl:500
16586 "This program is distributed in the hope that it will be useful, but WITHOUT "
16587 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
16588 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for "
16593 #: ../fish/guestfish.pod:1058 ../test-tool/libguestfs-test-tool.pod:134
16594 #: ../fuse/guestmount.pod:208 ../inspector/virt-inspector.pl:875
16595 #: ../tools/virt-cat.pl:191 ../tools/virt-df.pl:509 ../tools/virt-edit.pl:355
16596 #: ../tools/virt-list-filesystems.pl:221 ../tools/virt-list-partitions.pl:258
16597 #: ../tools/virt-ls.pl:239 ../tools/virt-make-fs.pl:570
16598 #: ../tools/virt-rescue.pl:259 ../tools/virt-resize.pl:1425
16599 #: ../tools/virt-tar.pl:286 ../tools/virt-win-reg.pl:505
16601 "You should have received a copy of the GNU General Public License along with "
16602 "this program; if not, write to the Free Software Foundation, Inc., 675 Mass "
16603 "Ave, Cambridge, MA 02139, USA."
16607 #: ../fish/guestfish-actions.pod:1
16608 msgid "add-cdrom | cdrom"
16612 #: ../fish/guestfish-actions.pod:3
16615 " add-cdrom filename\n"
16620 #: ../fish/guestfish-actions.pod:15
16622 "This call checks for the existence of C<filename>. This stops you from "
16623 "specifying other types of drive which are supported by qemu such as C<nbd:> "
16624 "and C<http:> URLs. To specify those, use the general C<config> call instead."
16628 #: ../fish/guestfish-actions.pod:22
16630 "If you just want to add an ISO file (often you use this as an efficient way "
16631 "to transfer large files into the guest), then you should probably use C<add-"
16632 "drive-ro> instead."
16636 #: ../fish/guestfish-actions.pod:28
16637 msgid "add-drive | add"
16641 #: ../fish/guestfish-actions.pod:30
16644 " add-drive filename\n"
16649 #: ../fish/guestfish-actions.pod:49 ../fish/guestfish-actions.pod:75
16651 "C<if=...> is set at compile time by the configuration option C<./configure --"
16652 "with-drive-if=...>. In the rare case where you might need to change this at "
16653 "run time, use C<add-drive-with-if> or C<add-drive-ro-with-if>."
16657 #: ../fish/guestfish-actions.pod:54 ../fish/guestfish-actions.pod:80
16659 "Note that this call checks for the existence of C<filename>. This stops you "
16660 "from specifying other types of drive which are supported by qemu such as "
16661 "C<nbd:> and C<http:> URLs. To specify those, use the general C<config> call "
16666 #: ../fish/guestfish-actions.pod:59
16667 msgid "add-drive-ro | add-ro"
16671 #: ../fish/guestfish-actions.pod:61
16674 " add-drive-ro filename\n"
16679 #: ../fish/guestfish-actions.pod:85
16680 msgid "add-drive-ro-with-if"
16684 #: ../fish/guestfish-actions.pod:87
16687 " add-drive-ro-with-if filename iface\n"
16692 #: ../fish/guestfish-actions.pod:89
16694 "This is the same as C<add-drive-ro> but it allows you to specify the QEMU "
16695 "interface emulation to use at run time."
16699 #: ../fish/guestfish-actions.pod:92
16700 msgid "add-drive-with-if"
16704 #: ../fish/guestfish-actions.pod:94
16707 " add-drive-with-if filename iface\n"
16712 #: ../fish/guestfish-actions.pod:96
16714 "This is the same as C<add-drive> but it allows you to specify the QEMU "
16715 "interface emulation to use at run time."
16719 #: ../fish/guestfish-actions.pod:99
16724 #: ../fish/guestfish-actions.pod:101
16727 " aug-clear augpath\n"
16732 #: ../fish/guestfish-actions.pod:106
16737 #: ../fish/guestfish-actions.pod:108
16745 #: ../fish/guestfish-actions.pod:110
16747 "Close the current Augeas handle and free up any resources used by it. After "
16748 "calling this, you have to call C<aug-init> again before you can use any "
16749 "other Augeas functions."
16753 #: ../fish/guestfish-actions.pod:115
16754 msgid "aug-defnode"
16758 #: ../fish/guestfish-actions.pod:117
16761 " aug-defnode name expr val\n"
16766 #: ../fish/guestfish-actions.pod:122
16768 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
16769 "calling C<aug-set> C<expr>, C<value>. C<name> will be the nodeset "
16770 "containing that single node."
16774 #: ../fish/guestfish-actions.pod:130
16779 #: ../fish/guestfish-actions.pod:132
16782 " aug-defvar name expr\n"
16787 #: ../fish/guestfish-actions.pod:141
16792 #: ../fish/guestfish-actions.pod:143
16795 " aug-get augpath\n"
16800 #: ../fish/guestfish-actions.pod:148
16805 #: ../fish/guestfish-actions.pod:150
16808 " aug-init root flags\n"
16813 #: ../fish/guestfish-actions.pod:156
16814 msgid "You must call this before using any other C<aug-*> commands."
16818 #: ../fish/guestfish-actions.pod:191
16819 msgid "Do not load the tree in C<aug-init>."
16823 #: ../fish/guestfish-actions.pod:195
16824 msgid "To close the handle, you can call C<aug-close>."
16828 #: ../fish/guestfish-actions.pod:199
16833 #: ../fish/guestfish-actions.pod:201
16836 " aug-insert augpath label true|false\n"
16841 #: ../fish/guestfish-actions.pod:211
16846 #: ../fish/guestfish-actions.pod:213
16854 #: ../fish/guestfish-actions.pod:220
16859 #: ../fish/guestfish-actions.pod:222
16862 " aug-ls augpath\n"
16867 #: ../fish/guestfish-actions.pod:224
16869 "This is just a shortcut for listing C<aug-match> C<path/*> and sorting the "
16870 "resulting nodes into alphabetical order."
16874 #: ../fish/guestfish-actions.pod:227
16879 #: ../fish/guestfish-actions.pod:229
16882 " aug-match augpath\n"
16887 #: ../fish/guestfish-actions.pod:235
16892 #: ../fish/guestfish-actions.pod:237
16895 " aug-mv src dest\n"
16900 #: ../fish/guestfish-actions.pod:242
16905 #: ../fish/guestfish-actions.pod:244
16908 " aug-rm augpath\n"
16913 #: ../fish/guestfish-actions.pod:250
16918 #: ../fish/guestfish-actions.pod:252
16926 #: ../fish/guestfish-actions.pod:256
16928 "The flags which were passed to C<aug-init> affect exactly how files are "
16933 #: ../fish/guestfish-actions.pod:259
16938 #: ../fish/guestfish-actions.pod:261
16941 " aug-set augpath val\n"
16946 #: ../fish/guestfish-actions.pod:265
16948 "In the Augeas API, it is possible to clear a node by setting the value to "
16949 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
16950 "this call. Instead you must use the C<aug-clear> call."
16954 #: ../fish/guestfish-actions.pod:270
16959 #: ../fish/guestfish-actions.pod:272
16962 " available 'groups ...'\n"
16967 #: ../fish/guestfish-actions.pod:278
16969 "The libguestfs groups, and the functions that those groups correspond to, "
16970 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
16971 "runtime by calling C<available-all-groups>."
16975 #: ../fish/guestfish-actions.pod:302
16976 msgid "You must call C<launch> before calling this function."
16980 #: ../fish/guestfish-actions.pod:324
16982 "This call was added in version C<1.0.80>. In previous versions of "
16983 "libguestfs all you could do would be to speculatively execute a command to "
16984 "find out if the daemon implemented it. See also C<version>."
16988 #: ../fish/guestfish-actions.pod:331
16989 msgid "available-all-groups"
16993 #: ../fish/guestfish-actions.pod:333
16996 " available-all-groups\n"
17001 #: ../fish/guestfish-actions.pod:335
17003 "This command returns a list of all optional groups that this daemon knows "
17004 "about. Note this returns both supported and unsupported groups. To find "
17005 "out which ones the daemon can actually support you have to call C<available> "
17006 "on each member of the returned list."
17010 #: ../fish/guestfish-actions.pod:341
17011 msgid "See also C<available> and L<guestfs(3)/AVAILABILITY>."
17015 #: ../fish/guestfish-actions.pod:343
17020 #: ../fish/guestfish-actions.pod:345
17023 " base64-in (base64file|-) filename\n"
17028 #: ../fish/guestfish-actions.pod:350 ../fish/guestfish-actions.pod:359
17029 #: ../fish/guestfish-actions.pod:583 ../fish/guestfish-actions.pod:730
17030 #: ../fish/guestfish-actions.pod:777 ../fish/guestfish-actions.pod:1154
17031 #: ../fish/guestfish-actions.pod:3657 ../fish/guestfish-actions.pod:3669
17032 #: ../fish/guestfish-actions.pod:3680 ../fish/guestfish-actions.pod:3691
17033 #: ../fish/guestfish-actions.pod:3743 ../fish/guestfish-actions.pod:3752
17034 #: ../fish/guestfish-actions.pod:3802
17035 msgid "Use C<-> instead of a filename to read/write from stdin/stdout."
17039 #: ../fish/guestfish-actions.pod:352
17044 #: ../fish/guestfish-actions.pod:354
17047 " base64-out filename (base64file|-)\n"
17052 #: ../fish/guestfish-actions.pod:361
17053 msgid "blockdev-flushbufs"
17057 #: ../fish/guestfish-actions.pod:363
17060 " blockdev-flushbufs device\n"
17065 #: ../fish/guestfish-actions.pod:370
17066 msgid "blockdev-getbsz"
17070 #: ../fish/guestfish-actions.pod:372
17073 " blockdev-getbsz device\n"
17078 #: ../fish/guestfish-actions.pod:381
17079 msgid "blockdev-getro"
17083 #: ../fish/guestfish-actions.pod:383
17086 " blockdev-getro device\n"
17091 #: ../fish/guestfish-actions.pod:390
17092 msgid "blockdev-getsize64"
17096 #: ../fish/guestfish-actions.pod:392
17099 " blockdev-getsize64 device\n"
17104 #: ../fish/guestfish-actions.pod:396
17105 msgid "See also C<blockdev-getsz>."
17109 #: ../fish/guestfish-actions.pod:400
17110 msgid "blockdev-getss"
17114 #: ../fish/guestfish-actions.pod:402
17117 " blockdev-getss device\n"
17122 #: ../fish/guestfish-actions.pod:407
17124 "(Note, this is not the size in sectors, use C<blockdev-getsz> for that)."
17128 #: ../fish/guestfish-actions.pod:412
17129 msgid "blockdev-getsz"
17133 #: ../fish/guestfish-actions.pod:414
17136 " blockdev-getsz device\n"
17141 #: ../fish/guestfish-actions.pod:419
17143 "See also C<blockdev-getss> for the real sector size of the device, and "
17144 "C<blockdev-getsize64> for the more useful I<size in bytes>."
17148 #: ../fish/guestfish-actions.pod:425
17149 msgid "blockdev-rereadpt"
17153 #: ../fish/guestfish-actions.pod:427
17156 " blockdev-rereadpt device\n"
17161 #: ../fish/guestfish-actions.pod:433
17162 msgid "blockdev-setbsz"
17166 #: ../fish/guestfish-actions.pod:435
17169 " blockdev-setbsz device blocksize\n"
17174 #: ../fish/guestfish-actions.pod:444
17175 msgid "blockdev-setro"
17179 #: ../fish/guestfish-actions.pod:446
17182 " blockdev-setro device\n"
17187 #: ../fish/guestfish-actions.pod:452
17188 msgid "blockdev-setrw"
17192 #: ../fish/guestfish-actions.pod:454
17195 " blockdev-setrw device\n"
17200 #: ../fish/guestfish-actions.pod:460
17201 msgid "case-sensitive-path"
17205 #: ../fish/guestfish-actions.pod:462
17208 " case-sensitive-path path\n"
17213 #: ../fish/guestfish-actions.pod:486
17215 "Thus C<case-sensitive-path> (\"/Windows/System32\") might return C<\"/"
17216 "WINDOWS/system32\"> (the exact return value would depend on details of how "
17217 "the directories were originally created under Windows)."
17221 #: ../fish/guestfish-actions.pod:494
17222 msgid "See also C<realpath>."
17226 #: ../fish/guestfish-actions.pod:496
17231 #: ../fish/guestfish-actions.pod:498
17239 #: ../fish/guestfish-actions.pod:502
17241 "Note that this function cannot correctly handle binary files (specifically, "
17242 "files containing C<\\0> character which is treated as end of string). For "
17243 "those you need to use the C<read-file> or C<download> functions which have a "
17244 "more complex interface."
17248 #: ../fish/guestfish-actions.pod:510
17253 #: ../fish/guestfish-actions.pod:512
17256 " checksum csumtype path\n"
17261 #: ../fish/guestfish-actions.pod:555
17262 msgid "To get the checksum for a device, use C<checksum-device>."
17266 #: ../fish/guestfish-actions.pod:557
17267 msgid "To get the checksums for many files, use C<checksums-out>."
17271 #: ../fish/guestfish-actions.pod:559
17272 msgid "checksum-device"
17276 #: ../fish/guestfish-actions.pod:561
17279 " checksum-device csumtype device\n"
17284 #: ../fish/guestfish-actions.pod:563
17286 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
17287 "device named C<device>. For the types of checksums supported see the "
17288 "C<checksum> command."
17292 #: ../fish/guestfish-actions.pod:567
17293 msgid "checksums-out"
17297 #: ../fish/guestfish-actions.pod:569
17300 " checksums-out csumtype directory (sumsfile|-)\n"
17305 #: ../fish/guestfish-actions.pod:585
17310 #: ../fish/guestfish-actions.pod:587
17313 " chmod mode path\n"
17318 #: ../fish/guestfish-actions.pod:598
17323 #: ../fish/guestfish-actions.pod:600
17326 " chown owner group path\n"
17331 #: ../fish/guestfish-actions.pod:608
17336 #: ../fish/guestfish-actions.pod:610
17339 " command 'arguments ...'\n"
17344 #: ../fish/guestfish-actions.pod:617
17346 "The single parameter is an argv-style list of arguments. The first element "
17347 "is the name of the program to run. Subsequent elements are parameters. The "
17348 "list must be non-empty (ie. must contain a program name). Note that the "
17349 "command runs directly, and is I<not> invoked via the shell (see C<sh>)."
17353 #: ../fish/guestfish-actions.pod:645
17354 msgid "command-lines"
17358 #: ../fish/guestfish-actions.pod:647
17361 " command-lines 'arguments ...'\n"
17366 #: ../fish/guestfish-actions.pod:649
17368 "This is the same as C<command>, but splits the result into a list of lines."
17372 #: ../fish/guestfish-actions.pod:652
17373 msgid "See also: C<sh-lines>"
17377 #: ../fish/guestfish-actions.pod:657
17382 #: ../fish/guestfish-actions.pod:659
17385 " config qemuparam qemuvalue\n"
17390 #: ../fish/guestfish-actions.pod:670
17395 #: ../fish/guestfish-actions.pod:672
17398 " copy-size src dest size\n"
17403 #: ../fish/guestfish-actions.pod:680
17408 #: ../fish/guestfish-actions.pod:682
17416 #: ../fish/guestfish-actions.pod:687
17421 #: ../fish/guestfish-actions.pod:689
17429 #: ../fish/guestfish-actions.pod:694
17434 #: ../fish/guestfish-actions.pod:696
17442 #: ../fish/guestfish-actions.pod:703
17444 "If the destination is a device, it must be as large or larger than the "
17445 "source file or device, otherwise the copy will fail. This command cannot do "
17446 "partial copies (see C<copy-size>)."
17450 #: ../fish/guestfish-actions.pod:707
17455 #: ../fish/guestfish-actions.pod:709
17458 " debug subcmd 'extraargs ...'\n"
17463 #: ../fish/guestfish-actions.pod:711
17465 "The C<debug> command exposes some internals of C<guestfsd> (the guestfs "
17466 "daemon) that runs inside the qemu subprocess."
17470 #: ../fish/guestfish-actions.pod:719
17471 msgid "debug-upload"
17475 #: ../fish/guestfish-actions.pod:721
17478 " debug-upload (filename|-) tmpname mode\n"
17483 #: ../fish/guestfish-actions.pod:723
17484 msgid "The C<debug-upload> command uploads a file to the libguestfs appliance."
17488 #: ../fish/guestfish-actions.pod:732
17493 #: ../fish/guestfish-actions.pod:734
17501 #: ../fish/guestfish-actions.pod:742
17506 #: ../fish/guestfish-actions.pod:744
17514 #: ../fish/guestfish-actions.pod:753
17519 #: ../fish/guestfish-actions.pod:755
17527 #: ../fish/guestfish-actions.pod:761
17529 "Another way to get the same information is to enable verbose messages with "
17530 "C<set-verbose> or by setting the environment variable C<LIBGUESTFS_DEBUG=1> "
17531 "before running the program."
17535 #: ../fish/guestfish-actions.pod:766
17540 #: ../fish/guestfish-actions.pod:768
17543 " download remotefilename (filename|-)\n"
17548 #: ../fish/guestfish-actions.pod:775
17549 msgid "See also C<upload>, C<cat>."
17553 #: ../fish/guestfish-actions.pod:779
17554 msgid "drop-caches"
17558 #: ../fish/guestfish-actions.pod:781
17561 " drop-caches whattodrop\n"
17566 #: ../fish/guestfish-actions.pod:793
17571 #: ../fish/guestfish-actions.pod:795
17579 #: ../fish/guestfish-actions.pod:807
17584 #: ../fish/guestfish-actions.pod:809
17587 " e2fsck-f device\n"
17592 #: ../fish/guestfish-actions.pod:815
17594 "This command is only needed because of C<resize2fs> (q.v.). Normally you "
17595 "should use C<fsck>."
17599 #: ../fish/guestfish-actions.pod:818
17600 msgid "echo-daemon"
17604 #: ../fish/guestfish-actions.pod:820
17607 " echo-daemon 'words ...'\n"
17612 #: ../fish/guestfish-actions.pod:827
17613 msgid "See also C<ping-daemon>."
17617 #: ../fish/guestfish-actions.pod:829
17622 #: ../fish/guestfish-actions.pod:831
17625 " egrep regex path\n"
17630 #: ../fish/guestfish-actions.pod:839
17635 #: ../fish/guestfish-actions.pod:841
17638 " egrepi regex path\n"
17643 #: ../fish/guestfish-actions.pod:849
17648 #: ../fish/guestfish-actions.pod:851
17651 " equal file1 file2\n"
17656 #: ../fish/guestfish-actions.pod:858
17661 #: ../fish/guestfish-actions.pod:860
17669 #: ../fish/guestfish-actions.pod:865
17670 msgid "See also C<is-file>, C<is-dir>, C<stat>."
17674 #: ../fish/guestfish-actions.pod:867
17679 #: ../fish/guestfish-actions.pod:869
17682 " fallocate path len\n"
17687 #: ../fish/guestfish-actions.pod:886
17688 msgid "fallocate64"
17692 #: ../fish/guestfish-actions.pod:888
17695 " fallocate64 path len\n"
17700 #: ../fish/guestfish-actions.pod:894
17702 "Note that this call allocates disk blocks for the file. To create a sparse "
17703 "file use C<truncate-size> instead."
17707 #: ../fish/guestfish-actions.pod:897
17709 "The deprecated call C<fallocate> does the same, but owing to an oversight it "
17710 "only allowed 30 bit lengths to be specified, effectively limiting the "
17711 "maximum size of files created through that call to 1GB."
17715 #: ../fish/guestfish-actions.pod:906
17720 #: ../fish/guestfish-actions.pod:908
17723 " fgrep pattern path\n"
17728 #: ../fish/guestfish-actions.pod:916
17733 #: ../fish/guestfish-actions.pod:918
17736 " fgrepi pattern path\n"
17741 #: ../fish/guestfish-actions.pod:926
17746 #: ../fish/guestfish-actions.pod:928
17754 #: ../fish/guestfish-actions.pod:940
17756 "This command can also be used on C</dev/> devices (and partitions, LV "
17757 "names). You can for example use this to determine if a device contains a "
17758 "filesystem, although it's usually better to use C<vfs-type>."
17762 #: ../fish/guestfish-actions.pod:950
17763 msgid "file-architecture"
17767 #: ../fish/guestfish-actions.pod:952
17770 " file-architecture filename\n"
17775 #: ../fish/guestfish-actions.pod:1055
17780 #: ../fish/guestfish-actions.pod:1057
17788 #: ../fish/guestfish-actions.pod:1061
17790 "To get other stats about a file, use C<stat>, C<lstat>, C<is-dir>, C<is-"
17791 "file> etc. To get the size of block devices, use C<blockdev-getsize64>."
17795 #: ../fish/guestfish-actions.pod:1065
17800 #: ../fish/guestfish-actions.pod:1067
17803 " fill c len path\n"
17808 #: ../fish/guestfish-actions.pod:1073
17810 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
17811 "C<truncate-size>. To create a file with a pattern of repeating bytes use "
17816 #: ../fish/guestfish-actions.pod:1078
17817 msgid "fill-pattern"
17821 #: ../fish/guestfish-actions.pod:1080
17824 " fill-pattern pattern len path\n"
17829 #: ../fish/guestfish-actions.pod:1082
17831 "This function is like C<fill> except that it creates a new file of length "
17832 "C<len> containing the repeating pattern of bytes in C<pattern>. The pattern "
17833 "is truncated if necessary to ensure the length of the file is exactly C<len> "
17838 #: ../fish/guestfish-actions.pod:1087
17843 #: ../fish/guestfish-actions.pod:1089
17846 " find directory\n"
17851 #: ../fish/guestfish-actions.pod:1103
17852 msgid "then the returned list from C<find> C</tmp> would be 4 elements:"
17856 #: ../fish/guestfish-actions.pod:1116
17857 msgid "See also C<find0>."
17861 #: ../fish/guestfish-actions.pod:1121
17866 #: ../fish/guestfish-actions.pod:1123
17869 " find0 directory (files|-)\n"
17874 #: ../fish/guestfish-actions.pod:1129
17876 "This command works the same way as C<find> with the following exceptions:"
17880 #: ../fish/guestfish-actions.pod:1156
17881 msgid "findfs-label"
17885 #: ../fish/guestfish-actions.pod:1158
17888 " findfs-label label\n"
17893 #: ../fish/guestfish-actions.pod:1164
17894 msgid "To find the label of a filesystem, use C<vfs-label>."
17898 #: ../fish/guestfish-actions.pod:1166
17899 msgid "findfs-uuid"
17903 #: ../fish/guestfish-actions.pod:1168
17906 " findfs-uuid uuid\n"
17911 #: ../fish/guestfish-actions.pod:1174
17912 msgid "To find the UUID of a filesystem, use C<vfs-uuid>."
17916 #: ../fish/guestfish-actions.pod:1176
17921 #: ../fish/guestfish-actions.pod:1178
17924 " fsck fstype device\n"
17929 #: ../fish/guestfish-actions.pod:1208
17934 #: ../fish/guestfish-actions.pod:1210
17942 #: ../fish/guestfish-actions.pod:1217
17943 msgid "get-autosync"
17947 #: ../fish/guestfish-actions.pod:1219
17955 #: ../fish/guestfish-actions.pod:1223
17960 #: ../fish/guestfish-actions.pod:1225
17968 #: ../fish/guestfish-actions.pod:1229
17969 msgid "get-e2label"
17973 #: ../fish/guestfish-actions.pod:1231
17976 " get-e2label device\n"
17981 #: ../fish/guestfish-actions.pod:1243
17986 #: ../fish/guestfish-actions.pod:1245
17989 " get-e2uuid device\n"
17994 #: ../fish/guestfish-actions.pod:1257
17995 msgid "get-memsize"
17999 #: ../fish/guestfish-actions.pod:1259
18007 #: ../fish/guestfish-actions.pod:1264
18009 "If C<set-memsize> was not called on this handle, and if "
18010 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
18011 "value for memsize."
18015 #: ../fish/guestfish-actions.pod:1271
18016 msgid "get-network"
18020 #: ../fish/guestfish-actions.pod:1273
18028 #: ../fish/guestfish-actions.pod:1277
18033 #: ../fish/guestfish-actions.pod:1279
18041 #: ../fish/guestfish-actions.pod:1286
18042 msgid "get-pid | pid"
18046 #: ../fish/guestfish-actions.pod:1288
18054 #: ../fish/guestfish-actions.pod:1295
18059 #: ../fish/guestfish-actions.pod:1297
18067 #: ../fish/guestfish-actions.pod:1304
18068 msgid "get-recovery-proc"
18072 #: ../fish/guestfish-actions.pod:1306
18075 " get-recovery-proc\n"
18080 #: ../fish/guestfish-actions.pod:1310
18081 msgid "get-selinux"
18085 #: ../fish/guestfish-actions.pod:1312
18093 #: ../fish/guestfish-actions.pod:1314
18095 "This returns the current setting of the selinux flag which is passed to the "
18096 "appliance at boot time. See C<set-selinux>."
18100 #: ../fish/guestfish-actions.pod:1320
18105 #: ../fish/guestfish-actions.pod:1322
18113 #: ../fish/guestfish-actions.pod:1329
18118 #: ../fish/guestfish-actions.pod:1331
18126 #: ../fish/guestfish-actions.pod:1335
18131 #: ../fish/guestfish-actions.pod:1337
18139 #: ../fish/guestfish-actions.pod:1339
18141 "Return the current umask. By default the umask is C<022> unless it has been "
18142 "set by calling C<umask>."
18146 #: ../fish/guestfish-actions.pod:1342
18147 msgid "get-verbose"
18151 #: ../fish/guestfish-actions.pod:1344
18159 #: ../fish/guestfish-actions.pod:1348
18164 #: ../fish/guestfish-actions.pod:1350
18172 #: ../fish/guestfish-actions.pod:1354
18173 msgid "See the documentation about SELINUX in L<guestfs(3)>, and C<setcon>"
18177 #: ../fish/guestfish-actions.pod:1357
18182 #: ../fish/guestfish-actions.pod:1359
18185 " getxattrs path\n"
18190 #: ../fish/guestfish-actions.pod:1367
18191 msgid "See also: C<lgetxattrs>, L<attr(5)>."
18195 #: ../fish/guestfish-actions.pod:1369
18196 msgid "glob-expand"
18200 #: ../fish/guestfish-actions.pod:1371
18203 " glob-expand pattern\n"
18208 #: ../fish/guestfish-actions.pod:1384
18213 #: ../fish/guestfish-actions.pod:1386
18216 " grep regex path\n"
18221 #: ../fish/guestfish-actions.pod:1394
18226 #: ../fish/guestfish-actions.pod:1396
18229 " grepi regex path\n"
18234 #: ../fish/guestfish-actions.pod:1404
18235 msgid "grub-install"
18239 #: ../fish/guestfish-actions.pod:1406
18242 " grub-install root device\n"
18247 #: ../fish/guestfish-actions.pod:1422
18252 #: ../fish/guestfish-actions.pod:1424
18260 #: ../fish/guestfish-actions.pod:1432
18265 #: ../fish/guestfish-actions.pod:1434
18268 " head-n nrlines path\n"
18273 #: ../fish/guestfish-actions.pod:1447
18278 #: ../fish/guestfish-actions.pod:1449
18286 #: ../fish/guestfish-actions.pod:1457
18291 #: ../fish/guestfish-actions.pod:1459
18294 " initrd-cat initrdpath filename\n"
18299 #: ../fish/guestfish-actions.pod:1471
18300 msgid "See also C<initrd-list>."
18304 #: ../fish/guestfish-actions.pod:1476
18305 msgid "initrd-list"
18309 #: ../fish/guestfish-actions.pod:1478
18312 " initrd-list path\n"
18317 #: ../fish/guestfish-actions.pod:1490
18318 msgid "inotify-add-watch"
18322 #: ../fish/guestfish-actions.pod:1492
18325 " inotify-add-watch path mask\n"
18330 #: ../fish/guestfish-actions.pod:1504
18331 msgid "inotify-close"
18335 #: ../fish/guestfish-actions.pod:1506
18343 #: ../fish/guestfish-actions.pod:1512
18344 msgid "inotify-files"
18348 #: ../fish/guestfish-actions.pod:1514
18356 #: ../fish/guestfish-actions.pod:1516
18358 "This function is a helpful wrapper around C<inotify-read> which just returns "
18359 "a list of pathnames of objects that were touched. The returned pathnames "
18360 "are sorted and deduplicated."
18364 #: ../fish/guestfish-actions.pod:1520
18365 msgid "inotify-init"
18369 #: ../fish/guestfish-actions.pod:1522
18372 " inotify-init maxevents\n"
18377 #: ../fish/guestfish-actions.pod:1528
18379 "C<maxevents> is the maximum number of events which will be queued up between "
18380 "calls to C<inotify-read> or C<inotify-files>. If this is passed as C<0>, "
18381 "then the kernel (or previously set) default is used. For Linux 2.6.29 the "
18382 "default was 16384 events. Beyond this limit, the kernel throws away events, "
18383 "but records the fact that it threw them away by setting a flag "
18384 "C<IN_Q_OVERFLOW> in the returned structure list (see C<inotify-read>)."
18388 #: ../fish/guestfish-actions.pod:1538
18390 "Before any events are generated, you have to add some watches to the "
18391 "internal watch list. See: C<inotify-add-watch>, C<inotify-rm-watch> and "
18392 "C<inotify-watch-all>."
18396 #: ../fish/guestfish-actions.pod:1544
18398 "Queued up events should be read periodically by calling C<inotify-read> (or "
18399 "C<inotify-files> which is just a helpful wrapper around C<inotify-read>). "
18400 "If you don't read the events out often enough then you risk the internal "
18401 "queue overflowing."
18405 #: ../fish/guestfish-actions.pod:1551
18407 "The handle should be closed after use by calling C<inotify-close>. This "
18408 "also removes any watches automatically."
18412 #: ../fish/guestfish-actions.pod:1560
18413 msgid "inotify-read"
18417 #: ../fish/guestfish-actions.pod:1562
18425 #: ../fish/guestfish-actions.pod:1575
18426 msgid "inotify-rm-watch"
18430 #: ../fish/guestfish-actions.pod:1577
18433 " inotify-rm-watch wd\n"
18438 #: ../fish/guestfish-actions.pod:1579
18439 msgid "Remove a previously defined inotify watch. See C<inotify-add-watch>."
18443 #: ../fish/guestfish-actions.pod:1582
18444 msgid "inspect-get-arch"
18448 #: ../fish/guestfish-actions.pod:1584
18451 " inspect-get-arch root\n"
18456 #: ../fish/guestfish-actions.pod:1586 ../fish/guestfish-actions.pod:1602
18457 #: ../fish/guestfish-actions.pod:1648 ../fish/guestfish-actions.pod:1666
18458 #: ../fish/guestfish-actions.pod:1687 ../fish/guestfish-actions.pod:1702
18459 #: ../fish/guestfish-actions.pod:1725 ../fish/guestfish-actions.pod:1742
18461 "This function should only be called with a root device string as returned by "
18466 #: ../fish/guestfish-actions.pod:1589
18468 "This returns the architecture of the inspected operating system. The "
18469 "possible return values are listed under C<file-architecture>."
18473 #: ../fish/guestfish-actions.pod:1598
18474 msgid "inspect-get-distro"
18478 #: ../fish/guestfish-actions.pod:1600
18481 " inspect-get-distro root\n"
18486 #: ../fish/guestfish-actions.pod:1644
18487 msgid "inspect-get-filesystems"
18491 #: ../fish/guestfish-actions.pod:1646
18494 " inspect-get-filesystems root\n"
18499 #: ../fish/guestfish-actions.pod:1659
18501 "Please read L<guestfs(3)/INSPECTION> for more details. See also C<inspect-"
18502 "get-mountpoints>."
18506 #: ../fish/guestfish-actions.pod:1662
18507 msgid "inspect-get-major-version"
18511 #: ../fish/guestfish-actions.pod:1664
18514 " inspect-get-major-version root\n"
18519 #: ../fish/guestfish-actions.pod:1683
18520 msgid "inspect-get-minor-version"
18524 #: ../fish/guestfish-actions.pod:1685
18527 " inspect-get-minor-version root\n"
18532 #: ../fish/guestfish-actions.pod:1695
18534 "Please read L<guestfs(3)/INSPECTION> for more details. See also C<inspect-"
18535 "get-major-version>."
18539 #: ../fish/guestfish-actions.pod:1698
18540 msgid "inspect-get-mountpoints"
18544 #: ../fish/guestfish-actions.pod:1700
18547 " inspect-get-mountpoints root\n"
18552 #: ../fish/guestfish-actions.pod:1718
18554 "Please read L<guestfs(3)/INSPECTION> for more details. See also C<inspect-"
18555 "get-filesystems>."
18559 #: ../fish/guestfish-actions.pod:1721
18560 msgid "inspect-get-product-name"
18564 #: ../fish/guestfish-actions.pod:1723
18567 " inspect-get-product-name root\n"
18572 #: ../fish/guestfish-actions.pod:1738
18573 msgid "inspect-get-type"
18577 #: ../fish/guestfish-actions.pod:1740
18580 " inspect-get-type root\n"
18585 #: ../fish/guestfish-actions.pod:1769
18590 #: ../fish/guestfish-actions.pod:1771
18598 #: ../fish/guestfish-actions.pod:1786
18600 "You can pass the root string(s) returned to other C<inspect-get-*> functions "
18601 "in order to query further information about each operating system, such as "
18602 "the name and version."
18606 #: ../fish/guestfish-actions.pod:1791
18608 "This function uses other libguestfs features such as C<mount-ro> and "
18609 "C<umount-all> in order to mount and unmount filesystems and look at the "
18610 "contents. This should be called with no disks currently mounted. The "
18611 "function may also use Augeas, so any existing Augeas handle will be closed."
18615 #: ../fish/guestfish-actions.pod:1803
18620 #: ../fish/guestfish-actions.pod:1805
18628 #: ../fish/guestfish-actions.pod:1812
18633 #: ../fish/guestfish-actions.pod:1814
18641 #: ../fish/guestfish-actions.pod:1821
18646 #: ../fish/guestfish-actions.pod:1823
18654 #: ../fish/guestfish-actions.pod:1829 ../fish/guestfish-actions.pod:1839
18655 msgid "See also C<stat>."
18659 #: ../fish/guestfish-actions.pod:1831
18664 #: ../fish/guestfish-actions.pod:1833
18672 #: ../fish/guestfish-actions.pod:1841
18673 msgid "is-launching"
18677 #: ../fish/guestfish-actions.pod:1843
18685 #: ../fish/guestfish-actions.pod:1850
18690 #: ../fish/guestfish-actions.pod:1852
18698 #: ../fish/guestfish-actions.pod:1857
18703 #: ../fish/guestfish-actions.pod:1859
18711 #: ../fish/guestfish-actions.pod:1866
18712 msgid "kill-subprocess"
18716 #: ../fish/guestfish-actions.pod:1868
18719 " kill-subprocess\n"
18724 #: ../fish/guestfish-actions.pod:1872
18725 msgid "launch | run"
18729 #: ../fish/guestfish-actions.pod:1874
18737 #: ../fish/guestfish-actions.pod:1882
18742 #: ../fish/guestfish-actions.pod:1884
18745 " lchown owner group path\n"
18750 #: ../fish/guestfish-actions.pod:1886
18752 "Change the file owner to C<owner> and group to C<group>. This is like "
18753 "C<chown> but if C<path> is a symlink then the link itself is changed, not "
18758 #: ../fish/guestfish-actions.pod:1894
18763 #: ../fish/guestfish-actions.pod:1896
18766 " lgetxattrs path\n"
18771 #: ../fish/guestfish-actions.pod:1898
18773 "This is the same as C<getxattrs>, but if C<path> is a symbolic link, then it "
18774 "returns the extended attributes of the link itself."
18778 #: ../fish/guestfish-actions.pod:1902
18779 msgid "list-devices"
18783 #: ../fish/guestfish-actions.pod:1904
18791 #: ../fish/guestfish-actions.pod:1910
18792 msgid "list-partitions"
18796 #: ../fish/guestfish-actions.pod:1912
18799 " list-partitions\n"
18804 #: ../fish/guestfish-actions.pod:1918
18806 "This does not return logical volumes. For that you will need to call C<lvs>."
18810 #: ../fish/guestfish-actions.pod:1921
18815 #: ../fish/guestfish-actions.pod:1923
18823 #: ../fish/guestfish-actions.pod:1931
18828 #: ../fish/guestfish-actions.pod:1933
18831 " ln target linkname\n"
18836 #: ../fish/guestfish-actions.pod:1937
18841 #: ../fish/guestfish-actions.pod:1939
18844 " ln-f target linkname\n"
18849 #: ../fish/guestfish-actions.pod:1944
18854 #: ../fish/guestfish-actions.pod:1946
18857 " ln-s target linkname\n"
18862 #: ../fish/guestfish-actions.pod:1950
18867 #: ../fish/guestfish-actions.pod:1952
18870 " ln-sf target linkname\n"
18875 #: ../fish/guestfish-actions.pod:1957
18876 msgid "lremovexattr"
18880 #: ../fish/guestfish-actions.pod:1959
18883 " lremovexattr xattr path\n"
18888 #: ../fish/guestfish-actions.pod:1961
18890 "This is the same as C<removexattr>, but if C<path> is a symbolic link, then "
18891 "it removes an extended attribute of the link itself."
18895 #: ../fish/guestfish-actions.pod:1965
18900 #: ../fish/guestfish-actions.pod:1967
18908 #: ../fish/guestfish-actions.pod:1973
18910 "This command is mostly useful for interactive sessions. Programs should "
18911 "probably use C<readdir> instead."
18915 #: ../fish/guestfish-actions.pod:1976
18920 #: ../fish/guestfish-actions.pod:1978
18923 " lsetxattr xattr val vallen path\n"
18928 #: ../fish/guestfish-actions.pod:1980
18930 "This is the same as C<setxattr>, but if C<path> is a symbolic link, then it "
18931 "sets an extended attribute of the link itself."
18935 #: ../fish/guestfish-actions.pod:1984
18940 #: ../fish/guestfish-actions.pod:1986
18948 #: ../fish/guestfish-actions.pod:1990
18950 "This is the same as C<stat> except that if C<path> is a symbolic link, then "
18951 "the link is stat-ed, not the file it refers to."
18955 #: ../fish/guestfish-actions.pod:1996
18960 #: ../fish/guestfish-actions.pod:1998
18963 " lstatlist path 'names ...'\n"
18968 #: ../fish/guestfish-actions.pod:2000
18970 "This call allows you to perform the C<lstat> operation on multiple files, "
18971 "where all files are in the directory C<path>. C<names> is the list of files "
18972 "from this directory."
18976 #: ../fish/guestfish-actions.pod:2009
18978 "This call is intended for programs that want to efficiently list a directory "
18979 "contents without making many round-trips. See also C<lxattrlist> for a "
18980 "similarly efficient call for getting extended attributes. Very long "
18981 "directory listings might cause the protocol message size to be exceeded, "
18982 "causing this call to fail. The caller must split up such requests into "
18983 "smaller groups of names."
18987 #: ../fish/guestfish-actions.pod:2017
18988 msgid "luks-add-key"
18992 #: ../fish/guestfish-actions.pod:2019
18995 " luks-add-key device keyslot\n"
19000 #: ../fish/guestfish-actions.pod:2026
19002 "Note that if C<keyslot> already contains a key, then this command will "
19003 "fail. You have to use C<luks-kill-slot> first to remove that key."
19007 #: ../fish/guestfish-actions.pod:2030 ../fish/guestfish-actions.pod:2052
19008 #: ../fish/guestfish-actions.pod:2065 ../fish/guestfish-actions.pod:2079
19009 #: ../fish/guestfish-actions.pod:2102 ../fish/guestfish-actions.pod:2112
19011 "This command has one or more key or passphrase parameters. Guestfish will "
19012 "prompt for these separately."
19016 #: ../fish/guestfish-actions.pod:2033
19021 #: ../fish/guestfish-actions.pod:2035
19024 " luks-close device\n"
19029 #: ../fish/guestfish-actions.pod:2037
19031 "This closes a LUKS device that was created earlier by C<luks-open> or C<luks-"
19032 "open-ro>. The C<device> parameter must be the name of the LUKS mapping "
19033 "device (ie. C</dev/mapper/mapname>) and I<not> the name of the underlying "
19038 #: ../fish/guestfish-actions.pod:2043
19039 msgid "luks-format"
19043 #: ../fish/guestfish-actions.pod:2045
19046 " luks-format device keyslot\n"
19051 #: ../fish/guestfish-actions.pod:2058
19052 msgid "luks-format-cipher"
19056 #: ../fish/guestfish-actions.pod:2060
19059 " luks-format-cipher device keyslot cipher\n"
19064 #: ../fish/guestfish-actions.pod:2062
19066 "This command is the same as C<luks-format> but it also allows you to set the "
19071 #: ../fish/guestfish-actions.pod:2071
19072 msgid "luks-kill-slot"
19076 #: ../fish/guestfish-actions.pod:2073
19079 " luks-kill-slot device keyslot\n"
19084 #: ../fish/guestfish-actions.pod:2082
19089 #: ../fish/guestfish-actions.pod:2084
19092 " luks-open device mapname\n"
19097 #: ../fish/guestfish-actions.pod:2098
19099 "If this block device contains LVM volume groups, then calling C<vgscan> "
19100 "followed by C<vg-activate-all> will make them visible."
19104 #: ../fish/guestfish-actions.pod:2105
19105 msgid "luks-open-ro"
19109 #: ../fish/guestfish-actions.pod:2107
19112 " luks-open-ro device mapname\n"
19117 #: ../fish/guestfish-actions.pod:2109
19119 "This is the same as C<luks-open> except that a read-only mapping is created."
19123 #: ../fish/guestfish-actions.pod:2115
19128 #: ../fish/guestfish-actions.pod:2117
19131 " lvcreate logvol volgroup mbytes\n"
19136 #: ../fish/guestfish-actions.pod:2122
19137 msgid "lvm-clear-filter"
19141 #: ../fish/guestfish-actions.pod:2124
19144 " lvm-clear-filter\n"
19149 #: ../fish/guestfish-actions.pod:2126
19151 "This undoes the effect of C<lvm-set-filter>. LVM will be able to see every "
19156 #: ../fish/guestfish-actions.pod:2132
19157 msgid "lvm-remove-all"
19161 #: ../fish/guestfish-actions.pod:2134
19164 " lvm-remove-all\n"
19169 #: ../fish/guestfish-actions.pod:2142
19170 msgid "lvm-set-filter"
19174 #: ../fish/guestfish-actions.pod:2144
19177 " lvm-set-filter 'devices ...'\n"
19182 #: ../fish/guestfish-actions.pod:2169
19187 #: ../fish/guestfish-actions.pod:2171
19190 " lvremove device\n"
19195 #: ../fish/guestfish-actions.pod:2179
19200 #: ../fish/guestfish-actions.pod:2181
19203 " lvrename logvol newlogvol\n"
19208 #: ../fish/guestfish-actions.pod:2185
19213 #: ../fish/guestfish-actions.pod:2187
19216 " lvresize device mbytes\n"
19221 #: ../fish/guestfish-actions.pod:2193
19222 msgid "lvresize-free"
19226 #: ../fish/guestfish-actions.pod:2195
19229 " lvresize-free lv percent\n"
19234 #: ../fish/guestfish-actions.pod:2203
19239 #: ../fish/guestfish-actions.pod:2205
19247 #: ../fish/guestfish-actions.pod:2213
19248 msgid "See also C<lvs-full>."
19252 #: ../fish/guestfish-actions.pod:2215
19257 #: ../fish/guestfish-actions.pod:2217
19265 #: ../fish/guestfish-actions.pod:2222
19270 #: ../fish/guestfish-actions.pod:2224
19278 #: ../fish/guestfish-actions.pod:2228
19283 #: ../fish/guestfish-actions.pod:2230
19286 " lxattrlist path 'names ...'\n"
19291 #: ../fish/guestfish-actions.pod:2246
19293 "This call is intended for programs that want to efficiently list a directory "
19294 "contents without making many round-trips. See also C<lstatlist> for a "
19295 "similarly efficient call for getting standard stats. Very long directory "
19296 "listings might cause the protocol message size to be exceeded, causing this "
19297 "call to fail. The caller must split up such requests into smaller groups of "
19302 #: ../fish/guestfish-actions.pod:2254
19307 #: ../fish/guestfish-actions.pod:2256
19315 #: ../fish/guestfish-actions.pod:2260
19320 #: ../fish/guestfish-actions.pod:2262
19323 " mkdir-mode path mode\n"
19328 #: ../fish/guestfish-actions.pod:2271
19329 msgid "See also C<mkdir>, C<umask>"
19333 #: ../fish/guestfish-actions.pod:2273
19338 #: ../fish/guestfish-actions.pod:2275
19346 #: ../fish/guestfish-actions.pod:2280
19351 #: ../fish/guestfish-actions.pod:2282
19354 " mkdtemp template\n"
19359 #: ../fish/guestfish-actions.pod:2303
19364 #: ../fish/guestfish-actions.pod:2305
19367 " mke2fs-J fstype blocksize device journal\n"
19372 #: ../fish/guestfish-actions.pod:2313
19373 msgid "See also C<mke2journal>."
19377 #: ../fish/guestfish-actions.pod:2315
19382 #: ../fish/guestfish-actions.pod:2317
19385 " mke2fs-JL fstype blocksize device label\n"
19390 #: ../fish/guestfish-actions.pod:2322
19391 msgid "See also C<mke2journal-L>."
19395 #: ../fish/guestfish-actions.pod:2324
19400 #: ../fish/guestfish-actions.pod:2326
19403 " mke2fs-JU fstype blocksize device uuid\n"
19408 #: ../fish/guestfish-actions.pod:2331
19409 msgid "See also C<mke2journal-U>."
19413 #: ../fish/guestfish-actions.pod:2333
19414 msgid "mke2journal"
19418 #: ../fish/guestfish-actions.pod:2335
19421 " mke2journal blocksize device\n"
19426 #: ../fish/guestfish-actions.pod:2342
19427 msgid "mke2journal-L"
19431 #: ../fish/guestfish-actions.pod:2344
19434 " mke2journal-L blocksize label device\n"
19439 #: ../fish/guestfish-actions.pod:2348
19440 msgid "mke2journal-U"
19444 #: ../fish/guestfish-actions.pod:2350
19447 " mke2journal-U blocksize uuid device\n"
19452 #: ../fish/guestfish-actions.pod:2354
19457 #: ../fish/guestfish-actions.pod:2356
19460 " mkfifo mode path\n"
19465 #: ../fish/guestfish-actions.pod:2358
19467 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
19468 "is just a convenient wrapper around C<mknod>."
19472 #: ../fish/guestfish-actions.pod:2364
19477 #: ../fish/guestfish-actions.pod:2366
19480 " mkfs fstype device\n"
19485 #: ../fish/guestfish-actions.pod:2372
19490 #: ../fish/guestfish-actions.pod:2374
19493 " mkfs-b fstype blocksize device\n"
19498 #: ../fish/guestfish-actions.pod:2376
19500 "This call is similar to C<mkfs>, but it allows you to control the block size "
19501 "of the resulting filesystem. Supported block sizes depend on the filesystem "
19502 "type, but typically they are C<1024>, C<2048> or C<4096> only."
19506 #: ../fish/guestfish-actions.pod:2384
19507 msgid "mkmountpoint"
19511 #: ../fish/guestfish-actions.pod:2386
19514 " mkmountpoint exemptpath\n"
19519 #: ../fish/guestfish-actions.pod:2388
19521 "C<mkmountpoint> and C<rmmountpoint> are specialized calls that can be used "
19522 "to create extra mountpoints before mounting the first filesystem."
19526 #: ../fish/guestfish-actions.pod:2412
19531 #: ../fish/guestfish-actions.pod:2414
19534 " mknod mode devmajor devminor path\n"
19539 #: ../fish/guestfish-actions.pod:2424
19541 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
19542 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
19543 "regular file). These constants are available in the standard Linux header "
19544 "files, or you can use C<mknod-b>, C<mknod-c> or C<mkfifo> which are wrappers "
19545 "around this command which bitwise OR in the appropriate constant for you."
19549 #: ../fish/guestfish-actions.pod:2434
19554 #: ../fish/guestfish-actions.pod:2436
19557 " mknod-b mode devmajor devminor path\n"
19562 #: ../fish/guestfish-actions.pod:2438
19564 "This call creates a block device node called C<path> with mode C<mode> and "
19565 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
19566 "wrapper around C<mknod>."
19570 #: ../fish/guestfish-actions.pod:2444
19575 #: ../fish/guestfish-actions.pod:2446
19578 " mknod-c mode devmajor devminor path\n"
19583 #: ../fish/guestfish-actions.pod:2448
19585 "This call creates a char device node called C<path> with mode C<mode> and "
19586 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
19587 "wrapper around C<mknod>."
19591 #: ../fish/guestfish-actions.pod:2454
19596 #: ../fish/guestfish-actions.pod:2456
19604 #: ../fish/guestfish-actions.pod:2460
19609 #: ../fish/guestfish-actions.pod:2462
19612 " mkswap-L label device\n"
19617 #: ../fish/guestfish-actions.pod:2470
19622 #: ../fish/guestfish-actions.pod:2472
19625 " mkswap-U uuid device\n"
19630 #: ../fish/guestfish-actions.pod:2476
19631 msgid "mkswap-file"
19635 #: ../fish/guestfish-actions.pod:2478
19638 " mkswap-file path\n"
19643 #: ../fish/guestfish-actions.pod:2482
19645 "This command just writes a swap file signature to an existing file. To "
19646 "create the file itself, use something like C<fallocate>."
19650 #: ../fish/guestfish-actions.pod:2485
19655 #: ../fish/guestfish-actions.pod:2487
19658 " modprobe modulename\n"
19663 #: ../fish/guestfish-actions.pod:2494
19668 #: ../fish/guestfish-actions.pod:2496
19671 " mount device mountpoint\n"
19676 #: ../fish/guestfish-actions.pod:2512
19678 "B<Important note:> When you use this call, the filesystem options C<sync> "
19679 "and C<noatime> are set implicitly. This was originally done because we "
19680 "thought it would improve reliability, but it turns out that I<-o sync> has a "
19681 "very large negative performance impact and negligible effect on "
19682 "reliability. Therefore we recommend that you avoid using C<mount> in any "
19683 "code that needs performance, and instead use C<mount-options> (use an empty "
19684 "string for the first parameter if you don't want any options)."
19688 #: ../fish/guestfish-actions.pod:2522
19693 #: ../fish/guestfish-actions.pod:2524
19696 " mount-loop file mountpoint\n"
19701 #: ../fish/guestfish-actions.pod:2530
19702 msgid "mount-options"
19706 #: ../fish/guestfish-actions.pod:2532
19709 " mount-options options device mountpoint\n"
19714 #: ../fish/guestfish-actions.pod:2534
19716 "This is the same as the C<mount> command, but it allows you to set the mount "
19717 "options as for the L<mount(8)> I<-o> flag."
19721 #: ../fish/guestfish-actions.pod:2542
19726 #: ../fish/guestfish-actions.pod:2544
19729 " mount-ro device mountpoint\n"
19734 #: ../fish/guestfish-actions.pod:2546
19736 "This is the same as the C<mount> command, but it mounts the filesystem with "
19737 "the read-only (I<-o ro>) flag."
19741 #: ../fish/guestfish-actions.pod:2549
19746 #: ../fish/guestfish-actions.pod:2551
19749 " mount-vfs options vfstype device mountpoint\n"
19754 #: ../fish/guestfish-actions.pod:2553
19756 "This is the same as the C<mount> command, but it allows you to set both the "
19757 "mount options and the vfstype as for the L<mount(8)> I<-o> and I<-t> flags."
19761 #: ../fish/guestfish-actions.pod:2557
19762 msgid "mountpoints"
19766 #: ../fish/guestfish-actions.pod:2559
19774 #: ../fish/guestfish-actions.pod:2561
19776 "This call is similar to C<mounts>. That call returns a list of devices. "
19777 "This one returns a hash table (map) of device name to directory where the "
19778 "device is mounted."
19782 #: ../fish/guestfish-actions.pod:2565
19787 #: ../fish/guestfish-actions.pod:2567
19795 #: ../fish/guestfish-actions.pod:2574
19796 msgid "See also: C<mountpoints>"
19800 #: ../fish/guestfish-actions.pod:2576
19805 #: ../fish/guestfish-actions.pod:2578
19813 #: ../fish/guestfish-actions.pod:2583
19814 msgid "ntfs-3g-probe"
19818 #: ../fish/guestfish-actions.pod:2585
19821 " ntfs-3g-probe true|false device\n"
19826 #: ../fish/guestfish-actions.pod:2599
19831 #: ../fish/guestfish-actions.pod:2601
19834 " ntfsresize device\n"
19839 #: ../fish/guestfish-actions.pod:2607
19840 msgid "ntfsresize-size"
19844 #: ../fish/guestfish-actions.pod:2609
19847 " ntfsresize-size device size\n"
19852 #: ../fish/guestfish-actions.pod:2611
19854 "This command is the same as C<ntfsresize> except that it allows you to "
19855 "specify the new size (in bytes) explicitly."
19859 #: ../fish/guestfish-actions.pod:2614
19864 #: ../fish/guestfish-actions.pod:2616
19867 " part-add device prlogex startsect endsect\n"
19872 #: ../fish/guestfish-actions.pod:2618
19874 "This command adds a partition to C<device>. If there is no partition table "
19875 "on the device, call C<part-init> first."
19879 #: ../fish/guestfish-actions.pod:2630
19881 "Creating a partition which covers the whole disk is not so easy. Use C<part-"
19882 "disk> to do that."
19886 #: ../fish/guestfish-actions.pod:2633
19891 #: ../fish/guestfish-actions.pod:2635
19894 " part-del device partnum\n"
19899 #: ../fish/guestfish-actions.pod:2643
19904 #: ../fish/guestfish-actions.pod:2645
19907 " part-disk device parttype\n"
19912 #: ../fish/guestfish-actions.pod:2647
19914 "This command is simply a combination of C<part-init> followed by C<part-add> "
19915 "to create a single primary partition covering the whole disk."
19919 #: ../fish/guestfish-actions.pod:2651
19921 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
19922 "possible values are described in C<part-init>."
19926 #: ../fish/guestfish-actions.pod:2657
19927 msgid "part-get-bootable"
19931 #: ../fish/guestfish-actions.pod:2659
19934 " part-get-bootable device partnum\n"
19939 #: ../fish/guestfish-actions.pod:2664
19940 msgid "See also C<part-set-bootable>."
19944 #: ../fish/guestfish-actions.pod:2666
19945 msgid "part-get-mbr-id"
19949 #: ../fish/guestfish-actions.pod:2668
19952 " part-get-mbr-id device partnum\n"
19957 #: ../fish/guestfish-actions.pod:2673 ../fish/guestfish-actions.pod:2811
19959 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
19960 "undefined results for other partition table types (see C<part-get-parttype>)."
19964 #: ../fish/guestfish-actions.pod:2677
19965 msgid "part-get-parttype"
19969 #: ../fish/guestfish-actions.pod:2679
19972 " part-get-parttype device\n"
19977 #: ../fish/guestfish-actions.pod:2684
19979 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
19980 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
19981 "possible, although unusual. See C<part-init> for a full list."
19985 #: ../fish/guestfish-actions.pod:2689
19990 #: ../fish/guestfish-actions.pod:2691
19993 " part-init device parttype\n"
19998 #: ../fish/guestfish-actions.pod:2697
20000 "Initially there are no partitions. Following this, you should call C<part-"
20001 "add> for each partition required."
20005 #: ../fish/guestfish-actions.pod:2760
20010 #: ../fish/guestfish-actions.pod:2762
20013 " part-list device\n"
20018 #: ../fish/guestfish-actions.pod:2777
20020 "Start of the partition I<in bytes>. To get sectors you have to divide by "
20021 "the device's sector size, see C<blockdev-getss>."
20025 #: ../fish/guestfish-actions.pod:2790
20026 msgid "part-set-bootable"
20030 #: ../fish/guestfish-actions.pod:2792
20033 " part-set-bootable device partnum true|false\n"
20038 #: ../fish/guestfish-actions.pod:2801
20039 msgid "part-set-mbr-id"
20043 #: ../fish/guestfish-actions.pod:2803
20046 " part-set-mbr-id device partnum idbyte\n"
20051 #: ../fish/guestfish-actions.pod:2815
20052 msgid "part-set-name"
20056 #: ../fish/guestfish-actions.pod:2817
20059 " part-set-name device partnum name\n"
20064 #: ../fish/guestfish-actions.pod:2825
20065 msgid "ping-daemon"
20069 #: ../fish/guestfish-actions.pod:2827
20077 #: ../fish/guestfish-actions.pod:2834
20082 #: ../fish/guestfish-actions.pod:2836
20085 " pread path count offset\n"
20090 #: ../fish/guestfish-actions.pod:2844
20091 msgid "See also C<pwrite>."
20095 #: ../fish/guestfish-actions.pod:2849
20100 #: ../fish/guestfish-actions.pod:2851
20103 " pvcreate device\n"
20108 #: ../fish/guestfish-actions.pod:2857
20113 #: ../fish/guestfish-actions.pod:2859
20116 " pvremove device\n"
20121 #: ../fish/guestfish-actions.pod:2868
20126 #: ../fish/guestfish-actions.pod:2870
20129 " pvresize device\n"
20134 #: ../fish/guestfish-actions.pod:2875
20135 msgid "pvresize-size"
20139 #: ../fish/guestfish-actions.pod:2877
20142 " pvresize-size device size\n"
20147 #: ../fish/guestfish-actions.pod:2879
20149 "This command is the same as C<pvresize> except that it allows you to specify "
20150 "the new size (in bytes) explicitly."
20154 #: ../fish/guestfish-actions.pod:2882
20159 #: ../fish/guestfish-actions.pod:2884
20167 #: ../fish/guestfish-actions.pod:2892
20168 msgid "See also C<pvs-full>."
20172 #: ../fish/guestfish-actions.pod:2894
20177 #: ../fish/guestfish-actions.pod:2896
20185 #: ../fish/guestfish-actions.pod:2901
20190 #: ../fish/guestfish-actions.pod:2903
20198 #: ../fish/guestfish-actions.pod:2907
20203 #: ../fish/guestfish-actions.pod:2909
20206 " pwrite path content offset\n"
20211 #: ../fish/guestfish-actions.pod:2920
20212 msgid "See also C<pread>."
20216 #: ../fish/guestfish-actions.pod:2925
20221 #: ../fish/guestfish-actions.pod:2927
20224 " read-file path\n"
20229 #: ../fish/guestfish-actions.pod:2932
20231 "Unlike C<cat>, this function can correctly handle files that contain "
20232 "embedded ASCII NUL characters. However unlike C<download>, this function is "
20233 "limited in the total size of file that can be handled."
20237 #: ../fish/guestfish-actions.pod:2940
20242 #: ../fish/guestfish-actions.pod:2942
20245 " read-lines path\n"
20250 #: ../fish/guestfish-actions.pod:2949
20252 "Note that this function cannot correctly handle binary files (specifically, "
20253 "files containing C<\\0> character which is treated as end of line). For "
20254 "those you need to use the C<read-file> function which has a more complex "
20259 #: ../fish/guestfish-actions.pod:2954
20264 #: ../fish/guestfish-actions.pod:2956
20272 #: ../fish/guestfish-actions.pod:3008
20274 "This function is primarily intended for use by programs. To get a simple "
20275 "list of names, use C<ls>. To get a printable directory for human "
20276 "consumption, use C<ll>."
20280 #: ../fish/guestfish-actions.pod:3012
20285 #: ../fish/guestfish-actions.pod:3014
20293 #: ../fish/guestfish-actions.pod:3018
20294 msgid "readlinklist"
20298 #: ../fish/guestfish-actions.pod:3020
20301 " readlinklist path 'names ...'\n"
20306 #: ../fish/guestfish-actions.pod:3044
20311 #: ../fish/guestfish-actions.pod:3046
20319 #: ../fish/guestfish-actions.pod:3051
20320 msgid "removexattr"
20324 #: ../fish/guestfish-actions.pod:3053
20327 " removexattr xattr path\n"
20332 #: ../fish/guestfish-actions.pod:3058
20333 msgid "See also: C<lremovexattr>, L<attr(5)>."
20337 #: ../fish/guestfish-actions.pod:3060
20342 #: ../fish/guestfish-actions.pod:3062
20345 " resize2fs device\n"
20350 #: ../fish/guestfish-actions.pod:3067
20352 "I<Note:> It is sometimes required that you run C<e2fsck-f> on the C<device> "
20353 "before calling this command. For unknown reasons C<resize2fs> sometimes "
20354 "gives an error about this and sometimes not. In any case, it is always safe "
20355 "to call C<e2fsck-f> before calling this function."
20359 #: ../fish/guestfish-actions.pod:3073
20360 msgid "resize2fs-size"
20364 #: ../fish/guestfish-actions.pod:3075
20367 " resize2fs-size device size\n"
20372 #: ../fish/guestfish-actions.pod:3077
20374 "This command is the same as C<resize2fs> except that it allows you to "
20375 "specify the new size (in bytes) explicitly."
20379 #: ../fish/guestfish-actions.pod:3080
20384 #: ../fish/guestfish-actions.pod:3082
20392 #: ../fish/guestfish-actions.pod:3086
20397 #: ../fish/guestfish-actions.pod:3088
20405 #: ../fish/guestfish-actions.pod:3094
20410 #: ../fish/guestfish-actions.pod:3096
20418 #: ../fish/guestfish-actions.pod:3100
20419 msgid "rmmountpoint"
20423 #: ../fish/guestfish-actions.pod:3102
20426 " rmmountpoint exemptpath\n"
20431 #: ../fish/guestfish-actions.pod:3104
20433 "This calls removes a mountpoint that was previously created with "
20434 "C<mkmountpoint>. See C<mkmountpoint> for full details."
20438 #: ../fish/guestfish-actions.pod:3108
20439 msgid "scrub-device"
20443 #: ../fish/guestfish-actions.pod:3110
20446 " scrub-device device\n"
20451 #: ../fish/guestfish-actions.pod:3121
20456 #: ../fish/guestfish-actions.pod:3123
20459 " scrub-file file\n"
20464 #: ../fish/guestfish-actions.pod:3133
20465 msgid "scrub-freespace"
20469 #: ../fish/guestfish-actions.pod:3135
20472 " scrub-freespace dir\n"
20477 #: ../fish/guestfish-actions.pod:3137
20479 "This command creates the directory C<dir> and then fills it with files until "
20480 "the filesystem is full, and scrubs the files as for C<scrub-file>, and "
20481 "deletes them. The intention is to scrub any free space on the partition "
20482 "containing C<dir>."
20486 #: ../fish/guestfish-actions.pod:3146
20487 msgid "set-append | append"
20491 #: ../fish/guestfish-actions.pod:3148
20494 " set-append append\n"
20499 #: ../fish/guestfish-actions.pod:3159
20500 msgid "set-autosync | autosync"
20504 #: ../fish/guestfish-actions.pod:3161
20507 " set-autosync true|false\n"
20512 #: ../fish/guestfish-actions.pod:3163
20514 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
20515 "effort attempt to run C<umount-all> followed by C<sync> when the handle is "
20516 "closed (also if the program exits without closing handles)."
20520 #: ../fish/guestfish-actions.pod:3171
20521 msgid "set-direct | direct"
20525 #: ../fish/guestfish-actions.pod:3173
20528 " set-direct true|false\n"
20533 #: ../fish/guestfish-actions.pod:3179
20535 "One consequence of this is that log messages aren't caught by the library "
20536 "and handled by C<set-log-message-callback>, but go straight to stdout."
20540 #: ../fish/guestfish-actions.pod:3188
20541 msgid "set-e2label"
20545 #: ../fish/guestfish-actions.pod:3190
20548 " set-e2label device label\n"
20553 #: ../fish/guestfish-actions.pod:3196
20555 "You can use either C<tune2fs-l> or C<get-e2label> to return the existing "
20556 "label on a filesystem."
20560 #: ../fish/guestfish-actions.pod:3199
20565 #: ../fish/guestfish-actions.pod:3201
20568 " set-e2uuid device uuid\n"
20573 #: ../fish/guestfish-actions.pod:3208
20575 "You can use either C<tune2fs-l> or C<get-e2uuid> to return the existing UUID "
20580 #: ../fish/guestfish-actions.pod:3211
20581 msgid "set-memsize | memsize"
20585 #: ../fish/guestfish-actions.pod:3213
20588 " set-memsize memsize\n"
20593 #: ../fish/guestfish-actions.pod:3215
20595 "This sets the memory size in megabytes allocated to the qemu subprocess. "
20596 "This only has any effect if called before C<launch>."
20600 #: ../fish/guestfish-actions.pod:3226
20601 msgid "set-network | network"
20605 #: ../fish/guestfish-actions.pod:3228
20608 " set-network true|false\n"
20613 #: ../fish/guestfish-actions.pod:3236
20615 "You must call this before calling C<launch>, otherwise it has no effect."
20619 #: ../fish/guestfish-actions.pod:3239
20620 msgid "set-path | path"
20624 #: ../fish/guestfish-actions.pod:3241
20627 " set-path searchpath\n"
20632 #: ../fish/guestfish-actions.pod:3250
20633 msgid "set-qemu | qemu"
20637 #: ../fish/guestfish-actions.pod:3252
20645 #: ../fish/guestfish-actions.pod:3272
20646 msgid "set-recovery-proc | recovery-proc"
20650 #: ../fish/guestfish-actions.pod:3274
20653 " set-recovery-proc true|false\n"
20658 #: ../fish/guestfish-actions.pod:3276
20660 "If this is called with the parameter C<false> then C<launch> does not create "
20661 "a recovery process. The purpose of the recovery process is to stop runaway "
20662 "qemu processes in the case where the main program aborts abruptly."
20666 #: ../fish/guestfish-actions.pod:3281
20668 "This only has any effect if called before C<launch>, and the default is true."
20672 #: ../fish/guestfish-actions.pod:3290
20673 msgid "set-selinux | selinux"
20677 #: ../fish/guestfish-actions.pod:3292
20680 " set-selinux true|false\n"
20685 #: ../fish/guestfish-actions.pod:3303
20686 msgid "set-trace | trace"
20690 #: ../fish/guestfish-actions.pod:3305
20693 " set-trace true|false\n"
20698 #: ../fish/guestfish-actions.pod:3321
20699 msgid "set-verbose | verbose"
20703 #: ../fish/guestfish-actions.pod:3323
20706 " set-verbose true|false\n"
20711 #: ../fish/guestfish-actions.pod:3330
20716 #: ../fish/guestfish-actions.pod:3332
20719 " setcon context\n"
20724 #: ../fish/guestfish-actions.pod:3339
20729 #: ../fish/guestfish-actions.pod:3341
20732 " setxattr xattr val vallen path\n"
20737 #: ../fish/guestfish-actions.pod:3347
20738 msgid "See also: C<lsetxattr>, L<attr(5)>."
20742 #: ../fish/guestfish-actions.pod:3349
20747 #: ../fish/guestfish-actions.pod:3351
20750 " sfdisk device cyls heads sectors 'lines ...'\n"
20755 #: ../fish/guestfish-actions.pod:3373
20756 msgid "See also: C<sfdisk-l>, C<sfdisk-N>, C<part-init>"
20760 #: ../fish/guestfish-actions.pod:3379
20765 #: ../fish/guestfish-actions.pod:3381
20768 " sfdiskM device 'lines ...'\n"
20773 #: ../fish/guestfish-actions.pod:3383
20775 "This is a simplified interface to the C<sfdisk> command, where partition "
20776 "sizes are specified in megabytes only (rounded to the nearest cylinder) and "
20777 "you don't need to specify the cyls, heads and sectors parameters which were "
20778 "rarely if ever used anyway."
20782 #: ../fish/guestfish-actions.pod:3389
20783 msgid "See also: C<sfdisk>, the L<sfdisk(8)> manpage and C<part-disk>"
20787 #: ../fish/guestfish-actions.pod:3395
20792 #: ../fish/guestfish-actions.pod:3397
20795 " sfdisk-N device partnum cyls heads sectors line\n"
20800 #: ../fish/guestfish-actions.pod:3402
20802 "For other parameters, see C<sfdisk>. You should usually pass C<0> for the "
20803 "cyls/heads/sectors parameters."
20807 #: ../fish/guestfish-actions.pod:3405
20808 msgid "See also: C<part-add>"
20812 #: ../fish/guestfish-actions.pod:3410
20813 msgid "sfdisk-disk-geometry"
20817 #: ../fish/guestfish-actions.pod:3412
20820 " sfdisk-disk-geometry device\n"
20825 #: ../fish/guestfish-actions.pod:3414
20827 "This displays the disk geometry of C<device> read from the partition table. "
20828 "Especially in the case where the underlying block device has been resized, "
20829 "this can be different from the kernel's idea of the geometry (see C<sfdisk-"
20830 "kernel-geometry>)."
20834 #: ../fish/guestfish-actions.pod:3422
20835 msgid "sfdisk-kernel-geometry"
20839 #: ../fish/guestfish-actions.pod:3424
20842 " sfdisk-kernel-geometry device\n"
20847 #: ../fish/guestfish-actions.pod:3431
20852 #: ../fish/guestfish-actions.pod:3433
20855 " sfdisk-l device\n"
20860 #: ../fish/guestfish-actions.pod:3439
20861 msgid "See also: C<part-list>"
20865 #: ../fish/guestfish-actions.pod:3441
20870 #: ../fish/guestfish-actions.pod:3443
20878 #: ../fish/guestfish-actions.pod:3448
20879 msgid "This is like C<command>, but passes the command to:"
20883 #: ../fish/guestfish-actions.pod:3456
20884 msgid "All the provisos about C<command> apply to this call."
20888 #: ../fish/guestfish-actions.pod:3458
20893 #: ../fish/guestfish-actions.pod:3460
20896 " sh-lines command\n"
20901 #: ../fish/guestfish-actions.pod:3462
20902 msgid "This is the same as C<sh>, but splits the result into a list of lines."
20906 #: ../fish/guestfish-actions.pod:3465
20907 msgid "See also: C<command-lines>"
20911 #: ../fish/guestfish-actions.pod:3467
20916 #: ../fish/guestfish-actions.pod:3469
20924 #: ../fish/guestfish-actions.pod:3473
20929 #: ../fish/guestfish-actions.pod:3475
20937 #: ../fish/guestfish-actions.pod:3481
20942 #: ../fish/guestfish-actions.pod:3483
20950 #: ../fish/guestfish-actions.pod:3491
20955 #: ../fish/guestfish-actions.pod:3493
20963 #: ../fish/guestfish-actions.pod:3501
20968 #: ../fish/guestfish-actions.pod:3503
20971 " strings-e encoding path\n"
20976 #: ../fish/guestfish-actions.pod:3505
20978 "This is like the C<strings> command, but allows you to specify the encoding "
20979 "of strings that are looked for in the source file C<path>."
20983 #: ../fish/guestfish-actions.pod:3515
20985 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
20986 "ISO-8859-X (this is what C<strings> uses)."
20990 #: ../fish/guestfish-actions.pod:3547
20991 msgid "swapoff-device"
20995 #: ../fish/guestfish-actions.pod:3549
20998 " swapoff-device device\n"
21003 #: ../fish/guestfish-actions.pod:3551
21005 "This command disables the libguestfs appliance swap device or partition "
21006 "named C<device>. See C<swapon-device>."
21010 #: ../fish/guestfish-actions.pod:3555
21011 msgid "swapoff-file"
21015 #: ../fish/guestfish-actions.pod:3557
21018 " swapoff-file file\n"
21023 #: ../fish/guestfish-actions.pod:3561
21024 msgid "swapoff-label"
21028 #: ../fish/guestfish-actions.pod:3563
21031 " swapoff-label label\n"
21036 #: ../fish/guestfish-actions.pod:3568
21037 msgid "swapoff-uuid"
21041 #: ../fish/guestfish-actions.pod:3570
21044 " swapoff-uuid uuid\n"
21049 #: ../fish/guestfish-actions.pod:3575
21050 msgid "swapon-device"
21054 #: ../fish/guestfish-actions.pod:3577
21057 " swapon-device device\n"
21062 #: ../fish/guestfish-actions.pod:3579
21064 "This command enables the libguestfs appliance to use the swap device or "
21065 "partition named C<device>. The increased memory is made available for all "
21066 "commands, for example those run using C<command> or C<sh>."
21070 #: ../fish/guestfish-actions.pod:3591
21071 msgid "swapon-file"
21075 #: ../fish/guestfish-actions.pod:3593
21078 " swapon-file file\n"
21083 #: ../fish/guestfish-actions.pod:3595
21085 "This command enables swap to a file. See C<swapon-device> for other notes."
21089 #: ../fish/guestfish-actions.pod:3598
21090 msgid "swapon-label"
21094 #: ../fish/guestfish-actions.pod:3600
21097 " swapon-label label\n"
21102 #: ../fish/guestfish-actions.pod:3602
21104 "This command enables swap to a labeled swap partition. See C<swapon-device> "
21109 #: ../fish/guestfish-actions.pod:3605
21110 msgid "swapon-uuid"
21114 #: ../fish/guestfish-actions.pod:3607
21117 " swapon-uuid uuid\n"
21122 #: ../fish/guestfish-actions.pod:3609
21124 "This command enables swap to a swap partition with the given UUID. See "
21125 "C<swapon-device> for other notes."
21129 #: ../fish/guestfish-actions.pod:3612
21134 #: ../fish/guestfish-actions.pod:3614
21142 #: ../fish/guestfish-actions.pod:3622
21147 #: ../fish/guestfish-actions.pod:3624
21155 #: ../fish/guestfish-actions.pod:3632
21160 #: ../fish/guestfish-actions.pod:3634
21163 " tail-n nrlines path\n"
21168 #: ../fish/guestfish-actions.pod:3647
21173 #: ../fish/guestfish-actions.pod:3649
21176 " tar-in (tarfile|-) directory\n"
21181 #: ../fish/guestfish-actions.pod:3654
21182 msgid "To upload a compressed tarball, use C<tgz-in> or C<txz-in>."
21186 #: ../fish/guestfish-actions.pod:3659
21191 #: ../fish/guestfish-actions.pod:3661
21194 " tar-out directory (tarfile|-)\n"
21199 #: ../fish/guestfish-actions.pod:3666
21200 msgid "To download a compressed tarball, use C<tgz-out> or C<txz-out>."
21204 #: ../fish/guestfish-actions.pod:3671
21209 #: ../fish/guestfish-actions.pod:3673
21212 " tgz-in (tarball|-) directory\n"
21217 #: ../fish/guestfish-actions.pod:3678
21218 msgid "To upload an uncompressed tarball, use C<tar-in>."
21222 #: ../fish/guestfish-actions.pod:3682
21227 #: ../fish/guestfish-actions.pod:3684
21230 " tgz-out directory (tarball|-)\n"
21235 #: ../fish/guestfish-actions.pod:3689
21236 msgid "To download an uncompressed tarball, use C<tar-out>."
21240 #: ../fish/guestfish-actions.pod:3693
21245 #: ../fish/guestfish-actions.pod:3695
21253 #: ../fish/guestfish-actions.pod:3704
21258 #: ../fish/guestfish-actions.pod:3706
21266 #: ../fish/guestfish-actions.pod:3711
21267 msgid "truncate-size"
21271 #: ../fish/guestfish-actions.pod:3713
21274 " truncate-size path size\n"
21279 #: ../fish/guestfish-actions.pod:3718
21281 "If the current file size is less than C<size> then the file is extended to "
21282 "the required size with zero bytes. This creates a sparse file (ie. disk "
21283 "blocks are not allocated for the file until you write to it). To create a "
21284 "non-sparse file of zeroes, use C<fallocate64> instead."
21288 #: ../fish/guestfish-actions.pod:3724
21293 #: ../fish/guestfish-actions.pod:3726
21296 " tune2fs-l device\n"
21301 #: ../fish/guestfish-actions.pod:3736
21306 #: ../fish/guestfish-actions.pod:3738
21309 " txz-in (tarball|-) directory\n"
21314 #: ../fish/guestfish-actions.pod:3745
21319 #: ../fish/guestfish-actions.pod:3747
21322 " txz-out directory (tarball|-)\n"
21327 #: ../fish/guestfish-actions.pod:3754
21332 #: ../fish/guestfish-actions.pod:3756
21340 #: ../fish/guestfish-actions.pod:3770
21341 msgid "See also C<get-umask>, L<umask(2)>, C<mknod>, C<mkdir>."
21345 #: ../fish/guestfish-actions.pod:3775
21346 msgid "umount | unmount"
21350 #: ../fish/guestfish-actions.pod:3777
21353 " umount pathordevice\n"
21358 #: ../fish/guestfish-actions.pod:3783
21359 msgid "umount-all | unmount-all"
21363 #: ../fish/guestfish-actions.pod:3785
21371 #: ../fish/guestfish-actions.pod:3791
21376 #: ../fish/guestfish-actions.pod:3793
21379 " upload (filename|-) remotefilename\n"
21384 #: ../fish/guestfish-actions.pod:3800
21385 msgid "See also C<download>."
21389 #: ../fish/guestfish-actions.pod:3804
21394 #: ../fish/guestfish-actions.pod:3806
21397 " utimens path atsecs atnsecs mtsecs mtnsecs\n"
21402 #: ../fish/guestfish-actions.pod:3825
21407 #: ../fish/guestfish-actions.pod:3827
21415 #: ../fish/guestfish-actions.pod:3854
21417 "I<Note:> Don't use this call to test for availability of features. In "
21418 "enterprise distributions we backport features from later versions into "
21419 "earlier versions, making this an unreliable way to test for features. Use "
21420 "C<available> instead."
21424 #: ../fish/guestfish-actions.pod:3860
21429 #: ../fish/guestfish-actions.pod:3862
21432 " vfs-label device\n"
21437 #: ../fish/guestfish-actions.pod:3869
21438 msgid "To find a filesystem from the label, use C<findfs-label>."
21442 #: ../fish/guestfish-actions.pod:3871
21447 #: ../fish/guestfish-actions.pod:3873
21450 " vfs-type device\n"
21455 #: ../fish/guestfish-actions.pod:3883
21460 #: ../fish/guestfish-actions.pod:3885
21463 " vfs-uuid device\n"
21468 #: ../fish/guestfish-actions.pod:3892
21469 msgid "To find a filesystem from the UUID, use C<findfs-uuid>."
21473 #: ../fish/guestfish-actions.pod:3894
21474 msgid "vg-activate"
21478 #: ../fish/guestfish-actions.pod:3896
21481 " vg-activate true|false 'volgroups ...'\n"
21486 #: ../fish/guestfish-actions.pod:3909
21487 msgid "vg-activate-all"
21491 #: ../fish/guestfish-actions.pod:3911
21494 " vg-activate-all true|false\n"
21499 #: ../fish/guestfish-actions.pod:3921
21504 #: ../fish/guestfish-actions.pod:3923
21507 " vgcreate volgroup 'physvols ...'\n"
21512 #: ../fish/guestfish-actions.pod:3928
21517 #: ../fish/guestfish-actions.pod:3930
21520 " vglvuuids vgname\n"
21525 #: ../fish/guestfish-actions.pod:3935
21527 "You can use this along with C<lvs> and C<lvuuid> calls to associate logical "
21528 "volumes and volume groups."
21532 #: ../fish/guestfish-actions.pod:3938
21533 msgid "See also C<vgpvuuids>."
21537 #: ../fish/guestfish-actions.pod:3940
21542 #: ../fish/guestfish-actions.pod:3942
21545 " vgpvuuids vgname\n"
21550 #: ../fish/guestfish-actions.pod:3947
21552 "You can use this along with C<pvs> and C<pvuuid> calls to associate physical "
21553 "volumes and volume groups."
21557 #: ../fish/guestfish-actions.pod:3950
21558 msgid "See also C<vglvuuids>."
21562 #: ../fish/guestfish-actions.pod:3952
21567 #: ../fish/guestfish-actions.pod:3954
21570 " vgremove vgname\n"
21575 #: ../fish/guestfish-actions.pod:3961
21580 #: ../fish/guestfish-actions.pod:3963
21583 " vgrename volgroup newvolgroup\n"
21588 #: ../fish/guestfish-actions.pod:3967
21593 #: ../fish/guestfish-actions.pod:3969
21601 #: ../fish/guestfish-actions.pod:3977
21602 msgid "See also C<vgs-full>."
21606 #: ../fish/guestfish-actions.pod:3979
21611 #: ../fish/guestfish-actions.pod:3981
21619 #: ../fish/guestfish-actions.pod:3986
21624 #: ../fish/guestfish-actions.pod:3988
21632 #: ../fish/guestfish-actions.pod:3993
21637 #: ../fish/guestfish-actions.pod:3995
21645 #: ../fish/guestfish-actions.pod:3999
21650 #: ../fish/guestfish-actions.pod:4001
21658 #: ../fish/guestfish-actions.pod:4006
21663 #: ../fish/guestfish-actions.pod:4008
21671 #: ../fish/guestfish-actions.pod:4013
21676 #: ../fish/guestfish-actions.pod:4015
21684 #: ../fish/guestfish-actions.pod:4020
21689 #: ../fish/guestfish-actions.pod:4022
21692 " write path content\n"
21697 #: ../fish/guestfish-actions.pod:4030
21702 #: ../fish/guestfish-actions.pod:4032
21705 " write-file path content size\n"
21710 #: ../fish/guestfish-actions.pod:4055
21715 #: ../fish/guestfish-actions.pod:4057
21718 " zegrep regex path\n"
21723 #: ../fish/guestfish-actions.pod:4065
21728 #: ../fish/guestfish-actions.pod:4067
21731 " zegrepi regex path\n"
21736 #: ../fish/guestfish-actions.pod:4075
21741 #: ../fish/guestfish-actions.pod:4077
21749 #: ../fish/guestfish-actions.pod:4085
21750 msgid "See also: C<zero-device>, C<scrub-device>."
21754 #: ../fish/guestfish-actions.pod:4087
21755 msgid "zero-device"
21759 #: ../fish/guestfish-actions.pod:4089
21762 " zero-device device\n"
21767 #: ../fish/guestfish-actions.pod:4091
21769 "This command writes zeroes over the entire C<device>. Compare with C<zero> "
21770 "which just zeroes the first few blocks of a device."
21774 #: ../fish/guestfish-actions.pod:4098
21779 #: ../fish/guestfish-actions.pod:4100
21782 " zerofree device\n"
21787 #: ../fish/guestfish-actions.pod:4113
21792 #: ../fish/guestfish-actions.pod:4115
21795 " zfgrep pattern path\n"
21800 #: ../fish/guestfish-actions.pod:4123
21805 #: ../fish/guestfish-actions.pod:4125
21808 " zfgrepi pattern path\n"
21813 #: ../fish/guestfish-actions.pod:4133
21818 #: ../fish/guestfish-actions.pod:4135
21821 " zfile meth path\n"
21826 #: ../fish/guestfish-actions.pod:4142
21828 "Since 1.0.63, use C<file> instead which can now process compressed files."
21832 #: ../fish/guestfish-actions.pod:4152
21837 #: ../fish/guestfish-actions.pod:4154
21840 " zgrep regex path\n"
21845 #: ../fish/guestfish-actions.pod:4162
21850 #: ../fish/guestfish-actions.pod:4164
21853 " zgrepi regex path\n"
21858 #: ../test-tool/libguestfs-test-tool.pod:5
21859 msgid "libguestfs-test-tool - End user tests for libguestfs"
21863 #: ../test-tool/libguestfs-test-tool.pod:9
21866 " libguestfs-test-tool [--options]\n"
21871 #: ../test-tool/libguestfs-test-tool.pod:13
21873 "libguestfs-test-tool is a test program shipped with libguestfs to end users "
21874 "and developers, to allow them to check basic libguestfs functionality is "
21875 "working. This is needed because libguestfs occasionally breaks for reasons "
21876 "beyond our control: usually because of changes in the underlying qemu or "
21877 "kernel packages, or the host environment."
21881 #: ../test-tool/libguestfs-test-tool.pod:20
21882 msgid "If you suspect a problem in libguestfs, then just run:"
21886 #: ../test-tool/libguestfs-test-tool.pod:22
21889 " libguestfs-test-tool\n"
21894 #: ../test-tool/libguestfs-test-tool.pod:24
21895 msgid "It will print lots of diagnostic messages."
21899 #: ../test-tool/libguestfs-test-tool.pod:26
21900 msgid "If it runs to completion successfully, you will see this near the end:"
21904 #: ../test-tool/libguestfs-test-tool.pod:28
21907 " ===== TEST FINISHED OK =====\n"
21912 #: ../test-tool/libguestfs-test-tool.pod:30
21913 msgid "and the test tool will exit with code 0."
21917 #: ../test-tool/libguestfs-test-tool.pod:32
21919 "If it fails (and/or exits with non-zero error code), please paste the "
21920 "B<complete, unedited> output of the test tool into a bug report. More "
21921 "information about reporting bugs can be found on the L<http://libguestfs.org/"
21926 #: ../test-tool/libguestfs-test-tool.pod:41
21931 #: ../test-tool/libguestfs-test-tool.pod:43
21932 msgid "Display short usage information and exit."
21936 #: ../test-tool/libguestfs-test-tool.pod:45
21937 msgid "I<--helper /path/to/libguestfs-test-tool-helper>"
21941 #: ../test-tool/libguestfs-test-tool.pod:47
21943 "Pass an alternate name for the helper program. libguestfs-test-tool will "
21944 "normally look in the C<$libexec> directory that was configured when the tool "
21949 #: ../test-tool/libguestfs-test-tool.pod:51
21950 msgid "I<--qemu qemu_binary>"
21954 #: ../test-tool/libguestfs-test-tool.pod:53
21956 "If you have downloaded another qemu binary, point this option at the full "
21957 "path of the binary to try it."
21961 #: ../test-tool/libguestfs-test-tool.pod:56
21962 msgid "I<--qemudir qemu_source_dir>"
21966 #: ../test-tool/libguestfs-test-tool.pod:58
21968 "If you have compiled qemu from source, point this option at the source "
21969 "directory to try it."
21973 #: ../test-tool/libguestfs-test-tool.pod:61
21974 msgid "I<--timeout N>"
21978 #: ../test-tool/libguestfs-test-tool.pod:63
21980 "Set the launch timeout to C<N> seconds. The default is 120 seconds which "
21981 "does not usually need to be adjusted unless your machine is very slow."
21985 #: ../test-tool/libguestfs-test-tool.pod:69
21986 msgid "TRYING OUT A DIFFERENT VERSION OF QEMU"
21990 #: ../test-tool/libguestfs-test-tool.pod:71
21992 "If you have compiled another version of qemu from source and would like to "
21993 "try that, then you can use the I<--qemudir> option to point to the qemu "
21994 "source directory."
21998 #: ../test-tool/libguestfs-test-tool.pod:75
22000 "If you have downloaded a qemu binary from somewhere, use the I<--qemu> "
22001 "option to point to the binary."
22005 #: ../test-tool/libguestfs-test-tool.pod:78
22007 "When using an alternate qemu with libguestfs, usually you would need to "
22008 "write a qemu wrapper script (see section I<QEMU WRAPPERS> in L<guestfs(3)"
22009 ">). libguestfs-test-tool writes a temporary qemu wrapper script when you "
22010 "use either of the I<--qemudir> or I<--qemu> options."
22014 #: ../test-tool/libguestfs-test-tool.pod:85
22016 "libguestfs-test-tool returns I<0> if the tests completed without error, or "
22017 "I<1> if there was an error."
22021 #: ../test-tool/libguestfs-test-tool.pod:92
22022 msgid "/usr/libexec/libguestfs-test-tool-helper"
22026 #: ../test-tool/libguestfs-test-tool.pod:94
22028 "This helper program is run inside the appliance and provides additional "
22033 #: ../test-tool/libguestfs-test-tool.pod:97
22034 msgid "/usr/bin/mkisofs"
22038 #: ../test-tool/libguestfs-test-tool.pod:99
22040 "The C<mkisofs> command is required in order to construct a CD-ROM ISO file "
22041 "which is used as part of the tests."
22045 #: ../test-tool/libguestfs-test-tool.pod:106
22047 "For the full list of environment variables which may affect libguestfs, "
22048 "please see the L<guestfs(3)> manual page."
22052 #: ../test-tool/libguestfs-test-tool.pod:111
22053 msgid "L<guestfs(3)>, L<http://libguestfs.org/>, L<http://qemu.org/>."
22057 #: ../test-tool/libguestfs-test-tool.pod:121 ../fuse/guestmount.pod:195
22058 msgid "Copyright (C) 2009 Red Hat Inc. L<http://libguestfs.org/>"
22062 #: ../fuse/guestmount.pod:5
22064 "guestmount - Mount a guest filesystem on the host using FUSE and libguestfs"
22068 #: ../fuse/guestmount.pod:9
22071 " guestmount [--options] -a disk.img -m device [--ro] mountpoint\n"
22076 #: ../fuse/guestmount.pod:13
22078 "You must I<not> use C<guestmount> in read-write mode on live virtual "
22079 "machines. If you do this, you risk disk corruption in the VM."
22083 #: ../fuse/guestmount.pod:18
22085 "The guestmount program can be used to mount virtual machine filesystems and "
22086 "other disk images on the host. It uses libguestfs for access to the guest "
22087 "filesystem, and FUSE (the \"filesystem in userspace\") to make it appear as "
22088 "a mountable device."
22092 #: ../fuse/guestmount.pod:23
22094 "Along with other options, you have to give at least one device (I<-a> "
22095 "option) and at least one mountpoint (I<-m> option). How this works is "
22096 "better explained in the L<guestfish(1)> manual page, or you can use L<virt-"
22097 "inspector(1)> and/or the wrapper script C<guestmount-wrapper> to help you."
22101 #: ../fuse/guestmount.pod:29
22103 "FUSE lets you mount filesystems as non-root. The mountpoint must be owned "
22104 "by you, and the filesystem will not be visible to any other users unless you "
22105 "make certain global configuration changes to C</etc/fuse.conf>. To unmount "
22106 "the filesystem, use the C<fusermount -u> command."
22110 #: ../fuse/guestmount.pod:37
22112 "For a typical Windows guest which has its main filesystem on the first "
22117 #: ../fuse/guestmount.pod:40
22120 " guestmount -a windows.img -m /dev/sda1 --ro /mnt\n"
22125 #: ../fuse/guestmount.pod:42
22127 "For a typical Linux guest which has a /boot filesystem on the first "
22128 "partition, and the root filesystem on a logical volume:"
22132 #: ../fuse/guestmount.pod:45
22135 " guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot --ro /mnt\n"
22140 #: ../fuse/guestmount.pod:47
22142 "To get L<virt-inspector(1)> to do the hard work of detecting guest "
22143 "mountpoints for you:"
22147 #: ../fuse/guestmount.pod:50
22150 " guestmount $(virt-inspector --ro-fish MyGuest) /mnt\n"
22155 #: ../fuse/guestmount.pod:52
22157 "(or use --fish if you don't want it to be a read only mount). The option is "
22158 "called I<--ro-fish> or I<--fish> because these parameters are compatible "
22159 "with L<guestfish(1)>."
22163 #: ../fuse/guestmount.pod:56
22165 "If you don't know what filesystems are contained in a guest or disk image, "
22166 "use L<virt-list-filesystems(1)> first:"
22170 #: ../fuse/guestmount.pod:59
22173 " virt-list-filesystems MyGuest\n"
22178 #: ../fuse/guestmount.pod:61
22180 "If you want to trace the libguestfs calls but without excessive debugging, "
22185 #: ../fuse/guestmount.pod:64
22188 " guestmount [-a ... -m ...] --trace /mnt\n"
22193 #: ../fuse/guestmount.pod:66
22194 msgid "If you want to debug the program, we recommend:"
22198 #: ../fuse/guestmount.pod:68
22201 " guestmount [-a ... -m ...] --trace --verbose /mnt\n"
22206 #: ../fuse/guestmount.pod:76
22207 msgid "Add a block device or virtual machine image."
22211 #: ../fuse/guestmount.pod:78
22212 msgid "B<--dir-cache-timeout N>"
22216 #: ../fuse/guestmount.pod:80
22218 "Set the readdir cache timeout to I<N> seconds, the default being 60 "
22219 "seconds. The readdir cache [actually, there are several semi-independent "
22220 "caches] is populated after a readdir(2) call with the stat and extended "
22221 "attributes of the files in the directory, in anticipation that they will be "
22222 "requested soon after."
22226 #: ../fuse/guestmount.pod:86
22228 "There is also a different attribute cache implemented by FUSE (see the FUSE "
22229 "option I<-o attr_timeout>), but the FUSE cache does not anticipate future "
22230 "requests, only cache existing ones."
22234 #: ../fuse/guestmount.pod:90
22235 msgid "B<--fuse-help>"
22239 #: ../fuse/guestmount.pod:92
22240 msgid "Display help on special FUSE options (see I<-o> below)."
22244 #: ../fuse/guestmount.pod:96
22245 msgid "Display brief help and exit."
22249 #: ../fuse/guestmount.pod:98
22250 msgid "B<-m dev[:mnt]> | B<--mount dev[:mnt]>"
22254 #: ../fuse/guestmount.pod:100
22256 "Mount the named partition or logical volume on the given mountpoint B<in the "
22257 "guest> (this has nothing to do with mountpoints in the host)."
22261 #: ../fuse/guestmount.pod:103
22263 "If the mountpoint is omitted, it defaults to C</>. You have to mount "
22264 "something on C</>."
22268 #: ../fuse/guestmount.pod:108
22270 "By default, we attempt to sync the guest disk when the FUSE mountpoint is "
22271 "unmounted. If you specify this option, then we don't attempt to sync the "
22272 "disk. See the discussion of autosync in the L<guestfs(3)> manpage."
22276 #: ../fuse/guestmount.pod:113
22277 msgid "B<-o option> | B<--option option>"
22281 #: ../fuse/guestmount.pod:115
22282 msgid "Pass extra options to FUSE."
22286 #: ../fuse/guestmount.pod:117
22288 "To get a list of all the extra options supported by FUSE, use the command "
22289 "below. Note that only the FUSE I<-o> options can be passed, and only some "
22290 "of them are a good idea."
22294 #: ../fuse/guestmount.pod:121
22297 " guestmount --fuse-help\n"
22302 #: ../fuse/guestmount.pod:123
22303 msgid "Some potentially useful FUSE options:"
22307 #: ../fuse/guestmount.pod:127
22308 msgid "B<-o allow_other>"
22312 #: ../fuse/guestmount.pod:129
22313 msgid "Allow other users to see the filesystem."
22317 #: ../fuse/guestmount.pod:131
22318 msgid "B<-o attr_timeout=N>"
22322 #: ../fuse/guestmount.pod:133
22323 msgid "Enable attribute caching by FUSE, and set the timeout to I<N> seconds."
22327 #: ../fuse/guestmount.pod:135
22328 msgid "B<-o kernel_cache>"
22332 #: ../fuse/guestmount.pod:137
22334 "Allow the kernel to cache files (reduces the number of reads that have to go "
22335 "through the L<guestfs(3)> API). This is generally a good idea if you can "
22336 "afford the extra memory usage."
22340 #: ../fuse/guestmount.pod:141
22341 msgid "B<-o uid=N> B<-o gid=N>"
22345 #: ../fuse/guestmount.pod:143
22347 "Use these options to map all UIDs and GIDs inside the guest filesystem to "
22348 "the chosen values."
22352 #: ../fuse/guestmount.pod:150
22354 "Add devices and mount everything read-only. Also disallow writes and make "
22355 "the disk appear read-only to FUSE."
22359 #: ../fuse/guestmount.pod:153
22361 "This is highly recommended if you are not going to edit the guest disk. If "
22362 "the guest is running and this option is I<not> supplied, then there is a "
22363 "strong risk of disk corruption in the guest. We try to prevent this from "
22364 "happening, but it is not always possible."
22368 #: ../fuse/guestmount.pod:160
22369 msgid "Enable SELinux support for the guest."
22373 #: ../fuse/guestmount.pod:162
22378 #: ../fuse/guestmount.pod:164
22379 msgid "Trace libguestfs calls (to stderr)."
22383 #: ../fuse/guestmount.pod:166
22384 msgid "This also stops the daemon from forking into the background."
22388 #: ../fuse/guestmount.pod:170
22389 msgid "Enable verbose messages from underlying libguestfs."
22393 #: ../fuse/guestmount.pod:174
22394 msgid "Display the program version and exit."
22398 #: ../fuse/guestmount.pod:180
22400 "L<guestfish(1)>, L<virt-inspector(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
22401 "L<virt-tar(1)>, L<guestfs(3)>, L<http://libguestfs.org/>, L<http://fuse.sf."
22406 #: ../inspector/virt-inspector.pl:40
22408 "virt-inspector - Display OS version, kernel, drivers, mount points, "
22409 "applications, etc. in a virtual machine"
22413 #: ../inspector/virt-inspector.pl:44
22416 " virt-inspector [--connect URI] domname\n"
22421 #: ../inspector/virt-inspector.pl:46
22424 " virt-inspector guest.img [guest.img ...]\n"
22429 #: ../inspector/virt-inspector.pl:50
22431 "B<virt-inspector> examines a virtual machine and tries to determine the "
22432 "version of the OS, the kernel version, what drivers are installed, whether "
22433 "the virtual machine is fully virtualized (FV) or para-virtualized (PV), what "
22434 "applications are installed and more."
22438 #: ../inspector/virt-inspector.pl:55
22440 "Virt-inspector can produce output in several formats, including a readable "
22441 "text report, and XML for feeding into other programs."
22445 #: ../inspector/virt-inspector.pl:58
22447 "In the normal usage, use C<virt-inspector domname> where C<domname> is the "
22448 "libvirt domain (see: C<virsh list --all>)."
22452 #: ../inspector/virt-inspector.pl:61
22454 "You can also run virt-inspector directly on disk images from a single "
22455 "virtual machine. Use C<virt-inspector guest.img>. In rare cases a domain "
22456 "has several block devices, in which case you should list them one after "
22457 "another, with the first corresponding to the guest's C</dev/sda>, the second "
22458 "to the guest's C</dev/sdb> and so on."
22462 #: ../inspector/virt-inspector.pl:67
22464 "Virt-inspector can only inspect and report upon I<one domain at a time>. To "
22465 "inspect several virtual machines, you have to run virt-inspector several "
22466 "times (for example, from a shell script for-loop)."
22470 #: ../inspector/virt-inspector.pl:72
22472 "Because virt-inspector needs direct access to guest images, it won't "
22473 "normally work over remote libvirt connections."
22477 #: ../inspector/virt-inspector.pl:85 ../tools/virt-cat.pl:90
22478 #: ../tools/virt-df.pl:81 ../tools/virt-edit.pl:83
22479 #: ../tools/virt-list-filesystems.pl:60 ../tools/virt-list-partitions.pl:61
22480 #: ../tools/virt-ls.pl:89 ../tools/virt-make-fs.pl:163
22481 #: ../tools/virt-rescue.pl:113 ../tools/virt-tar.pl:109
22482 #: ../tools/virt-win-reg.pl:182
22483 msgid "Display brief help."
22487 #: ../inspector/virt-inspector.pl:91 ../tools/virt-cat.pl:96
22488 #: ../tools/virt-df.pl:87 ../tools/virt-edit.pl:89
22489 #: ../tools/virt-list-filesystems.pl:66 ../tools/virt-list-partitions.pl:67
22490 #: ../tools/virt-ls.pl:95 ../tools/virt-make-fs.pl:169
22491 #: ../tools/virt-rescue.pl:119 ../tools/virt-resize.pl:249
22492 #: ../tools/virt-tar.pl:115 ../tools/virt-win-reg.pl:188
22493 msgid "B<--version>"
22497 #: ../inspector/virt-inspector.pl:93 ../tools/virt-cat.pl:98
22498 #: ../tools/virt-df.pl:89 ../tools/virt-edit.pl:91
22499 #: ../tools/virt-list-filesystems.pl:68 ../tools/virt-list-partitions.pl:69
22500 #: ../tools/virt-ls.pl:97 ../tools/virt-make-fs.pl:171
22501 #: ../tools/virt-rescue.pl:121 ../tools/virt-resize.pl:251
22502 #: ../tools/virt-tar.pl:117 ../tools/virt-win-reg.pl:190
22503 msgid "Display version number and exit."
22507 #: ../inspector/virt-inspector.pl:99 ../tools/virt-cat.pl:104
22508 #: ../tools/virt-df.pl:95 ../tools/virt-edit.pl:113
22509 #: ../tools/virt-list-filesystems.pl:74 ../tools/virt-list-partitions.pl:75
22510 #: ../tools/virt-ls.pl:103 ../tools/virt-rescue.pl:135
22511 #: ../tools/virt-tar.pl:123 ../tools/virt-win-reg.pl:204
22512 msgid "B<--connect URI> | B<-c URI>"
22516 #: ../inspector/virt-inspector.pl:101 ../tools/virt-cat.pl:106
22517 #: ../tools/virt-df.pl:97 ../tools/virt-edit.pl:115
22518 #: ../tools/virt-list-filesystems.pl:76 ../tools/virt-list-partitions.pl:77
22519 #: ../tools/virt-ls.pl:105 ../tools/virt-rescue.pl:137
22520 #: ../tools/virt-tar.pl:125 ../tools/virt-win-reg.pl:206
22522 "If using libvirt, connect to the given I<URI>. If omitted, then we connect "
22523 "to the default libvirt hypervisor."
22527 #: ../inspector/virt-inspector.pl:104
22529 "Libvirt is only used if you specify a C<domname> on the command line. If "
22530 "you specify guest block devices directly, then libvirt is not used at all."
22534 #: ../inspector/virt-inspector.pl:114
22536 "The following options select the output format. Use only one of them. The "
22537 "default is a readable text report."
22541 #: ../inspector/virt-inspector.pl:119
22542 msgid "B<--text> (default)"
22546 #: ../inspector/virt-inspector.pl:121
22547 msgid "Plain text report."
22551 #: ../inspector/virt-inspector.pl:123
22556 #: ../inspector/virt-inspector.pl:125
22557 msgid "Produce no output at all."
22561 #: ../inspector/virt-inspector.pl:127
22566 #: ../inspector/virt-inspector.pl:129
22568 "If you select I<--xml> then you get XML output which can be fed to other "
22573 #: ../inspector/virt-inspector.pl:132
22578 #: ../inspector/virt-inspector.pl:134
22580 "If you select I<--yaml> then you get YAML output which can be fed to other "
22585 #: ../inspector/virt-inspector.pl:137
22590 #: ../inspector/virt-inspector.pl:139
22592 "If you select I<--perl> then you get Perl structures output which can be "
22593 "used directly in another Perl program."
22597 #: ../inspector/virt-inspector.pl:142
22602 #: ../inspector/virt-inspector.pl:144
22603 msgid "B<--ro-fish>"
22607 #: ../inspector/virt-inspector.pl:146
22609 "If you select I<--fish> then we print a L<guestfish(1)> command line which "
22610 "will automatically mount up the filesystems on the correct mount points. "
22611 "Try this for example:"
22615 #: ../inspector/virt-inspector.pl:150
22618 " guestfish $(virt-inspector --fish guest.img)\n"
22623 #: ../inspector/virt-inspector.pl:152
22625 "I<--ro-fish> is the same, but the I<--ro> option is passed to guestfish so "
22626 "that the filesystems are mounted read-only."
22630 #: ../inspector/virt-inspector.pl:155
22635 #: ../inspector/virt-inspector.pl:157
22637 "In \"query mode\" we answer common questions about the guest, such as "
22638 "whether it is fullvirt or needs a Xen hypervisor to run."
22642 #: ../inspector/virt-inspector.pl:160
22643 msgid "See section I<QUERY MODE> below."
22647 #: ../inspector/virt-inspector.pl:166
22648 msgid "B<--windows-registry>"
22652 #: ../inspector/virt-inspector.pl:168
22654 "This flag is ignored for compatibility with earlier releases of the software."
22658 #: ../inspector/virt-inspector.pl:171
22660 "In this version, if L<Win::Hivex(3)> is available, then we attempt to parse "
22661 "information out of the Registry for any Windows guest."
22665 #: ../inspector/virt-inspector.pl:218
22666 msgid "OUTPUT FORMAT"
22670 #: ../inspector/virt-inspector.pl:220
22673 " Operating system(s)\n"
22674 " -------------------\n"
22675 " Linux (distro + version)\n"
22676 " Windows (version)\n"
22679 " +--- Filesystems ---------- Installed apps --- Kernel & drivers\n"
22680 " ----------- -------------- ----------------\n"
22681 " mount point => device List of apps Extra information\n"
22682 " mount point => device and versions about kernel(s)\n"
22683 " ... and drivers\n"
22684 " swap => swap device\n"
22685 " (plus lots of extra information\n"
22686 " about each filesystem)\n"
22691 #: ../inspector/virt-inspector.pl:235
22692 msgid "The output of virt-inspector is a complex two-level data structure."
22696 #: ../inspector/virt-inspector.pl:237
22698 "At the top level is a list of the operating systems installed on the guest. "
22699 "(For the vast majority of guests, only a single OS is installed.) The data "
22700 "returned for the OS includes the name (Linux, Windows), the distribution and "
22705 #: ../inspector/virt-inspector.pl:242
22706 msgid "The diagram above shows what we return for each OS."
22710 #: ../inspector/virt-inspector.pl:244
22712 "With the I<--xml> option the output is mapped into an XML document. There "
22713 "is a RELAX-NG schema for this XML in the file I<virt-inspector.rng> which "
22714 "normally ships with virt-inspector, or can be found in the source."
22718 #: ../inspector/virt-inspector.pl:249
22720 "With the I<--fish> or I<--ro-fish> option the mount points are mapped to "
22721 "L<guestfish(1)> command line parameters, so that you can go in afterwards "
22722 "and inspect the guest with everything mounted in the right place. For "
22727 #: ../inspector/virt-inspector.pl:254
22730 " guestfish $(virt-inspector --ro-fish guest.img)\n"
22731 " ==> guestfish --ro -a guest.img -m /dev/VG/LV:/ -m /dev/sda1:/boot\n"
22736 #: ../inspector/virt-inspector.pl:589
22741 #: ../inspector/virt-inspector.pl:591
22743 "When you use C<virt-inspector --query>, the output is a series of lines of "
22748 #: ../inspector/virt-inspector.pl:594
22754 " xen_pv_drivers=no\n"
22759 #: ../inspector/virt-inspector.pl:599
22761 "(each answer is usually C<yes> or C<no>, or the line is completely missing "
22762 "if we could not determine the answer at all)."
22766 #: ../inspector/virt-inspector.pl:602
22768 "If the guest is multiboot, you can get apparently conflicting answers (eg. "
22769 "C<windows=yes> and C<linux=yes>, or a guest which is both fullvirt and has a "
22770 "Xen PV kernel). This is normal, and just means that the guest can do both "
22771 "things, although it might require operator intervention such as selecting a "
22772 "boot option when the guest is booting."
22776 #: ../inspector/virt-inspector.pl:609
22777 msgid "This section describes the full range of answers possible."
22781 #: ../inspector/virt-inspector.pl:630
22782 msgid "windows=(yes|no)"
22786 #: ../inspector/virt-inspector.pl:632
22787 msgid "Answer C<yes> if Microsoft Windows is installed in the guest."
22791 #: ../inspector/virt-inspector.pl:645
22792 msgid "linux=(yes|no)"
22796 #: ../inspector/virt-inspector.pl:647
22797 msgid "Answer C<yes> if a Linux kernel is installed in the guest."
22801 #: ../inspector/virt-inspector.pl:660
22802 msgid "rhel=(yes|no)"
22806 #: ../inspector/virt-inspector.pl:662
22807 msgid "Answer C<yes> if the guest contains Red Hat Enterprise Linux."
22811 #: ../inspector/virt-inspector.pl:676
22812 msgid "fedora=(yes|no)"
22816 #: ../inspector/virt-inspector.pl:678
22817 msgid "Answer C<yes> if the guest contains the Fedora Linux distribution."
22821 #: ../inspector/virt-inspector.pl:691
22822 msgid "debian=(yes|no)"
22826 #: ../inspector/virt-inspector.pl:693
22827 msgid "Answer C<yes> if the guest contains the Debian Linux distribution."
22831 #: ../inspector/virt-inspector.pl:706
22832 msgid "fullvirt=(yes|no)"
22836 #: ../inspector/virt-inspector.pl:708
22838 "Answer C<yes> if there is at least one operating system kernel installed in "
22839 "the guest which runs fully virtualized. Such a guest would require a "
22840 "hypervisor which supports full system virtualization."
22844 #: ../inspector/virt-inspector.pl:731
22845 msgid "xen_domU_kernel=(yes|no)"
22849 #: ../inspector/virt-inspector.pl:733
22851 "Answer C<yes> if there is at least one Linux kernel installed in the guest "
22852 "which is compiled as a Xen DomU (a Xen paravirtualized guest)."
22856 #: ../inspector/virt-inspector.pl:753
22857 msgid "xen_pv_drivers=(yes|no)"
22861 #: ../inspector/virt-inspector.pl:755
22863 "Answer C<yes> if the guest has Xen paravirtualized drivers installed "
22864 "(usually the kernel itself will be fully virtualized, but the PV drivers "
22865 "have been installed by the administrator for performance reasons)."
22869 #: ../inspector/virt-inspector.pl:777
22870 msgid "virtio_drivers=(yes|no)"
22874 #: ../inspector/virt-inspector.pl:779
22876 "Answer C<yes> if the guest has virtio paravirtualized drivers installed. "
22877 "Virtio drivers are commonly used to improve the performance of KVM."
22881 #: ../inspector/virt-inspector.pl:800
22882 msgid "userspace_arch=(x86_64|...)"
22886 #: ../inspector/virt-inspector.pl:802
22887 msgid "Print the architecture of userspace."
22891 #: ../inspector/virt-inspector.pl:804 ../inspector/virt-inspector.pl:825
22892 msgid "NB. For multi-boot VMs this can print several lines."
22896 #: ../inspector/virt-inspector.pl:821
22897 msgid "kernel_arch=(x86_64|...)"
22901 #: ../inspector/virt-inspector.pl:823
22902 msgid "Print the architecture of the kernel."
22906 #: ../inspector/virt-inspector.pl:848 ../tools/virt-df.pl:484
22908 "L<guestfs(3)>, L<guestfish(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
22909 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
22913 #: ../inspector/virt-inspector.pl:857 ../tools/virt-cat.pl:175
22914 #: ../tools/virt-df.pl:493 ../tools/virt-edit.pl:339
22915 #: ../tools/virt-list-filesystems.pl:205 ../tools/virt-list-partitions.pl:242
22916 #: ../tools/virt-ls.pl:223 ../tools/virt-make-fs.pl:554
22917 #: ../tools/virt-rescue.pl:243 ../tools/virt-resize.pl:1409
22918 #: ../tools/virt-tar.pl:270 ../tools/virt-win-reg.pl:489
22919 msgid "Richard W.M. Jones L<http://people.redhat.com/~rjones/>"
22923 #: ../inspector/virt-inspector.pl:859
22924 msgid "Matthew Booth L<mbooth@redhat.com>"
22928 #: ../inspector/virt-inspector.pl:863 ../tools/virt-cat.pl:179
22929 #: ../tools/virt-list-filesystems.pl:209 ../tools/virt-ls.pl:227
22930 #: ../tools/virt-tar.pl:274
22931 msgid "Copyright (C) 2009 Red Hat Inc."
22935 #: ../tools/virt-cat.pl:34
22936 msgid "virt-cat - Display a file in a virtual machine"
22940 #: ../tools/virt-cat.pl:38
22943 " virt-cat [--options] domname file\n"
22948 #: ../tools/virt-cat.pl:40
22951 " virt-cat [--options] disk.img [disk.img ...] file\n"
22956 #: ../tools/virt-cat.pl:44
22958 "C<virt-cat> is a command line tool to display the contents of C<file> where "
22959 "C<file> exists in the named virtual machine (or disk image)."
22963 #: ../tools/virt-cat.pl:47
22965 "C<virt-cat> can be used to quickly view a single file. To edit a file, use "
22966 "C<virt-edit>. For more complex cases you should look at the L<guestfish(1)> "
22971 #: ../tools/virt-cat.pl:53
22973 "Display C</etc/fstab> file from inside the libvirt VM called C<mydomain>:"
22977 #: ../tools/virt-cat.pl:56
22980 " virt-cat mydomain /etc/fstab\n"
22985 #: ../tools/virt-cat.pl:58
22986 msgid "List syslog messages from a VM:"
22990 #: ../tools/virt-cat.pl:60
22993 " virt-cat mydomain /var/log/messages | tail\n"
22998 #: ../tools/virt-cat.pl:62
22999 msgid "Find out what DHCP IP address a VM acquired:"
23003 #: ../tools/virt-cat.pl:64
23006 " virt-cat mydomain /var/log/messages | grep 'dhclient: bound to' | tail\n"
23011 #: ../tools/virt-cat.pl:66
23012 msgid "Find out what packages were recently installed:"
23016 #: ../tools/virt-cat.pl:68
23019 " virt-cat mydomain /var/log/yum.log | tail\n"
23024 #: ../tools/virt-cat.pl:70
23025 msgid "Find out who is logged on inside a virtual machine:"
23029 #: ../tools/virt-cat.pl:72
23032 " virt-cat mydomain /var/run/utmp > /tmp/utmp\n"
23038 #: ../tools/virt-cat.pl:75
23039 msgid "or who was logged on:"
23043 #: ../tools/virt-cat.pl:77
23046 " virt-cat mydomain /var/log/wtmp > /tmp/wtmp\n"
23047 " last -f /tmp/wtmp\n"
23052 #: ../tools/virt-cat.pl:109 ../tools/virt-df.pl:100 ../tools/virt-edit.pl:118
23053 #: ../tools/virt-list-filesystems.pl:79 ../tools/virt-list-partitions.pl:80
23054 #: ../tools/virt-ls.pl:108 ../tools/virt-rescue.pl:140
23055 #: ../tools/virt-tar.pl:128 ../tools/virt-win-reg.pl:209
23057 "If you specify guest block devices directly, then libvirt is not used at all."
23061 #: ../tools/virt-cat.pl:165
23063 "L<guestfs(3)>, L<guestfish(1)>, L<virt-edit(1)>, L<Sys::Guestfs(3)>, L<Sys::"
23064 "Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
23068 #: ../tools/virt-cat.pl:173 ../tools/virt-df.pl:491 ../tools/virt-edit.pl:337
23069 #: ../tools/virt-list-filesystems.pl:203 ../tools/virt-list-partitions.pl:240
23070 #: ../tools/virt-ls.pl:221 ../tools/virt-make-fs.pl:552
23071 #: ../tools/virt-rescue.pl:241 ../tools/virt-resize.pl:1407
23072 #: ../tools/virt-tar.pl:268 ../tools/virt-win-reg.pl:487
23077 #: ../tools/virt-df.pl:36
23078 msgid "virt-df - Display free space on virtual filesystems"
23082 #: ../tools/virt-df.pl:40
23085 " virt-df [--options]\n"
23090 #: ../tools/virt-df.pl:42
23093 " virt-df [--options] domname\n"
23098 #: ../tools/virt-df.pl:44
23101 " virt-df [--options] disk.img [disk.img ...]\n"
23106 #: ../tools/virt-df.pl:48
23108 "C<virt-df> is a command line tool to display free space on virtual machine "
23109 "filesystems. Unlike other tools, it doesn't just display the amount of "
23110 "space allocated to a virtual machine, but can look inside the virtual "
23111 "machine to see how much space is really being used."
23115 #: ../tools/virt-df.pl:53
23117 "It is like the L<df(1)> command, but for virtual machines, except that it "
23118 "also works for Windows virtual machines."
23122 #: ../tools/virt-df.pl:56
23124 "If used without any arguments, C<virt-df> checks with libvirt to get a list "
23125 "of all active and inactive guests, and performs a C<df>-type operation on "
23126 "each one in turn, printing out the results."
23130 #: ../tools/virt-df.pl:60
23132 "If used with any argument(s), C<virt-df> performs a C<df>-type operation on "
23133 "either the single named libvirt domain, or on the disk image(s) listed on "
23134 "the command line (which must all belong to a single VM). In this mode (with "
23135 "arguments), C<virt-df> will I<only work for a single guest>. If you want to "
23136 "run on multiple guests, then you have to invoke C<virt-df> multiple times."
23140 #: ../tools/virt-df.pl:67
23142 "Use the C<--csv> option to get a format which can be easily parsed by other "
23143 "programs. Other options are mostly similar to standard C<df> options. See "
23144 "below for the complete list."
23148 #: ../tools/virt-df.pl:107
23153 #: ../tools/virt-df.pl:109
23155 "Write out the results in CSV format (comma-separated values). This format "
23156 "can be imported easily into databases and spreadsheets, but read L</NOTE "
23157 "ABOUT CSV FORMAT> below."
23161 #: ../tools/virt-df.pl:117
23162 msgid "B<--human-readable> | B<-h>"
23166 #: ../tools/virt-df.pl:119
23167 msgid "Print sizes in human-readable format."
23171 #: ../tools/virt-df.pl:121
23172 msgid "You are not allowed to use I<-h> and I<--csv> at the same time."
23176 #: ../tools/virt-df.pl:127
23177 msgid "B<--inodes> | B<-i>"
23181 #: ../tools/virt-df.pl:129
23182 msgid "Print inodes instead of blocks."
23186 #: ../tools/virt-df.pl:458
23187 msgid "NOTE ABOUT CSV FORMAT"
23191 #: ../tools/virt-df.pl:460
23193 "Comma-separated values (CSV) is a deceptive format. It I<seems> like it "
23194 "should be easy to parse, but it is definitely not easy to parse."
23198 #: ../tools/virt-df.pl:463
23200 "Myth: Just split fields at commas. Reality: This does I<not> work "
23201 "reliably. This example has two columns:"
23205 #: ../tools/virt-df.pl:466
23208 " \"foo,bar\",baz\n"
23213 #: ../tools/virt-df.pl:468
23215 "Myth: Read the file one line at a time. Reality: This does I<not> work "
23216 "reliably. This example has one row:"
23220 #: ../tools/virt-df.pl:471
23229 #: ../tools/virt-df.pl:474
23231 "For shell scripts, use C<csvtool> (L<http://merjis.com/developers/csv> also "
23232 "packaged in major Linux distributions)."
23236 #: ../tools/virt-df.pl:477
23238 "For other languages, use a CSV processing library (eg. C<Text::CSV> for Perl "
23239 "or Python's built-in csv library)."
23243 #: ../tools/virt-df.pl:480
23244 msgid "Most spreadsheets and databases can import CSV directly."
23248 #: ../tools/virt-df.pl:497 ../tools/virt-edit.pl:343
23249 #: ../tools/virt-list-partitions.pl:246 ../tools/virt-rescue.pl:247
23250 msgid "Copyright (C) 2009-2010 Red Hat Inc."
23254 #: ../tools/virt-edit.pl:35
23255 msgid "virt-edit - Edit a file in a virtual machine"
23259 #: ../tools/virt-edit.pl:39
23262 " virt-edit [--options] domname file\n"
23267 #: ../tools/virt-edit.pl:41
23270 " virt-edit [--options] disk.img [disk.img ...] file\n"
23275 #: ../tools/virt-edit.pl:43
23278 " virt-edit [domname|disk.img] file -e 'expr'\n"
23283 #: ../tools/virt-edit.pl:47
23285 "You must I<not> use C<virt-edit> on live virtual machines. If you do this, "
23286 "you risk disk corruption in the VM. C<virt-edit> tries to stop you from "
23287 "doing this, but doesn't catch all cases."
23291 #: ../tools/virt-edit.pl:53
23293 "C<virt-edit> is a command line tool to edit C<file> where C<file> exists in "
23294 "the named virtual machine (or disk image)."
23298 #: ../tools/virt-edit.pl:56
23300 "If you want to just view a file, use L<virt-cat(1)>. For more complex cases "
23301 "you should look at the L<guestfish(1)> tool."
23305 #: ../tools/virt-edit.pl:61
23306 msgid "Edit the named files interactively:"
23310 #: ../tools/virt-edit.pl:63
23313 " virt-edit mydomain /boot/grub/grub.conf\n"
23318 #: ../tools/virt-edit.pl:65
23321 " virt-edit mydomain /etc/passwd\n"
23326 #: ../tools/virt-edit.pl:67
23328 "You can also edit files non-interactively (see L</NON-INTERACTIVE EDITING> "
23329 "below). To change the init default level to 5:"
23333 #: ../tools/virt-edit.pl:71
23336 " virt-edit mydomain /etc/inittab -e 's/^id:.*/id:5:initdefault:/'\n"
23341 #: ../tools/virt-edit.pl:97
23342 msgid "B<--backup extension> | B<-b extension>"
23346 #: ../tools/virt-edit.pl:99
23348 "Create a backup of the original file I<in the guest disk image>. The backup "
23349 "has the original filename with C<extension> added."
23353 #: ../tools/virt-edit.pl:102
23355 "Usually the first character of C<extension> would be a dot C<.> so you would "
23360 #: ../tools/virt-edit.pl:105
23363 " virt-edit -b .orig [etc]\n"
23368 #: ../tools/virt-edit.pl:107
23369 msgid "By default, no backup file is made."
23373 #: ../tools/virt-edit.pl:125
23374 msgid "B<--expr EXPR> | B<-e EXPR>"
23378 #: ../tools/virt-edit.pl:127
23380 "Instead of launching the external editor, non-interactively apply the Perl "
23381 "expression C<EXPR> to each line in the file. See L</NON-INTERACTIVE "
23386 #: ../tools/virt-edit.pl:131
23388 "Be careful to properly quote the expression to prevent it from being altered "
23393 #: ../tools/virt-edit.pl:250
23394 msgid "NON-INTERACTIVE EDITING"
23398 #: ../tools/virt-edit.pl:252
23400 "C<virt-edit> normally calls out to C<$EDITOR> (or vi) so the system "
23401 "administrator can interactively edit the file."
23405 #: ../tools/virt-edit.pl:255
23407 "There are two ways also to use C<virt-edit> from scripts in order to make "
23408 "automated edits to files. (Note that although you I<can> use C<virt-edit> "
23409 "like this, it's less error-prone to write scripts directly using the "
23410 "libguestfs API and Augeas for configuration file editing.)"
23414 #: ../tools/virt-edit.pl:261
23416 "The first method is to temporarily set C<$EDITOR> to any script or program "
23417 "you want to run. The script is invoked as C<$EDITOR tmpfile> and it should "
23418 "update C<tmpfile> in place however it likes."
23422 #: ../tools/virt-edit.pl:265
23424 "The second method is to use the C<-e> parameter of C<virt-edit> to run a "
23425 "short Perl snippet in the style of L<sed(1)>. For example to replace all "
23426 "instances of C<foo> with C<bar> in a file:"
23430 #: ../tools/virt-edit.pl:269
23433 " virt-edit domname filename -e 's/foo/bar/'\n"
23438 #: ../tools/virt-edit.pl:271
23440 "The full power of Perl regular expressions can be used (see L<perlre(1)>). "
23441 "For example to delete root's password you could do:"
23445 #: ../tools/virt-edit.pl:274
23448 " virt-edit domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
23453 #: ../tools/virt-edit.pl:276
23455 "What really happens is that the snippet is evaluated as a Perl expression "
23456 "for each line of the file. The line, including the final C<\\n>, is passed "
23457 "in C<$_> and the expression should update C<$_> or leave it unchanged."
23461 #: ../tools/virt-edit.pl:281
23463 "To delete a line, set C<$_> to the empty string. For example, to delete the "
23464 "C<apache> user account from the password file you can do:"
23468 #: ../tools/virt-edit.pl:284
23471 " virt-edit mydomain /etc/passwd -e '$_ = \"\" if /^apache:/'\n"
23476 #: ../tools/virt-edit.pl:286
23478 "To insert a line, prepend or append it to C<$_>. However appending lines to "
23479 "the end of the file is rather difficult this way since there is no concept "
23480 "of \"last line of the file\" - your expression just doesn't get called "
23481 "again. You might want to use the first method (setting C<$EDITOR>) if you "
23486 #: ../tools/virt-edit.pl:292
23488 "The variable C<$lineno> contains the current line number. As is "
23489 "traditional, the first line in the file is number C<1>."
23493 #: ../tools/virt-edit.pl:295
23495 "The return value from the expression is ignored, but the expression may call "
23496 "C<die> in order to abort the whole program, leaving the original file "
23501 #: ../tools/virt-edit.pl:299
23503 "Remember when matching the end of a line that C<$_> may contain the final C<"
23504 "\\n>, or (for DOS files) C<\\r\\n>, or if the file does not end with a "
23505 "newline then neither of these. Thus to match or substitute some text at the "
23506 "end of a line, use this regular expression:"
23510 #: ../tools/virt-edit.pl:304
23513 " /some text(\\r?\\n)?$/\n"
23518 #: ../tools/virt-edit.pl:306
23520 "Alternately, use the perl C<chomp> function, being careful not to chomp C<"
23521 "$_> itself (since that would remove all newlines from the file):"
23525 #: ../tools/virt-edit.pl:310
23528 " my $m = $_; chomp $m; $m =~ /some text$/\n"
23533 #: ../tools/virt-edit.pl:316
23538 #: ../tools/virt-edit.pl:318
23540 "If set, this string is used as the editor. It may contain arguments, eg. C<"
23545 #: ../tools/virt-edit.pl:321
23546 msgid "If not set, C<vi> is used."
23550 #: ../tools/virt-edit.pl:327
23552 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, L<Sys::"
23553 "Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>, L<perl(1)>, "
23558 #: ../tools/virt-list-filesystems.pl:32
23560 "virt-list-filesystems - List filesystems in a virtual machine or disk image"
23564 #: ../tools/virt-list-filesystems.pl:36
23567 " virt-list-filesystems [--options] domname\n"
23572 #: ../tools/virt-list-filesystems.pl:38
23575 " virt-list-filesystems [--options] disk.img [disk.img ...]\n"
23580 #: ../tools/virt-list-filesystems.pl:42
23582 "C<virt-list-filesystems> is a command line tool to list the filesystems that "
23583 "are contained in a virtual machine or disk image."
23587 #: ../tools/virt-list-filesystems.pl:46
23589 "C<virt-list-filesystems> is just a simple wrapper around L<libguestfs(3)> "
23590 "functionality. For more complex cases you should look at the L<guestfish(1)"
23595 #: ../tools/virt-list-filesystems.pl:86 ../tools/virt-list-partitions.pl:95
23596 #: ../tools/virt-ls.pl:115
23597 msgid "B<-l> | B<--long>"
23601 #: ../tools/virt-list-filesystems.pl:88
23603 "With this option, C<virt-list-filesystems> displays the type of each "
23604 "filesystem too (where \"type\" means C<ext3>, C<xfs> etc.)"
23608 #: ../tools/virt-list-filesystems.pl:95
23609 msgid "B<-a> | B<--all>"
23613 #: ../tools/virt-list-filesystems.pl:97
23615 "Normally we only show mountable filesystems. If this option is given then "
23616 "swap devices are shown too."
23620 #: ../tools/virt-list-filesystems.pl:193
23622 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, L<virt-list-"
23623 "partitions(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)"
23624 ">, L<http://libguestfs.org/>."
23628 #: ../tools/virt-list-partitions.pl:32
23630 "virt-list-partitions - List partitions in a virtual machine or disk image"
23634 #: ../tools/virt-list-partitions.pl:36
23637 " virt-list-partitions [--options] domname\n"
23642 #: ../tools/virt-list-partitions.pl:38
23645 " virt-list-partitions [--options] disk.img [disk.img ...]\n"
23650 #: ../tools/virt-list-partitions.pl:42
23652 "C<virt-list-partitions> is a command line tool to list the partitions that "
23653 "are contained in a virtual machine or disk image. It is mainly useful as a "
23654 "first step to using L<virt-resize(1)>."
23658 #: ../tools/virt-list-partitions.pl:47
23660 "C<virt-list-partitions> is just a simple wrapper around L<libguestfs(3)> "
23661 "functionality. For more complex cases you should look at the L<guestfish(1)"
23666 #: ../tools/virt-list-partitions.pl:87
23667 msgid "B<-h> | B<--human-readable>"
23671 #: ../tools/virt-list-partitions.pl:89
23672 msgid "Show sizes in human-readable form (eg. \"1G\")."
23676 #: ../tools/virt-list-partitions.pl:97
23678 "With this option, C<virt-list-partitions> displays the type and size of each "
23679 "partition too (where \"type\" means C<ext3>, C<pv> etc.)"
23683 #: ../tools/virt-list-partitions.pl:104
23684 msgid "B<-t> | B<--total>"
23688 #: ../tools/virt-list-partitions.pl:106
23690 "Display the total size of each block device (as a separate row or rows)."
23694 #: ../tools/virt-list-partitions.pl:231
23696 "L<guestfs(3)>, L<guestfish(1)>, L<virt-list-filesystems(1)>, L<virt-resize(1)"
23697 ">, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://"
23698 "libguestfs.org/>."
23702 #: ../tools/virt-ls.pl:35
23703 msgid "virt-ls - List files in a virtual machine"
23707 #: ../tools/virt-ls.pl:39
23710 " virt-ls [--options] domname directory\n"
23715 #: ../tools/virt-ls.pl:41
23718 " virt-ls [--options] disk.img [disk.img ...] directory\n"
23723 #: ../tools/virt-ls.pl:45
23725 "C<virt-ls> is a command line tool to list the names of files in a directory "
23726 "inside a virtual machine or disk image."
23730 #: ../tools/virt-ls.pl:48
23732 "C<virt-ls> is just a simple wrapper around L<libguestfs(3)> functionality. "
23733 "For more complex cases you should look at the L<guestfish(1)> tool."
23737 #: ../tools/virt-ls.pl:52
23739 "C<virt-ls> can be used in one of three modes: simple, long and recursive. A "
23740 "simple listing is like the ordinary L<ls(1)> command:"
23744 #: ../tools/virt-ls.pl:55
23747 " $ virt-ls myguest /\n"
23755 #: ../tools/virt-ls.pl:60
23756 msgid "With the C<-l> (C<--long>) option, C<virt-ls> shows more detail:"
23760 #: ../tools/virt-ls.pl:62
23763 " $ virt-ls -l myguest /\n"
23765 " dr-xr-xr-x. 2 root root 4096 2009-08-25 19:06 bin\n"
23766 " dr-xr-xr-x. 5 root root 3072 2009-08-25 19:06 boot\n"
23772 #: ../tools/virt-ls.pl:68
23774 "With the C<-R> (C<--recursive>) option, C<virt-ls> lists the names of files "
23775 "and directories recursively:"
23779 #: ../tools/virt-ls.pl:71
23782 " $ virt-ls -R myguest /tmp\n"
23790 #: ../tools/virt-ls.pl:76
23792 "You I<cannot> combine these options. To do more complicated things, use "
23797 #: ../tools/virt-ls.pl:117
23798 msgid "B<-R> | B<--recursive>"
23802 #: ../tools/virt-ls.pl:119
23804 "Select the mode. With neither of these options, C<virt-ls> produces a "
23805 "simple, flat list of the files in the named directory."
23809 #: ../tools/virt-ls.pl:122
23811 "C<virt-ls -l> produces a \"long listing\", which shows more detail (just "
23812 "like the plain C<ls -l> command)."
23816 #: ../tools/virt-ls.pl:125
23818 "C<virt-ls -R> produces a recursive list of files starting at the named "
23819 "directory. See the documentation for the C<guestfs_find> command L<guestfs"
23820 "(3)> for precise details."
23824 #: ../tools/virt-ls.pl:129
23825 msgid "You cannot combine these options."
23829 #: ../tools/virt-ls.pl:212
23831 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, L<Sys::"
23832 "Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs."
23837 #: ../tools/virt-make-fs.pl:37
23838 msgid "virt-make-fs - Make a filesystem from a tar archive or files"
23842 #: ../tools/virt-make-fs.pl:41
23845 " virt-make-fs [--options] input.tar output.img\n"
23850 #: ../tools/virt-make-fs.pl:43
23853 " virt-make-fs [--options] input.tar.gz output.img\n"
23858 #: ../tools/virt-make-fs.pl:45
23861 " virt-make-fs [--options] directory output.img\n"
23866 #: ../tools/virt-make-fs.pl:49
23868 "Virt-make-fs is a command line tool for creating a filesystem from a tar "
23869 "archive or some files in a directory. It is similar to tools like L<mkisofs"
23870 "(1)>, L<genisoimage(1)> and L<mksquashfs(1)>. Unlike those tools, it can "
23871 "create common filesystem types like ext2/3 or NTFS, which can be useful if "
23872 "you want to attach these filesystems to existing virtual machines (eg. to "
23873 "import large amounts of read-only data to a VM)."
23877 #: ../tools/virt-make-fs.pl:57
23878 msgid "Basic usage is:"
23882 #: ../tools/virt-make-fs.pl:59
23885 " virt-make-fs input output\n"
23890 #: ../tools/virt-make-fs.pl:61
23892 "where C<input> is either a directory containing files that you want to add, "
23893 "or a tar archive (either uncompressed tar or gzip-compressed tar); and "
23894 "C<output> is a disk image. The input type is detected automatically. The "
23895 "output disk image defaults to a raw ext2 image unless you specify extra "
23896 "flags (see L</OPTIONS> below)."
23900 #: ../tools/virt-make-fs.pl:67
23901 msgid "EXTRA SPACE"
23905 #: ../tools/virt-make-fs.pl:69
23907 "Unlike formats such as tar and squashfs, a filesystem does not \"just fit\" "
23908 "the files that it contains, but might have extra space. Depending on how "
23909 "you are going to use the output, you might think this extra space is wasted "
23910 "and want to minimize it, or you might want to leave space so that more files "
23911 "can be added later. Virt-make-fs defaults to minimizing the extra space, "
23912 "but you can use the C<--size> flag to leave space in the filesystem if you "
23917 #: ../tools/virt-make-fs.pl:77
23919 "An alternative way to leave extra space but not make the output image any "
23920 "bigger is to use an alternative disk image format (instead of the default "
23921 "\"raw\" format). Using C<--format=qcow2> will use the native QEmu/KVM qcow2 "
23922 "image format (check your hypervisor supports this before using it). This "
23923 "allows you to choose a large C<--size> but the extra space won't actually be "
23924 "allocated in the image until you try to store something in it."
23928 #: ../tools/virt-make-fs.pl:85
23930 "Don't forget that you can also use local commands including L<resize2fs(8)> "
23931 "and L<virt-resize(1)> to resize existing filesystems, or rerun virt-make-"
23932 "resize to build another image from scratch."
23936 #: ../tools/virt-make-fs.pl:89 ../tools/virt-make-fs.pl:123
23937 #: ../tools/virt-make-fs.pl:142
23942 #: ../tools/virt-make-fs.pl:91
23945 " virt-make-fs --format=qcow2 --size=+200M input output.img\n"
23950 #: ../tools/virt-make-fs.pl:93
23951 msgid "FILESYSTEM TYPE"
23955 #: ../tools/virt-make-fs.pl:95
23957 "The default filesystem type is C<ext2>. Just about any filesystem type that "
23958 "libguestfs supports can be used (but I<not> read-only formats like "
23959 "ISO9660). Here are some of the more common choices:"
23963 #: ../tools/virt-make-fs.pl:101
23968 #: ../tools/virt-make-fs.pl:103
23970 "Note that ext3 filesystems contain a journal, typically 1-32 MB in size. If "
23971 "you are not going to use the filesystem in a way that requires the journal, "
23972 "then this is just wasted overhead."
23976 #: ../tools/virt-make-fs.pl:107
23977 msgid "I<ntfs> or I<vfat>"
23981 #: ../tools/virt-make-fs.pl:109
23982 msgid "Useful if exporting data to a Windows guest."
23986 #: ../tools/virt-make-fs.pl:111
23988 "I<Note for vfat>: The tar archive or local directory must only contain files "
23989 "which are owned by root (ie. UID:GID = 0:0). The reason is that the tar "
23990 "program running within libguestfs is unable to change the ownership of non-"
23991 "root files, since vfat itself does not support this."
23995 #: ../tools/virt-make-fs.pl:116
24000 #: ../tools/virt-make-fs.pl:118
24002 "Lower overhead than C<ext2>, but certain limitations on filename length and "
24003 "total filesystem size."
24007 #: ../tools/virt-make-fs.pl:125
24010 " virt-make-fs --type=minix input minixfs.img\n"
24015 #: ../tools/virt-make-fs.pl:127
24016 msgid "TO PARTITION OR NOT TO PARTITION"
24020 #: ../tools/virt-make-fs.pl:129
24021 msgid "Optionally virt-make-fs can add a partition table to the output disk."
24025 #: ../tools/virt-make-fs.pl:131
24027 "Adding a partition can make the disk image more compatible with certain "
24028 "virtualized operating systems which don't expect to see a filesystem "
24029 "directly located on a block device (Linux doesn't care and will happily "
24030 "handle both types)."
24034 #: ../tools/virt-make-fs.pl:136
24036 "On the other hand, if you have a partition table then the output image is no "
24037 "longer a straight filesystem. For example you cannot run L<fsck(8)> "
24038 "directly on a partitioned disk image. (However libguestfs tools such as "
24039 "L<guestfish(1)> and L<virt-resize(1)> can still be used)."
24043 #: ../tools/virt-make-fs.pl:144
24044 msgid "Add an MBR partition:"
24048 #: ../tools/virt-make-fs.pl:146
24051 " virt-make-fs --partition -- input disk.img\n"
24056 #: ../tools/virt-make-fs.pl:148
24058 "If the output disk image could be terabyte-sized or larger, it's better to "
24059 "use an EFI/GPT-compatible partition table:"
24063 #: ../tools/virt-make-fs.pl:151
24066 " virt-make-fs --partition=gpt --size=+4T --format=qcow2 input disk.img\n"
24071 #: ../tools/virt-make-fs.pl:177 ../tools/virt-win-reg.pl:196
24076 #: ../tools/virt-make-fs.pl:179
24077 msgid "Enable debugging information."
24081 #: ../tools/virt-make-fs.pl:185
24082 msgid "B<--size=E<lt>NE<gt>>"
24086 #: ../tools/virt-make-fs.pl:187
24087 msgid "B<--size=+E<lt>NE<gt>>"
24091 #: ../tools/virt-make-fs.pl:189
24092 msgid "B<-s E<lt>NE<gt>>"
24096 #: ../tools/virt-make-fs.pl:191
24097 msgid "B<-s +E<lt>NE<gt>>"
24101 #: ../tools/virt-make-fs.pl:193
24103 "Use the C<--size> (or C<-s>) option to choose the size of the output image."
24107 #: ../tools/virt-make-fs.pl:196
24109 "If this option is I<not> given, then the output image will be just large "
24110 "enough to contain all the files, with not much wasted space."
24114 #: ../tools/virt-make-fs.pl:199
24116 "To choose a fixed size output disk, specify an absolute number followed by b/"
24117 "K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
24118 "Petabytes or Exabytes. This must be large enough to contain all the input "
24119 "files, else you will get an error."
24123 #: ../tools/virt-make-fs.pl:204
24125 "To leave extra space, specify C<+> (plus sign) and a number followed by b/K/"
24126 "M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
24127 "Petabytes or Exabytes. For example: C<--size=+200M> means enough space for "
24128 "the input files, and (approximately) an extra 200 MB free space."
24132 #: ../tools/virt-make-fs.pl:210
24134 "Note that virt-make-fs estimates free space, and therefore will not produce "
24135 "filesystems containing precisely the free space requested. (It is much more "
24136 "expensive and time-consuming to produce a filesystem which has precisely the "
24137 "desired free space)."
24141 #: ../tools/virt-make-fs.pl:219
24142 msgid "B<--format=E<lt>fmtE<gt>>"
24146 #: ../tools/virt-make-fs.pl:221
24147 msgid "B<-F E<lt>fmtE<gt>>"
24151 #: ../tools/virt-make-fs.pl:223
24152 msgid "Choose the output disk image format."
24156 #: ../tools/virt-make-fs.pl:225
24157 msgid "The default is C<raw> (raw disk image)."
24161 #: ../tools/virt-make-fs.pl:227
24163 "For other choices, see the L<qemu-img(1)> manpage. The only other choice "
24164 "that would really make sense here is C<qcow2>."
24168 #: ../tools/virt-make-fs.pl:234
24169 msgid "B<--type=E<lt>fsE<gt>>"
24173 #: ../tools/virt-make-fs.pl:236
24174 msgid "B<-t E<lt>fsE<gt>>"
24178 #: ../tools/virt-make-fs.pl:238
24179 msgid "Choose the output filesystem type."
24183 #: ../tools/virt-make-fs.pl:240
24184 msgid "The default is C<ext2>."
24188 #: ../tools/virt-make-fs.pl:242
24190 "Any filesystem which is supported read-write by libguestfs can be used here."
24194 #: ../tools/virt-make-fs.pl:249
24195 msgid "B<--partition>"
24199 #: ../tools/virt-make-fs.pl:251
24200 msgid "B<--partition=E<lt>parttypeE<gt>>"
24204 #: ../tools/virt-make-fs.pl:253
24206 "If specified, this flag adds an MBR partition table to the output disk image."
24210 #: ../tools/virt-make-fs.pl:256
24212 "You can change the partition table type, eg. C<--partition=gpt> for large "
24217 #: ../tools/virt-make-fs.pl:259
24219 "Note that if you just use a lonesome C<--partition>, the Perl option parser "
24220 "might consider the next parameter to be the partition type. For example:"
24224 #: ../tools/virt-make-fs.pl:263
24227 " virt-make-fs --partition input.tar ...\n"
24232 #: ../tools/virt-make-fs.pl:265
24234 "would cause virt-make-fs to think you wanted to use a partition type of "
24235 "C<input.tar> which is completely wrong. To avoid this, use C<--> (a double "
24236 "dash) between options and the input file argument:"
24240 #: ../tools/virt-make-fs.pl:269
24243 " virt-make-fs --partition -- input.tar ...\n"
24248 #: ../tools/virt-make-fs.pl:529
24250 "L<guestfish(1)>, L<virt-resize(1)>, L<virt-tar(1)>, L<mkisofs(1)>, "
24251 "L<genisoimage(1)>, L<mksquashfs(1)>, L<mke2fs(8)>, L<resize2fs(8)>, L<guestfs"
24252 "(3)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
24256 #: ../tools/virt-make-fs.pl:543 ../tools/virt-win-reg.pl:478
24258 "When reporting bugs, please enable debugging and capture the I<complete> "
24263 #: ../tools/virt-make-fs.pl:546
24266 " export LIBGUESTFS_DEBUG=1\n"
24267 " virt-make-fs --debug [...] > /tmp/virt-make-fs.log 2>&1\n"
24272 #: ../tools/virt-make-fs.pl:549
24274 "Attach /tmp/virt-make-fs.log to a new bug report at L<https://bugzilla."
24279 #: ../tools/virt-make-fs.pl:558 ../tools/virt-resize.pl:1413
24280 #: ../tools/virt-win-reg.pl:493
24281 msgid "Copyright (C) 2010 Red Hat Inc."
24285 #: ../tools/virt-rescue.pl:33
24286 msgid "virt-rescue - Run a rescue shell on a virtual machine"
24290 #: ../tools/virt-rescue.pl:37
24293 " virt-rescue [--options] domname\n"
24298 #: ../tools/virt-rescue.pl:39
24301 " virt-rescue [--options] disk.img [disk.img ...]\n"
24306 #: ../tools/virt-rescue.pl:43
24308 "You must I<not> use C<virt-rescue> on live virtual machines. Doing so will "
24309 "probably result in disk corruption in the VM. C<virt-rescue> tries to stop "
24310 "you from doing this, but doesn't catch all cases."
24314 #: ../tools/virt-rescue.pl:47
24316 "However if you use the I<--ro> (read only) option, then you can attach a "
24317 "shell to a live virtual machine. The results might be strange or "
24318 "inconsistent at times but you won't get disk corruption."
24322 #: ../tools/virt-rescue.pl:53
24324 "virt-rescue is like a Rescue CD, but for virtual machines, and without the "
24325 "need for a CD. virt-rescue gives you a rescue shell and some simple "
24326 "recovery tools which you can use to examine or rescue a virtual machine or "
24331 #: ../tools/virt-rescue.pl:58
24333 "You can run virt-rescue on any virtual machine known to libvirt, or directly "
24334 "on disk image(s):"
24338 #: ../tools/virt-rescue.pl:61
24341 " virt-rescue GuestName\n"
24346 #: ../tools/virt-rescue.pl:63
24349 " virt-rescue --ro /path/to/disk.img\n"
24354 #: ../tools/virt-rescue.pl:65
24357 " virt-rescue /dev/sdc\n"
24362 #: ../tools/virt-rescue.pl:67
24363 msgid "For live VMs you I<must> use the --ro option."
24367 #: ../tools/virt-rescue.pl:69
24369 "When you run virt-rescue on a virtual machine or disk image, you are placed "
24370 "in an interactive bash shell where you can use many ordinary Linux "
24371 "commands. What you see in C</> (C</bin>, C</lib> etc) is the rescue "
24372 "appliance. You must mount the virtual machine's filesystems by hand. There "
24373 "is an empty directory called C</sysroot> where you can mount filesystems."
24377 #: ../tools/virt-rescue.pl:76
24379 "In the example below, we list logical volumes, then choose one to mount "
24380 "under C</sysroot>:"
24384 #: ../tools/virt-rescue.pl:79
24388 " LV VG Attr LSize Origin Snap% Move Log Copy% Convert\n"
24389 " lv_root vg_f11x64 -wi-a- 8.83G\n"
24390 " lv_swap vg_f11x64 -wi-a- 992.00M\n"
24391 " ><rescue> mount /dev/vg_f11x64/lv_root /sysroot\n"
24392 " ><rescue> ls /sysroot\n"
24397 #: ../tools/virt-rescue.pl:86
24399 "If you don't know what filesystems are available on the virtual machine then "
24400 "you can use commands such as L<parted(8)> and L<lvs(8)> to find out."
24404 #: ../tools/virt-rescue.pl:90 ../tools/virt-resize.pl:1350
24409 #: ../tools/virt-rescue.pl:92
24411 "Virt-rescue can be used on I<any> disk image file or device, not just a "
24412 "virtual machine. For example you can use it on a blank file if you want to "
24413 "partition that file (although we would recommend using L<guestfish(1)> "
24414 "instead as it is more suitable for this purpose). You can even use virt-"
24415 "rescue on things like SD cards."
24419 #: ../tools/virt-rescue.pl:98
24421 "This tool is just designed for quick interactive hacking on a virtual "
24422 "machine. For more structured access to a virtual machine disk image, you "
24423 "should use L<guestfs(3)>. To get a structured shell that you can use to "
24424 "make scripted changes to guests, use L<guestfish(1)>."
24428 #: ../tools/virt-rescue.pl:127
24429 msgid "B<--append kernelopts>"
24433 #: ../tools/virt-rescue.pl:129
24434 msgid "Pass additional options to the rescue kernel."
24438 #: ../tools/virt-rescue.pl:147
24439 msgid "B<--memsize MB> | B<-m MB>"
24443 #: ../tools/virt-rescue.pl:149
24445 "Change the amount of memory allocated to the rescue system. The default is "
24446 "set by libguestfs and is small but adequate for running system tools. The "
24447 "occasional program might need more memory. The parameter is specified in "
24452 #: ../tools/virt-rescue.pl:158
24453 msgid "B<--ro> | B<-r>"
24457 #: ../tools/virt-rescue.pl:160
24458 msgid "Open the image read-only."
24462 #: ../tools/virt-rescue.pl:172
24464 "Enable SELinux in the rescue appliance. You should read L<guestfs(3)/"
24465 "SELINUX> before using this option."
24469 #: ../tools/virt-rescue.pl:228
24471 "Several environment variables affect virt-rescue. See L<guestfs(3)/"
24472 "ENVIRONMENT VARIABLES> for the complete list."
24476 #: ../tools/virt-rescue.pl:233
24478 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, L<Sys::"
24479 "Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
24483 #: ../tools/virt-resize.pl:42
24484 msgid "virt-resize - Resize a virtual machine disk"
24488 #: ../tools/virt-resize.pl:46
24491 " virt-resize [--resize /dev/sdaN=[+/-]<size>[%]]\n"
24492 " [--expand /dev/sdaN] [--shrink /dev/sdaN]\n"
24493 " [--ignore /dev/sdaN] [--delete /dev/sdaN] [...] indisk outdisk\n"
24498 #: ../tools/virt-resize.pl:52
24500 "Virt-resize is a tool which can resize a virtual machine disk, making it "
24501 "larger or smaller overall, and resizing or deleting any partitions contained "
24506 #: ../tools/virt-resize.pl:56
24508 "Virt-resize B<cannot> resize disk images in-place. Virt-resize B<should "
24509 "not> be used on live virtual machines - for consistent results, shut the "
24510 "virtual machine down before resizing it."
24514 #: ../tools/virt-resize.pl:60
24516 "If you are not familiar with the associated tools: L<virt-list-partitions(1)"
24517 ">, L<virt-list-filesystems(1)> and L<virt-df(1)>, we recommend you go and "
24518 "read those manual pages first."
24522 #: ../tools/virt-resize.pl:68
24524 "Copy C<olddisk> to C<newdisk>, extending one of the guest's partitions to "
24525 "fill the extra 5GB of space."
24529 #: ../tools/virt-resize.pl:71
24532 " truncate -r olddisk newdisk; truncate -s +5G newdisk\n"
24533 " virt-list-partitions -lht olddisk\n"
24534 " # Note \"/dev/sda2\" is a partition inside the \"olddisk\" file.\n"
24535 " virt-resize --expand /dev/sda2 olddisk newdisk\n"
24540 #: ../tools/virt-resize.pl:76
24542 "As above, but make the /boot partition 200MB bigger, while giving the "
24543 "remaining space to /dev/sda2:"
24547 #: ../tools/virt-resize.pl:79
24550 " virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 olddisk newdisk\n"
24555 #: ../tools/virt-resize.pl:81
24556 msgid "DETAILED USAGE"
24560 #: ../tools/virt-resize.pl:83
24561 msgid "EXPANDING A VIRTUAL MACHINE DISK"
24565 #: ../tools/virt-resize.pl:87
24566 msgid "1. Shut down the virtual machine"
24570 #: ../tools/virt-resize.pl:89
24571 msgid "2. Locate input disk image"
24575 #: ../tools/virt-resize.pl:91
24577 "Locate the input disk image (ie. the file or device on the host containing "
24578 "the guest's disk). If the guest is managed by libvirt, you can use C<virsh "
24579 "dumpxml> like this to find the disk image name:"
24583 #: ../tools/virt-resize.pl:95
24586 " # virsh dumpxml guestname | xpath /domain/devices/disk/source\n"
24587 " Found 1 nodes:\n"
24589 " <source dev=\"/dev/vg/lv_guest\" />\n"
24594 #: ../tools/virt-resize.pl:100
24595 msgid "3. Look at current sizing"
24599 #: ../tools/virt-resize.pl:102
24601 "Use L<virt-list-partitions(1)> to display the current partitions and sizes:"
24605 #: ../tools/virt-resize.pl:105
24608 " # virt-list-partitions -lht /dev/vg/lv_guest\n"
24609 " /dev/sda1 ext3 101.9M\n"
24610 " /dev/sda2 pv 7.9G\n"
24611 " /dev/sda device 8.0G\n"
24616 #: ../tools/virt-resize.pl:110
24618 "(This example is a virtual machine with an 8 GB disk which we would like to "
24619 "expand up to 10 GB)."
24623 #: ../tools/virt-resize.pl:113
24624 msgid "4. Create output disk"
24628 #: ../tools/virt-resize.pl:115
24630 "Virt-resize cannot do in-place disk modifications. You have to have space "
24631 "to store the resized output disk."
24635 #: ../tools/virt-resize.pl:118
24637 "To store the resized disk image in a file, create a file of a suitable size:"
24641 #: ../tools/virt-resize.pl:121
24644 " # rm -f outdisk\n"
24645 " # truncate -s 10G outdisk\n"
24650 #: ../tools/virt-resize.pl:124
24651 msgid "Or use L<lvcreate(1)> to create a logical volume:"
24655 #: ../tools/virt-resize.pl:126
24658 " # lvcreate -L 10G -n lv_name vg_name\n"
24663 #: ../tools/virt-resize.pl:128
24664 msgid "Or use L<virsh(1)> vol-create-as to create a libvirt storage volume:"
24668 #: ../tools/virt-resize.pl:130
24671 " # virsh pool-list\n"
24672 " # virsh vol-create-as poolname newvol 10G\n"
24677 #: ../tools/virt-resize.pl:133
24682 #: ../tools/virt-resize.pl:135
24684 "virt-resize takes two mandatory parameters, the input disk (eg. device or "
24685 "file) and the output disk. The output disk is the one created in the "
24690 #: ../tools/virt-resize.pl:139
24693 " # virt-resize indisk outdisk\n"
24698 #: ../tools/virt-resize.pl:141
24700 "This command just copies disk image C<indisk> to disk image C<outdisk> "
24701 "I<without> resizing or changing any existing partitions. If C<outdisk> is "
24702 "larger, then an extra, empty partition is created at the end of the disk "
24703 "covering the extra space. If C<outdisk> is smaller, then it will give an "
24708 #: ../tools/virt-resize.pl:147
24710 "More realistically you'd want to expand existing partitions in the disk "
24711 "image by passing extra options (for the full list see the L</OPTIONS> "
24716 #: ../tools/virt-resize.pl:151
24718 "L</--expand> is the most useful option. It expands the named partition "
24719 "within the disk to fill any extra space:"
24723 #: ../tools/virt-resize.pl:154
24726 " # virt-resize --expand /dev/sda2 indisk outdisk\n"
24731 #: ../tools/virt-resize.pl:156
24733 "(In this case, an extra partition is I<not> created at the end of the disk, "
24734 "because there will be no unused space)."
24738 #: ../tools/virt-resize.pl:159
24740 "L</--resize> is the other commonly used option. The following would "
24741 "increase the size of /dev/sda1 by 200M, and expand /dev/sda2 to fill the "
24742 "rest of the available space:"
24746 #: ../tools/virt-resize.pl:163
24749 " # virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
24750 " indisk outdisk\n"
24755 #: ../tools/virt-resize.pl:166
24757 "If the expanded partition in the image contains a filesystem or LVM PV, then "
24758 "if virt-resize knows how, it will resize the contents, the equivalent of "
24759 "calling a command such as L<pvresize(8)>, L<resize2fs(8)> or L<ntfsresize(8)"
24760 ">. However virt-resize does not know how to resize some filesystems, so you "
24761 "would have to online resize them after booting the guest. And virt-resize "
24762 "also does not resize anything inside an LVM PV, it just resizes the PV "
24763 "itself and leaves the user to resize any LVs inside that PV as desired."
24767 #: ../tools/virt-resize.pl:175
24768 msgid "Other options are covered below."
24772 #: ../tools/virt-resize.pl:177
24777 #: ../tools/virt-resize.pl:179
24778 msgid "Thoroughly test the new disk image I<before> discarding the old one."
24782 #: ../tools/virt-resize.pl:181
24783 msgid "If you are using libvirt, edit the XML to point at the new disk:"
24787 #: ../tools/virt-resize.pl:183
24790 " # virsh edit guestname\n"
24795 #: ../tools/virt-resize.pl:185
24797 "Change E<lt>source ...E<gt>, see L<http://libvirt.org/formatdomain."
24798 "html#elementsDisks>"
24802 #: ../tools/virt-resize.pl:188
24803 msgid "Then start up the domain with the new, resized disk:"
24807 #: ../tools/virt-resize.pl:190
24810 " # virsh start guestname\n"
24815 #: ../tools/virt-resize.pl:192
24817 "and check that it still works. See also the L</NOTES> section below for "
24818 "additional information."
24822 #: ../tools/virt-resize.pl:195
24823 msgid "7. Resize LVs etc inside the guest"
24827 #: ../tools/virt-resize.pl:197
24828 msgid "(This can also be done offline using L<guestfish(1)>)"
24832 #: ../tools/virt-resize.pl:199
24834 "Once the guest has booted you should see the new space available, at least "
24835 "for filesystems that virt-resize knows how to resize, and for PVs. The user "
24836 "may need to resize LVs inside PVs, and also resize filesystem types that "
24837 "virt-resize does not know how to expand."
24841 #: ../tools/virt-resize.pl:206
24842 msgid "SHRINKING A VIRTUAL MACHINE DISK"
24846 #: ../tools/virt-resize.pl:208
24848 "Shrinking is somewhat more complex than expanding, and only an overview is "
24853 #: ../tools/virt-resize.pl:211
24855 "Firstly virt-resize will not attempt to shrink any partition content (PVs, "
24856 "filesystems). The user has to shrink content before passing the disk image "
24857 "to virt-resize, and virt-resize will check that the content has been shrunk "
24862 #: ../tools/virt-resize.pl:216
24863 msgid "(Shrinking can also be done offline using L<guestfish(1)>)"
24867 #: ../tools/virt-resize.pl:218
24869 "After shrinking PVs and filesystems, shut down the guest, and proceed with "
24870 "steps 3 and 4 above to allocate a new disk image."
24874 #: ../tools/virt-resize.pl:221
24876 "Then run virt-resize with any of the C<--shrink> and/or C<--resize> options."
24880 #: ../tools/virt-resize.pl:224
24881 msgid "IGNORING OR DELETING PARTITIONS"
24885 #: ../tools/virt-resize.pl:226
24887 "virt-resize also gives a convenient way to ignore or delete partitions when "
24888 "copying from the input disk to the output disk. Ignoring a partition speeds "
24889 "up the copy where you don't care about the existing contents of a "
24890 "partition. Deleting a partition removes it completely, but note that it "
24891 "also renumbers any partitions after the one which is deleted, which can "
24892 "leave some guests unbootable."
24896 #: ../tools/virt-resize.pl:243
24897 msgid "Display help."
24901 #: ../tools/virt-resize.pl:257
24902 msgid "B<--resize part=size>"
24906 #: ../tools/virt-resize.pl:259
24908 "Resize the named partition (expanding or shrinking it) so that it has the "
24913 #: ../tools/virt-resize.pl:262
24915 "C<size> can be expressed as an absolute number followed by b/K/M/G/T/P/E to "
24916 "mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Petabytes or "
24917 "Exabytes; or as a percentage of the current size; or as a relative number or "
24918 "percentage. For example:"
24922 #: ../tools/virt-resize.pl:267
24925 " --resize /dev/sda2=10G\n"
24930 #: ../tools/virt-resize.pl:269
24933 " --resize /dev/sda4=90%\n"
24938 #: ../tools/virt-resize.pl:271
24941 " --resize /dev/sda2=+1G\n"
24946 #: ../tools/virt-resize.pl:273
24949 " --resize /dev/sda2=-200M\n"
24954 #: ../tools/virt-resize.pl:275
24957 " --resize /dev/sda1=+128K\n"
24962 #: ../tools/virt-resize.pl:277
24965 " --resize /dev/sda1=+10%\n"
24970 #: ../tools/virt-resize.pl:279
24973 " --resize /dev/sda1=-10%\n"
24978 #: ../tools/virt-resize.pl:281
24980 "You can increase the size of any partition. Virt-resize will expand the "
24981 "direct content of the partition if it knows how (see C<--expand> below)."
24985 #: ../tools/virt-resize.pl:285
24987 "You can only I<decrease> the size of partitions that contain filesystems or "
24988 "PVs which have already been shrunk. Virt-resize will check this has been "
24989 "done before proceeding, or else will print an error (see also C<--resize-"
24994 #: ../tools/virt-resize.pl:290 ../tools/virt-resize.pl:382
24995 #: ../tools/virt-resize.pl:399
24996 msgid "You can give this option multiple times."
25000 #: ../tools/virt-resize.pl:296
25001 msgid "B<--resize-force part=size>"
25005 #: ../tools/virt-resize.pl:298
25007 "This is the same as C<--resize> except that it will let you decrease the "
25008 "size of any partition. Generally this means you will lose any data which "
25009 "was at the end of the partition you shrink, but you may not care about that "
25010 "(eg. if shrinking an unused partition, or if you can easily recreate it such "
25011 "as a swap partition)."
25015 #: ../tools/virt-resize.pl:304
25016 msgid "See also the C<--ignore> option."
25020 #: ../tools/virt-resize.pl:310
25021 msgid "B<--expand part>"
25025 #: ../tools/virt-resize.pl:312
25027 "Expand the named partition so it uses up all extra space (space left over "
25028 "after any other resize changes that you request have been done)."
25032 #: ../tools/virt-resize.pl:315
25034 "If virt-resize knows how, it will expand the direct content of the "
25035 "partition. For example, if the partition is an LVM PV, it will expand the "
25036 "PV to fit (like calling L<pvresize(8)>). Virt-resize leaves any other "
25037 "content it doesn't know about alone."
25041 #: ../tools/virt-resize.pl:320
25042 msgid "Currently virt-resize can resize:"
25046 #: ../tools/virt-resize.pl:326
25048 "ext2, ext3 and ext4 filesystems when they are contained directly inside a "
25053 #: ../tools/virt-resize.pl:331
25055 "NTFS filesystems contained directly in a partition, if libguestfs was "
25056 "compiled with support for NTFS."
25060 #: ../tools/virt-resize.pl:334
25062 "The filesystem must have been shut down consistently last time it was used. "
25063 "Additionally, L<ntfsresize(8)> marks the resized filesystem as requiring a "
25064 "consistency check, so at the first boot after resizing Windows will check "
25069 #: ../tools/virt-resize.pl:341
25071 "LVM PVs (physical volumes). However virt-resize does I<not> resize anything "
25072 "inside the PV. The user will have to resize LVs as desired."
25076 #: ../tools/virt-resize.pl:347 ../tools/virt-resize.pl:369
25077 msgid "Note that you cannot use C<--expand> and C<--shrink> together."
25081 #: ../tools/virt-resize.pl:353
25082 msgid "B<--shrink part>"
25086 #: ../tools/virt-resize.pl:355
25088 "Shrink the named partition until the overall disk image fits in the "
25089 "destination. The named partition B<must> contain a filesystem or PV which "
25090 "has already been shrunk using another tool (eg. L<guestfish(1)> or other "
25091 "online tools). Virt-resize will check this and give an error if it has not "
25096 #: ../tools/virt-resize.pl:361
25098 "The amount by which the overall disk must be shrunk (after carrying out all "
25099 "other operations requested by the user) is called the \"deficit\". For "
25100 "example, a straight copy (assume no other operations) from a 5GB disk image "
25101 "to a 4GB disk image results in a 1GB deficit. In this case, virt-resize "
25102 "would give an error unless the user specified a partition to shrink and that "
25103 "partition had more than a gigabyte of free space."
25107 #: ../tools/virt-resize.pl:375
25108 msgid "B<--ignore part>"
25112 #: ../tools/virt-resize.pl:377
25114 "Ignore the named partition. Effectively this means the partition is "
25115 "allocated on the destination disk, but the content is not copied across from "
25116 "the source disk. The content of the partition will be blank (all zero "
25121 #: ../tools/virt-resize.pl:388
25122 msgid "B<--delete part>"
25126 #: ../tools/virt-resize.pl:390
25128 "Delete the named partition. It would be more accurate to describe this as "
25129 "\"don't copy it over\", since virt-resize doesn't do in-place changes and "
25130 "the original disk image is left intact."
25134 #: ../tools/virt-resize.pl:394
25136 "Note that when you delete a partition, then anything contained in the "
25137 "partition is also deleted. Furthermore, this causes any partitions that "
25138 "come after to be I<renumbered>, which can easily make your guest unbootable."
25142 #: ../tools/virt-resize.pl:405
25143 msgid "B<--LV-expand logvol>"
25147 #: ../tools/virt-resize.pl:407
25149 "This takes the logical volume and, as a final step, expands it to fill all "
25150 "the space available in its volume group. A typical usage, assuming a Linux "
25151 "guest with a single PV C</dev/sda2> and a root device called C</dev/vg_guest/"
25152 "lv_root> would be:"
25156 #: ../tools/virt-resize.pl:412
25159 " virt-resize indisk outdisk \\\n"
25160 " --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root\n"
25165 #: ../tools/virt-resize.pl:415
25167 "This would first expand the partition (and PV), and then expand the root "
25168 "device to fill the extra space in the PV."
25172 #: ../tools/virt-resize.pl:418
25174 "The contents of the LV are also resized if virt-resize knows how to do "
25175 "that. You can stop virt-resize from trying to expand the content by using "
25176 "the option C<--no-expand-content>."
25180 #: ../tools/virt-resize.pl:422
25181 msgid "Use L<virt-list-filesystems(1)> to list the filesystems in the guest."
25185 #: ../tools/virt-resize.pl:425
25187 "You can give this option multiple times, I<but> it doesn't make sense to do "
25188 "this unless the logical volumes you specify are all in different volume "
25193 #: ../tools/virt-resize.pl:433
25194 msgid "B<--no-copy-boot-loader>"
25198 #: ../tools/virt-resize.pl:435
25200 "By default, virt-resize copies over some sectors at the start of the disk "
25201 "(up to the beginning of the first partition). Commonly these sectors "
25202 "contain the Master Boot Record (MBR) and the boot loader, and are required "
25203 "in order for the guest to boot correctly."
25207 #: ../tools/virt-resize.pl:440
25209 "If you specify this flag, then this initial copy is not done. You may need "
25210 "to reinstall the boot loader in this case."
25214 #: ../tools/virt-resize.pl:448
25215 msgid "B<--no-extra-partition>"
25219 #: ../tools/virt-resize.pl:450
25221 "By default, virt-resize creates an extra partition if there is any extra, "
25222 "unused space after all resizing has happened. Use this option to prevent "
25223 "the extra partition from being created. If you do this then the extra space "
25224 "will be inaccessible until you run fdisk, parted, or some other partitioning "
25225 "tool in the guest."
25229 #: ../tools/virt-resize.pl:456
25231 "Note that if the surplus space is smaller than 10 MB, no extra partition "
25236 #: ../tools/virt-resize.pl:463
25237 msgid "B<--no-expand-content>"
25241 #: ../tools/virt-resize.pl:465
25243 "By default, virt-resize will try to expand the direct contents of "
25244 "partitions, if it knows how (see C<--expand> option above)."
25248 #: ../tools/virt-resize.pl:468
25250 "If you give the C<--no-expand-content> option then virt-resize will not "
25255 #: ../tools/virt-resize.pl:475
25256 msgid "B<-d> | B<--debug>"
25260 #: ../tools/virt-resize.pl:477 ../tools/virt-win-reg.pl:198
25261 msgid "Enable debugging messages."
25265 #: ../tools/virt-resize.pl:483
25266 msgid "B<-n> | B<--dryrun>"
25270 #: ../tools/virt-resize.pl:485
25271 msgid "Print a summary of what would be done, but don't do anything."
25275 #: ../tools/virt-resize.pl:491
25276 msgid "B<-q> | B<--quiet>"
25280 #: ../tools/virt-resize.pl:493
25281 msgid "Don't print the summary."
25285 #: ../tools/virt-resize.pl:1352
25286 msgid "\"Partition 1 does not end on cylinder boundary.\""
25290 #: ../tools/virt-resize.pl:1354
25292 "Virt-resize aligns partitions to multiples of 64 sectors. Usually this "
25293 "means the partitions will not be aligned to the ancient CHS geometry. "
25294 "However CHS geometry is meaningless for disks manufactured since the early "
25295 "1990s, and doubly so for virtual hard drives. Alignment of partitions to "
25296 "cylinders is not required by any modern operating system."
25300 #: ../tools/virt-resize.pl:1361
25301 msgid "RESIZING WINDOWS VIRTUAL MACHINES"
25305 #: ../tools/virt-resize.pl:1363
25307 "In Windows Vista and later versions, Microsoft switched to using a separate "
25308 "boot partition. In these VMs, typically C</dev/sda1> is the boot partition "
25309 "and C</dev/sda2> is the main (C:) drive. We have not had any luck resizing "
25310 "the boot partition. Doing so seems to break the guest completely. However "
25311 "expanding the second partition (ie. C: drive) should work."
25315 #: ../tools/virt-resize.pl:1370
25317 "Windows may initiate a lengthy \"chkdsk\" on first boot after a resize, if "
25318 "NTFS partitions have been expanded. This is just a safety check and (unless "
25319 "it find errors) is nothing to worry about."
25323 #: ../tools/virt-resize.pl:1374
25324 msgid "ALTERNATIVE TOOLS"
25328 #: ../tools/virt-resize.pl:1376
25330 "There are several proprietary tools for resizing partitions. We won't "
25331 "mention any here."
25335 #: ../tools/virt-resize.pl:1379
25337 "L<parted(8)> and its graphical shell gparted can do some types of resizing "
25338 "operations on disk images. They can resize and move partitions, but I don't "
25339 "think they can do anything with the contents, and they certainly don't "
25344 #: ../tools/virt-resize.pl:1384
25346 "L<guestfish(1)> can do everything that virt-resize can do and a lot more, "
25347 "but at a much lower level. You will probably end up hand-calculating sector "
25348 "offsets, which is something that virt-resize was designed to avoid. If you "
25349 "want to see the guestfish-equivalent commands that virt-resize runs, use the "
25354 #: ../tools/virt-resize.pl:1392
25356 "L<virt-list-partitions(1)>, L<virt-list-filesystems(1)>, L<virt-df(1)>, "
25357 "L<guestfs(3)>, L<guestfish(1)>, L<lvm(8)>, L<pvresize(8)>, L<lvresize(8)>, "
25358 "L<resize2fs(8)>, L<ntfsresize(8)>, L<virsh(1)>, L<parted(8)>, L<Sys::Guestfs"
25359 "(3)>, L<http://libguestfs.org/>."
25363 #: ../tools/virt-tar.pl:34
25364 msgid "virt-tar - Extract or upload files to a virtual machine"
25368 #: ../tools/virt-tar.pl:38
25371 " virt-tar [--options] -x domname directory tarball\n"
25376 #: ../tools/virt-tar.pl:40
25379 " virt-tar [--options] -u domname tarball directory\n"
25384 #: ../tools/virt-tar.pl:42
25387 " virt-tar [--options] disk.img [disk.img ...] -x directory tarball\n"
25392 #: ../tools/virt-tar.pl:44
25395 " virt-tar [--options] disk.img [disk.img ...] -u tarball directory\n"
25400 #: ../tools/virt-tar.pl:48
25401 msgid "Download C</home> from the VM into a local tarball:"
25405 #: ../tools/virt-tar.pl:50
25408 " virt-tar -x domname /home home.tar\n"
25413 #: ../tools/virt-tar.pl:52
25416 " virt-tar -zx domname /home home.tar.gz\n"
25421 #: ../tools/virt-tar.pl:54
25422 msgid "Upload a local tarball and unpack it inside C</tmp> in the VM:"
25426 #: ../tools/virt-tar.pl:56
25429 " virt-tar -u domname uploadstuff.tar /tmp\n"
25434 #: ../tools/virt-tar.pl:58
25437 " virt-tar -zu domname uploadstuff.tar.gz /tmp\n"
25442 #: ../tools/virt-tar.pl:62
25444 "You must I<not> use C<virt-tar> with the C<-u> option (upload) on live "
25445 "virtual machines. If you do this, you risk disk corruption in the VM. "
25446 "C<virt-tar> tries to stop you from doing this, but doesn't catch all cases."
25450 #: ../tools/virt-tar.pl:67
25452 "You can use C<-x> (extract) on live virtual machines, but you might get "
25453 "inconsistent results or errors if there is filesystem activity inside the "
25454 "VM. If the live VM is synched and quiescent, then C<virt-tar> will usually "
25455 "work, but the only way to guarantee consistent results is if the virtual "
25456 "machine is shut down."
25460 #: ../tools/virt-tar.pl:75
25462 "C<virt-tar> is a general purpose archive tool for downloading and uploading "
25463 "parts of a guest filesystem. There are many possibilities: making backups, "
25464 "uploading data files, snooping on guest activity, fixing or customizing "
25469 #: ../tools/virt-tar.pl:80
25471 "If you want to just view a single file, use L<virt-cat(1)>. If you just "
25472 "want to edit a single file, use L<virt-edit(1)>. For more complex cases you "
25473 "should look at the L<guestfish(1)> tool."
25477 #: ../tools/virt-tar.pl:84
25479 "There are two modes of operation: C<-x> (eXtract) downloads a directory and "
25480 "its contents (recursively) from the virtual machine into a local tarball. "
25481 "C<-u> uploads from a local tarball, unpacking it into a directory inside the "
25482 "virtual machine. You cannot use these two options together."
25486 #: ../tools/virt-tar.pl:90
25488 "In addition, you may need to use the C<-z> (gZip) option to enable "
25489 "compression. When uploading, you have to specify C<-z> if the upload file "
25490 "is compressed because virt-tar won't detect this on its own."
25494 #: ../tools/virt-tar.pl:94
25496 "C<virt-tar> can only handle tar (optionally gzipped) format tarballs. For "
25497 "example it cannot do PKZip files or bzip2 compression. If you want that "
25498 "then you'll have to rebuild the tarballs yourself. (This is a limitation of "
25499 "the L<libguestfs(3)> API)."
25503 #: ../tools/virt-tar.pl:135
25504 msgid "B<-x> | B<--extract> | B<--download>"
25508 #: ../tools/virt-tar.pl:137
25509 msgid "B<-u> | B<--upload>"
25513 #: ../tools/virt-tar.pl:139
25515 "Use C<-x> to extract (download) a directory from a virtual machine to a "
25520 #: ../tools/virt-tar.pl:142
25522 "Use C<-u> to upload and unpack from a local tarball into a virtual machine. "
25523 "Please read the L</WARNING> section above before using this option."
25527 #: ../tools/virt-tar.pl:146
25528 msgid "You must specify exactly one of these options."
25532 #: ../tools/virt-tar.pl:152
25533 msgid "B<-z> | B<--gzip>"
25537 #: ../tools/virt-tar.pl:154
25538 msgid "Specify that the input or output tarball is gzip-compressed."
25542 #: ../tools/virt-tar.pl:259
25544 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, L<Sys::"
25545 "Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs."
25550 #: ../tools/virt-win-reg.pl:38
25552 "virt-win-reg - Export and merge Windows Registry entries from a Windows guest"
25556 #: ../tools/virt-win-reg.pl:42
25559 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey'\n"
25564 #: ../tools/virt-win-reg.pl:44
25567 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' name\n"
25572 #: ../tools/virt-win-reg.pl:46
25575 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' @\n"
25580 #: ../tools/virt-win-reg.pl:48
25583 " virt-win-reg --merge domname [input.reg ...]\n"
25588 #: ../tools/virt-win-reg.pl:50
25591 " virt-win-reg [--options] disk.img ... # instead of domname\n"
25596 #: ../tools/virt-win-reg.pl:54
25598 "You must I<not> use C<virt-win-reg> with the C<--merge> option on live "
25599 "virtual machines. If you do this, you I<will> get irreversible disk "
25600 "corruption in the VM. C<virt-win-reg> tries to stop you from doing this, "
25601 "but doesn't catch all cases."
25605 #: ../tools/virt-win-reg.pl:59
25607 "Modifying the Windows Registry is an inherently risky operation. The format "
25608 "is deliberately obscure and undocumented, and Registry changes can leave the "
25609 "system unbootable. Therefore when using the C<--merge> option, make sure "
25610 "you have a reliable backup first."
25614 #: ../tools/virt-win-reg.pl:66
25616 "This program can export and merge Windows Registry entries from a Windows "
25621 #: ../tools/virt-win-reg.pl:69
25623 "The first parameter is the libvirt guest name or the raw disk image of a "
25628 #: ../tools/virt-win-reg.pl:72
25630 "If C<--merge> is I<not> specified, then the chosen registry key is displayed/"
25631 "exported (recursively). For example:"
25635 #: ../tools/virt-win-reg.pl:75
25638 " $ virt-win-reg Windows7 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft'\n"
25643 #: ../tools/virt-win-reg.pl:77
25645 "You can also display single values from within registry keys, for example:"
25649 #: ../tools/virt-win-reg.pl:80
25652 " $ cvkey='HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'\n"
25653 " $ virt-win-reg Windows7 $cvkey ProductName\n"
25654 " Windows 7 Enterprise\n"
25659 #: ../tools/virt-win-reg.pl:84
25661 "With C<--merge>, you can merge a textual regedit file into the Windows "
25666 #: ../tools/virt-win-reg.pl:87
25669 " $ virt-win-reg --merge Windows7 changes.reg\n"
25674 #: ../tools/virt-win-reg.pl:89
25675 msgid "SUPPORTED SYSTEMS"
25679 #: ../tools/virt-win-reg.pl:91
25681 "The program currently supports Windows NT-derived guests starting with "
25682 "Windows XP through to at least Windows 7."
25686 #: ../tools/virt-win-reg.pl:94
25688 "Registry support is done for C<HKEY_LOCAL_MACHINE\\SAM>, C<HKEY_LOCAL_MACHINE"
25689 "\\SECURITY>, C<HKEY_LOCAL_MACHINE\\SOFTWARE>, C<HKEY_LOCAL_MACHINE\\SYSTEM> "
25690 "and C<HKEY_USERS\\.DEFAULT>."
25694 #: ../tools/virt-win-reg.pl:98
25696 "You can use C<HKLM> as a shorthand for C<HKEY_LOCAL_MACHINE>, and C<HKU> for "
25701 #: ../tools/virt-win-reg.pl:101
25703 "C<HKEY_USERS\\$SID> and C<HKEY_CURRENT_USER> are B<not> supported at this "
25708 #: ../tools/virt-win-reg.pl:104
25713 #: ../tools/virt-win-reg.pl:106
25715 "This program is only meant for simple access to the registry. If you want "
25716 "to do complicated things with the registry, we suggest you download the "
25717 "Registry hive files from the guest using L<libguestfs(3)> or L<guestfish(1)> "
25718 "and access them locally, eg. using L<hivex(3)>, L<hivexsh(1)> or "
25719 "L<hivexregedit(1)>."
25723 #: ../tools/virt-win-reg.pl:112
25728 #: ../tools/virt-win-reg.pl:114
25730 "C<virt-win-reg> expects that regedit files have already been reencoded in "
25731 "the local encoding. Usually on Linux hosts, this means UTF-8 with Unix-"
25732 "style line endings. Since Windows regedit files are often in UTF-16LE with "
25733 "Windows-style line endings, you may need to reencode the whole file before "
25734 "or after processing."
25738 #: ../tools/virt-win-reg.pl:120
25740 "To reencode a file from Windows format to Linux (before processing it with "
25741 "the C<--merge> option), you would do something like this:"
25745 #: ../tools/virt-win-reg.pl:123
25748 " iconv -f utf-16le -t utf-8 < win.reg | dos2unix > linux.reg\n"
25753 #: ../tools/virt-win-reg.pl:125
25755 "To go in the opposite direction, after exporting and before sending the file "
25756 "to a Windows user, do something like this:"
25760 #: ../tools/virt-win-reg.pl:128
25763 " unix2dos linux.reg | iconv -f utf-8 -t utf-16le > win.reg\n"
25768 #: ../tools/virt-win-reg.pl:130
25769 msgid "For more information about encoding, see L<Win::Hivex::Regedit(3)>."
25773 #: ../tools/virt-win-reg.pl:132
25775 "If you are unsure about the current encoding, use the L<file(1)> command. "
25776 "Recent versions of Windows regedit.exe produce a UTF-16LE file with Windows-"
25777 "style (CRLF) line endings, like this:"
25781 #: ../tools/virt-win-reg.pl:136
25784 " $ file software.reg\n"
25785 " software.reg: Little-endian UTF-16 Unicode text, with very long lines,\n"
25786 " with CRLF line terminators\n"
25791 #: ../tools/virt-win-reg.pl:140
25792 msgid "This file would need conversion before you could C<--merge> it."
25796 #: ../tools/virt-win-reg.pl:142
25797 msgid "SHELL QUOTING"
25801 #: ../tools/virt-win-reg.pl:144
25803 "Be careful when passing parameters containing C<\\> (backslash) in the "
25804 "shell. Usually you will have to use 'single quotes' or double backslashes "
25805 "(but not both) to protect them from the shell."
25809 #: ../tools/virt-win-reg.pl:148
25810 msgid "Paths and value names are case-insensitive."
25814 #: ../tools/virt-win-reg.pl:150
25815 msgid "CurrentControlSet etc."
25819 #: ../tools/virt-win-reg.pl:152
25821 "Registry keys like C<CurrentControlSet> don't really exist in the Windows "
25822 "Registry at the level of the hive file, and therefore you cannot modify "
25827 #: ../tools/virt-win-reg.pl:156
25829 "C<CurrentControlSet> is usually an alias for C<ControlSet001>. In some "
25830 "circumstances it might refer to another control set. The way to find out is "
25831 "to look at the C<HKLM\\SYSTEM\\Select> key:"
25835 #: ../tools/virt-win-reg.pl:160
25838 " # virt-win-reg WindowsGuest 'HKLM\\SYSTEM\\Select'\n"
25839 " [HKEY_LOCAL_MACHINE\\SYSTEM\\Select]\n"
25840 " \"Current\"=dword:00000001\n"
25841 " \"Default\"=dword:00000001\n"
25842 " \"Failed\"=dword:00000000\n"
25843 " \"LastKnownGood\"=dword:00000002\n"
25848 #: ../tools/virt-win-reg.pl:167
25849 msgid "\"Default\" is the one which Windows will choose when it boots."
25853 #: ../tools/virt-win-reg.pl:169
25855 "Similarly, other C<Current...> keys in the path may need to be replaced."
25859 #: ../tools/virt-win-reg.pl:216
25864 #: ../tools/virt-win-reg.pl:218
25866 "In merge mode, this merges a textual regedit file into the Windows Registry "
25867 "of the virtual machine. If this flag is I<not> given then virt-win-reg "
25868 "displays or exports Registry entries instead."
25872 #: ../tools/virt-win-reg.pl:222
25874 "Note that C<--merge> is I<unsafe> to use on live virtual machines, and will "
25875 "result in disk corruption. However exporting (without this flag) is always "
25880 #: ../tools/virt-win-reg.pl:230
25881 msgid "B<--encoding> UTF-16LE|ASCII"
25885 #: ../tools/virt-win-reg.pl:232
25887 "When merging (only), you may need to specify the encoding for strings to be "
25888 "used in the hive file. This is explained in detail in L<Win::Hivex::Regedit"
25889 "(3)/ENCODING STRINGS>."
25893 #: ../tools/virt-win-reg.pl:236
25895 "The default is to use UTF-16LE, which should work with recent versions of "
25900 #: ../tools/virt-win-reg.pl:463
25902 "L<hivex(3)>, L<hivexsh(1)>, L<hivexregedit(1)>, L<guestfs(3)>, L<guestfish(1)"
25903 ">, L<virt-cat(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Win::Hivex"
25904 "(3)>, L<Win::Hivex::Regedit(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
25908 #: ../tools/virt-win-reg.pl:481
25911 " export LIBGUESTFS_DEBUG=1\n"
25912 " virt-win-reg --debug [... rest ...] > /tmp/virt-win-reg.log 2>&1\n"
25917 #: ../tools/virt-win-reg.pl:484
25919 "Attach /tmp/virt-win-reg.log to a new bug report at L<https://bugzilla."