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-02 20:33+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 "Haskell or C#). You can also use it from shell scripts or the command line."
141 #: ../src/guestfs.pod:49
143 "You don't need to be root to use libguestfs, although obviously you do need "
144 "enough permissions to access the disk images."
148 #: ../src/guestfs.pod:52
150 "Libguestfs is a large API because it can do many things. For a gentle "
151 "introduction, please read the L</API OVERVIEW> section next."
155 #: ../src/guestfs.pod:55
160 #: ../src/guestfs.pod:57
162 "This section provides a gentler overview of the libguestfs API. We also try "
163 "to group API calls together, where that may not be obvious from reading "
164 "about the individual calls in the main section of this manual."
168 #: ../src/guestfs.pod:62
173 #: ../src/guestfs.pod:64
175 "Before you can use libguestfs calls, you have to create a handle. Then you "
176 "must add at least one disk image to the handle, followed by launching the "
177 "handle, then performing whatever operations you want, and finally closing "
178 "the handle. By convention we use the single letter C<g> for the name of the "
179 "handle variable, although of course you can use any name you want."
183 #: ../src/guestfs.pod:71
184 msgid "The general structure of all libguestfs-using programs looks like this:"
188 #: ../src/guestfs.pod:74
191 " guestfs_h *g = guestfs_create ();\n"
196 #: ../src/guestfs.pod:76
199 " /* Call guestfs_add_drive additional times if there are\n"
200 " * multiple disk images.\n"
202 " guestfs_add_drive (g, \"guest.img\");\n"
207 #: ../src/guestfs.pod:81
210 " /* Most manipulation calls won't work until you've launched\n"
211 " * the handle 'g'. You have to do this _after_ adding drives\n"
212 " * and _before_ other commands.\n"
214 " guestfs_launch (g);\n"
219 #: ../src/guestfs.pod:87
222 " /* Now you can examine what partitions, LVs etc are available.\n"
224 " char **partitions = guestfs_list_partitions (g);\n"
225 " char **logvols = guestfs_lvs (g);\n"
230 #: ../src/guestfs.pod:92
233 " /* To access a filesystem in the image, you must mount it.\n"
235 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
240 #: ../src/guestfs.pod:96
243 " /* Now you can perform filesystem actions on the guest\n"
246 " guestfs_touch (g, \"/hello\");\n"
251 #: ../src/guestfs.pod:101
254 " /* You only need to call guestfs_sync if you have made\n"
255 " * changes to the guest image. (But if you've made changes\n"
256 " * then you *must* sync). See also: guestfs_umount and\n"
257 " * guestfs_umount_all calls.\n"
259 " guestfs_sync (g);\n"
264 #: ../src/guestfs.pod:108
267 " /* Close the handle 'g'. */\n"
268 " guestfs_close (g);\n"
273 #: ../src/guestfs.pod:111
275 "The code above doesn't include any error checking. In real code you should "
276 "check return values carefully for errors. In general all functions that "
277 "return integers return C<-1> on error, and all functions that return "
278 "pointers return C<NULL> on error. See section L</ERROR HANDLING> below for "
279 "how to handle errors, and consult the documentation for each function call "
280 "below to see precisely how they return error indications."
284 #: ../src/guestfs.pod:119
289 #: ../src/guestfs.pod:121
291 "The image filename (C<\"guest.img\"> in the example above) could be a disk "
292 "image from a virtual machine, a L<dd(1)> copy of a physical hard disk, an "
293 "actual block device, or simply an empty file of zeroes that you have created "
294 "through L<posix_fallocate(3)>. Libguestfs lets you do useful things to all "
299 #: ../src/guestfs.pod:127
301 "You can add a disk read-only using L</guestfs_add_drive_ro>, in which case "
302 "libguestfs won't modify the file."
306 #: ../src/guestfs.pod:130
308 "Be extremely cautious if the disk image is in use, eg. if it is being used "
309 "by a virtual machine. Adding it read-write will almost certainly cause disk "
310 "corruption, but adding it read-only is safe."
314 #: ../src/guestfs.pod:134
316 "You must add at least one disk image, and you may add multiple disk images. "
317 "In the API, the disk images are usually referred to as C</dev/sda> (for the "
318 "first one you added), C</dev/sdb> (for the second one you added), etc."
322 #: ../src/guestfs.pod:139
324 "Once L</guestfs_launch> has been called you cannot add any more images. You "
325 "can call L</guestfs_list_devices> to get a list of the device names, in the "
326 "order that you added them. See also L</BLOCK DEVICE NAMING> below."
330 #: ../src/guestfs.pod:144
335 #: ../src/guestfs.pod:146
337 "Before you can read or write files, create directories and so on in a disk "
338 "image that contains filesystems, you have to mount those filesystems using "
339 "L</guestfs_mount>. If you already know that a disk image contains (for "
340 "example) one partition with a filesystem on that partition, then you can "
345 #: ../src/guestfs.pod:152
348 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
353 #: ../src/guestfs.pod:154
355 "where C</dev/sda1> means literally the first partition (C<1>) of the first "
356 "disk image that we added (C</dev/sda>). If the disk contains Linux LVM2 "
357 "logical volumes you could refer to those instead (eg. C</dev/VG/LV>)."
361 #: ../src/guestfs.pod:158
363 "If you are given a disk image and you don't know what it contains then you "
364 "have to find out. Libguestfs can do that too: use L</"
365 "guestfs_list_partitions> and L</guestfs_lvs> to list possible partitions and "
366 "LVs, and either try mounting each to see what is mountable, or else examine "
367 "them with L</guestfs_vfs_type> or L</guestfs_file>. Libguestfs also has a "
368 "set of APIs for inspection of disk images (see L</INSPECTION> below). But "
369 "you might find it easier to look at higher level programs built on top of "
370 "libguestfs, in particular L<virt-inspector(1)>."
374 #: ../src/guestfs.pod:168
376 "To mount a disk image read-only, use L</guestfs_mount_ro>. There are "
377 "several other variations of the C<guestfs_mount_*> call."
381 #: ../src/guestfs.pod:171
382 msgid "FILESYSTEM ACCESS AND MODIFICATION"
386 #: ../src/guestfs.pod:173
388 "The majority of the libguestfs API consists of fairly low-level calls for "
389 "accessing and modifying the files, directories, symlinks etc on mounted "
390 "filesystems. There are over a hundred such calls which you can find listed "
391 "in detail below in this man page, and we don't even pretend to cover them "
392 "all in this overview."
396 #: ../src/guestfs.pod:179
398 "Specify filenames as full paths, starting with C<\"/\"> and including the "
403 #: ../src/guestfs.pod:182
405 "For example, if you mounted a filesystem at C<\"/\"> and you want to read "
406 "the file called C<\"etc/passwd\"> then you could do:"
410 #: ../src/guestfs.pod:185
413 " char *data = guestfs_cat (g, \"/etc/passwd\");\n"
418 #: ../src/guestfs.pod:187
420 "This would return C<data> as a newly allocated buffer containing the full "
421 "content of that file (with some conditions: see also L</DOWNLOADING> below), "
422 "or C<NULL> if there was an error."
426 #: ../src/guestfs.pod:191
428 "As another example, to create a top-level directory on that filesystem "
429 "called C<\"var\"> you would do:"
433 #: ../src/guestfs.pod:194
436 " guestfs_mkdir (g, \"/var\");\n"
441 #: ../src/guestfs.pod:196
442 msgid "To create a symlink you could do:"
446 #: ../src/guestfs.pod:198
449 " guestfs_ln_s (g, \"/etc/init.d/portmap\",\n"
450 " \"/etc/rc3.d/S30portmap\");\n"
455 #: ../src/guestfs.pod:201
457 "Libguestfs will reject attempts to use relative paths and there is no "
458 "concept of a current working directory."
462 #: ../src/guestfs.pod:204
464 "Libguestfs can return errors in many situations: for example if the "
465 "filesystem isn't writable, or if a file or directory that you requested "
466 "doesn't exist. If you are using the C API (documented here) you have to "
467 "check for those error conditions after each call. (Other language bindings "
468 "turn these errors into exceptions)."
472 #: ../src/guestfs.pod:210
474 "File writes are affected by the per-handle umask, set by calling L</"
475 "guestfs_umask> and defaulting to 022. See L</UMASK>."
479 #: ../src/guestfs.pod:213
484 #: ../src/guestfs.pod:215
486 "Libguestfs contains API calls to read, create and modify partition tables on "
491 #: ../src/guestfs.pod:218
493 "In the common case where you want to create a single partition covering the "
494 "whole disk, you should use the L</guestfs_part_disk> call:"
498 #: ../src/guestfs.pod:222
501 " const char *parttype = \"mbr\";\n"
502 " if (disk_is_larger_than_2TB)\n"
503 " parttype = \"gpt\";\n"
504 " guestfs_part_disk (g, \"/dev/sda\", parttype);\n"
509 #: ../src/guestfs.pod:227
511 "Obviously this effectively wipes anything that was on that disk image before."
515 #: ../src/guestfs.pod:230
520 #: ../src/guestfs.pod:232
522 "Libguestfs provides access to a large part of the LVM2 API, such as L</"
523 "guestfs_lvcreate> and L</guestfs_vgremove>. It won't make much sense unless "
524 "you familiarize yourself with the concepts of physical volumes, volume "
525 "groups and logical volumes."
529 #: ../src/guestfs.pod:237
531 "This author strongly recommends reading the LVM HOWTO, online at L<http://"
532 "tldp.org/HOWTO/LVM-HOWTO/>."
536 #: ../src/guestfs.pod:240
541 #: ../src/guestfs.pod:242
543 "Use L</guestfs_cat> to download small, text only files. This call is "
544 "limited to files which are less than 2 MB and which cannot contain any ASCII "
545 "NUL (C<\\0>) characters. However it has a very simple to use API."
549 #: ../src/guestfs.pod:247
551 "L</guestfs_read_file> can be used to read files which contain arbitrary 8 "
552 "bit data, since it returns a (pointer, size) pair. However it is still "
553 "limited to \"small\" files, less than 2 MB."
557 #: ../src/guestfs.pod:251
559 "L</guestfs_download> can be used to download any file, with no limits on "
560 "content or size (even files larger than 4 GB)."
564 #: ../src/guestfs.pod:254
566 "To download multiple files, see L</guestfs_tar_out> and L</guestfs_tgz_out>."
570 #: ../src/guestfs.pod:257
575 #: ../src/guestfs.pod:259
577 "It's often the case that you want to write a file or files to the disk image."
581 #: ../src/guestfs.pod:262
583 "To write a small file with fixed content, use L</guestfs_write>. To create "
584 "a file of all zeroes, use L</guestfs_truncate_size> (sparse) or L</"
585 "guestfs_fallocate64> (with all disk blocks allocated). There are a variety "
586 "of other functions for creating test files, for example L</guestfs_fill> and "
587 "L</guestfs_fill_pattern>."
591 #: ../src/guestfs.pod:268
593 "To upload a single file, use L</guestfs_upload>. This call has no limits on "
594 "file content or size (even files larger than 4 GB)."
598 #: ../src/guestfs.pod:271
600 "To upload multiple files, see L</guestfs_tar_in> and L</guestfs_tgz_in>."
604 #: ../src/guestfs.pod:273
606 "However the fastest way to upload I<large numbers of arbitrary files> is to "
607 "turn them into a squashfs or CD ISO (see L<mksquashfs(8)> and L<mkisofs(8)"
608 ">), then attach this using L</guestfs_add_drive_ro>. If you add the drive "
609 "in a predictable way (eg. adding it last after all other drives) then you "
610 "can get the device name from L</guestfs_list_devices> and mount it directly "
611 "using L</guestfs_mount_ro>. Note that squashfs images are sometimes non-"
612 "portable between kernel versions, and they don't support labels or UUIDs. "
613 "If you want to pre-build an image or you need to mount it using a label or "
614 "UUID, use an ISO image instead."
618 #: ../src/guestfs.pod:284
623 #: ../src/guestfs.pod:286
625 "There are various different commands for copying between files and devices "
626 "and in and out of the guest filesystem. These are summarised in the table "
631 #: ../src/guestfs.pod:292
632 msgid "B<file> to B<file>"
636 #: ../src/guestfs.pod:294
638 "Use L</guestfs_cp> to copy a single file, or L</guestfs_cp_a> to copy "
639 "directories recursively."
643 #: ../src/guestfs.pod:297
644 msgid "B<file or device> to B<file or device>"
648 #: ../src/guestfs.pod:299
650 "Use L</guestfs_dd> which efficiently uses L<dd(1)> to copy between files and "
651 "devices in the guest."
655 #: ../src/guestfs.pod:302
656 msgid "Example: duplicate the contents of an LV:"
660 #: ../src/guestfs.pod:304
663 " guestfs_dd (g, \"/dev/VG/Original\", \"/dev/VG/Copy\");\n"
668 #: ../src/guestfs.pod:306
670 "The destination (C</dev/VG/Copy>) must be at least as large as the source "
671 "(C</dev/VG/Original>). To copy less than the whole source device, use L</"
672 "guestfs_copy_size>."
676 #: ../src/guestfs.pod:310
677 msgid "B<file on the host> to B<file or device>"
681 #: ../src/guestfs.pod:312
682 msgid "Use L</guestfs_upload>. See L</UPLOADING> above."
686 #: ../src/guestfs.pod:314
687 msgid "B<file or device> to B<file on the host>"
691 #: ../src/guestfs.pod:316
692 msgid "Use L</guestfs_download>. See L</DOWNLOADING> above."
696 #: ../src/guestfs.pod:320
697 msgid "LISTING FILES"
701 #: ../src/guestfs.pod:322
703 "L</guestfs_ll> is just designed for humans to read (mainly when using the "
704 "L<guestfish(1)>-equivalent command C<ll>)."
708 #: ../src/guestfs.pod:325
710 "L</guestfs_ls> is a quick way to get a list of files in a directory from "
711 "programs, as a flat list of strings."
715 #: ../src/guestfs.pod:328
717 "L</guestfs_readdir> is a programmatic way to get a list of files in a "
718 "directory, plus additional information about each one. It is more "
719 "equivalent to using the L<readdir(3)> call on a local filesystem."
723 #: ../src/guestfs.pod:332
725 "L</guestfs_find> and L</guestfs_find0> can be used to recursively list files."
729 #: ../src/guestfs.pod:335
730 msgid "RUNNING COMMANDS"
734 #: ../src/guestfs.pod:337
736 "Although libguestfs is a primarily an API for manipulating files inside "
737 "guest images, we also provide some limited facilities for running commands "
742 #: ../src/guestfs.pod:341
743 msgid "There are many limitations to this:"
747 #: ../src/guestfs.pod:345 ../src/guestfs.pod:350 ../src/guestfs.pod:355
748 #: ../src/guestfs.pod:359 ../src/guestfs.pod:364 ../src/guestfs.pod:368
749 #: ../src/guestfs.pod:373 ../src/guestfs.pod:1214 ../src/guestfs.pod:1219
750 #: ../src/guestfs.pod:1223 ../src/guestfs.pod:1325 ../src/guestfs.pod:1329
751 #: ../src/guestfs.pod:1333 ../src/guestfs.pod:1338 ../src/guestfs.pod:1346
752 #: ../src/guestfs.pod:1365 ../src/guestfs.pod:1373 ../src/guestfs.pod:1587
753 #: ../src/guestfs.pod:1593 ../src/guestfs.pod:1598 ../src/guestfs.pod:1604
754 #: ../src/guestfs.pod:1711 ../src/guestfs.pod:1715 ../src/guestfs.pod:1719
755 #: ../src/guestfs.pod:1723 ../src/guestfs-actions.pod:14
756 #: ../src/guestfs-actions.pod:21 ../src/guestfs-actions.pod:372
757 #: ../src/guestfs-actions.pod:380 ../src/guestfs-actions.pod:387
758 #: ../src/guestfs-actions.pod:394 ../src/guestfs-actions.pod:1257
759 #: ../src/guestfs-actions.pod:1261 ../src/guestfs-actions.pod:1265
760 #: ../src/guestfs-actions.pod:1269 ../src/guestfs-actions.pod:1277
761 #: ../src/guestfs-actions.pod:1281 ../src/guestfs-actions.pod:1285
762 #: ../src/guestfs-actions.pod:1295 ../src/guestfs-actions.pod:1299
763 #: ../src/guestfs-actions.pod:1303 ../src/guestfs-actions.pod:1426
764 #: ../src/guestfs-actions.pod:1430 ../src/guestfs-actions.pod:1435
765 #: ../src/guestfs-actions.pod:1440 ../src/guestfs-actions.pod:1492
766 #: ../src/guestfs-actions.pod:1496 ../src/guestfs-actions.pod:1501
767 #: ../fish/guestfish.pod:309 ../fish/guestfish.pod:313
768 #: ../fish/guestfish.pod:317 ../fish/guestfish.pod:321
769 #: ../fish/guestfish-actions.pod:13 ../fish/guestfish-actions.pod:20
770 #: ../fish/guestfish-actions.pod:300 ../fish/guestfish-actions.pod:308
771 #: ../fish/guestfish-actions.pod:315 ../fish/guestfish-actions.pod:322
772 #: ../fish/guestfish-actions.pod:998 ../fish/guestfish-actions.pod:1002
773 #: ../fish/guestfish-actions.pod:1006 ../fish/guestfish-actions.pod:1010
774 #: ../fish/guestfish-actions.pod:1018 ../fish/guestfish-actions.pod:1022
775 #: ../fish/guestfish-actions.pod:1026 ../fish/guestfish-actions.pod:1036
776 #: ../fish/guestfish-actions.pod:1040 ../fish/guestfish-actions.pod:1044
777 #: ../fish/guestfish-actions.pod:1134 ../fish/guestfish-actions.pod:1138
778 #: ../fish/guestfish-actions.pod:1143 ../fish/guestfish-actions.pod:1148
779 #: ../fish/guestfish-actions.pod:1190 ../fish/guestfish-actions.pod:1194
780 #: ../fish/guestfish-actions.pod:1199 ../tools/virt-resize.pl:324
781 #: ../tools/virt-resize.pl:329 ../tools/virt-resize.pl:339
786 #: ../src/guestfs.pod:347
788 "The kernel version that the command runs under will be different from what "
793 #: ../src/guestfs.pod:352
795 "If the command needs to communicate with daemons, then most likely they "
800 #: ../src/guestfs.pod:357
801 msgid "The command will be running in limited memory."
805 #: ../src/guestfs.pod:361
807 "The network may not be available unless you enable it (see L</"
808 "guestfs_set_network>)."
812 #: ../src/guestfs.pod:366
813 msgid "Only supports Linux guests (not Windows, BSD, etc)."
817 #: ../src/guestfs.pod:370
819 "Architecture limitations (eg. won't work for a PPC guest on an X86 host)."
823 #: ../src/guestfs.pod:375
825 "For SELinux guests, you may need to enable SELinux and load policy first. "
826 "See L</SELINUX> in this manpage."
830 #: ../src/guestfs.pod:380
832 "The two main API calls to run commands are L</guestfs_command> and L</"
833 "guestfs_sh> (there are also variations)."
837 #: ../src/guestfs.pod:383
839 "The difference is that L</guestfs_sh> runs commands using the shell, so any "
840 "shell globs, redirections, etc will work."
844 #: ../src/guestfs.pod:386
845 msgid "CONFIGURATION FILES"
849 #: ../src/guestfs.pod:388
851 "To read and write configuration files in Linux guest filesystems, we "
852 "strongly recommend using Augeas. For example, Augeas understands how to "
853 "read and write, say, a Linux shadow password file or X.org configuration "
854 "file, and so avoids you having to write that code."
858 #: ../src/guestfs.pod:393
860 "The main Augeas calls are bound through the C<guestfs_aug_*> APIs. We don't "
861 "document Augeas itself here because there is excellent documentation on the "
862 "L<http://augeas.net/> website."
866 #: ../src/guestfs.pod:397
868 "If you don't want to use Augeas (you fool!) then try calling L</"
869 "guestfs_read_lines> to get the file as a list of lines which you can iterate "
874 #: ../src/guestfs.pod:401
879 #: ../src/guestfs.pod:403
881 "We support SELinux guests. To ensure that labeling happens correctly in "
882 "SELinux guests, you need to enable SELinux and load the guest's policy:"
886 #: ../src/guestfs.pod:409
891 #: ../src/guestfs.pod:411
892 msgid "Before launching, do:"
896 #: ../src/guestfs.pod:413
899 " guestfs_set_selinux (g, 1);\n"
904 #: ../src/guestfs.pod:415
909 #: ../src/guestfs.pod:417
911 "After mounting the guest's filesystem(s), load the policy. This is best "
912 "done by running the L<load_policy(8)> command in the guest itself:"
916 #: ../src/guestfs.pod:421
919 " guestfs_sh (g, \"/usr/sbin/load_policy\");\n"
924 #: ../src/guestfs.pod:423
926 "(Older versions of C<load_policy> require you to specify the name of the "
931 #: ../src/guestfs.pod:426
936 #: ../src/guestfs.pod:428
938 "Optionally, set the security context for the API. The correct security "
939 "context to use can only be known by inspecting the guest. As an example:"
943 #: ../src/guestfs.pod:432
946 " guestfs_setcon (g, \"unconfined_u:unconfined_r:unconfined_t:s0\");\n"
951 #: ../src/guestfs.pod:436
952 msgid "This will work for running commands and editing existing files."
956 #: ../src/guestfs.pod:438
958 "When new files are created, you may need to label them explicitly, for "
959 "example by running the external command C<restorecon pathname>."
963 #: ../src/guestfs.pod:442
968 #: ../src/guestfs.pod:444
970 "Certain calls are affected by the current file mode creation mask (the "
971 "\"umask\"). In particular ones which create files or directories, such as "
972 "L</guestfs_touch>, L</guestfs_mknod> or L</guestfs_mkdir>. This affects "
973 "either the default mode that the file is created with or modifies the mode "
978 #: ../src/guestfs.pod:450
980 "The default umask is C<022>, so files are created with modes such as C<0644> "
981 "and directories with C<0755>."
985 #: ../src/guestfs.pod:453
987 "There are two ways to avoid being affected by umask. Either set umask to 0 "
988 "(call C<guestfs_umask (g, 0)> early after launching). Or call L</"
989 "guestfs_chmod> after creating each file or directory."
993 #: ../src/guestfs.pod:457
994 msgid "For more information about umask, see L<umask(2)>."
998 #: ../src/guestfs.pod:459 ../fish/guestfish.pod:559
999 msgid "ENCRYPTED DISKS"
1003 #: ../src/guestfs.pod:461
1005 "Libguestfs allows you to access Linux guests which have been encrypted using "
1006 "whole disk encryption that conforms to the Linux Unified Key Setup (LUKS) "
1007 "standard. This includes nearly all whole disk encryption systems used by "
1008 "modern Linux guests."
1012 #: ../src/guestfs.pod:467
1014 "Use L</guestfs_vfs_type> to identify LUKS-encrypted block devices (it "
1015 "returns the string C<crypto_LUKS>)."
1019 #: ../src/guestfs.pod:470
1021 "Then open these devices by calling L</guestfs_luks_open>. Obviously you "
1022 "will require the passphrase!"
1026 #: ../src/guestfs.pod:473
1028 "Opening a LUKS device creates a new device mapper device called C</dev/"
1029 "mapper/mapname> (where C<mapname> is the string you supply to L</"
1030 "guestfs_luks_open>). Reads and writes to this mapper device are decrypted "
1031 "from and encrypted to the underlying block device respectively."
1035 #: ../src/guestfs.pod:479
1037 "LVM volume groups on the device can be made visible by calling L</"
1038 "guestfs_vgscan> followed by L</guestfs_vg_activate_all>. The logical volume"
1039 "(s) can now be mounted in the usual way."
1043 #: ../src/guestfs.pod:483
1045 "Use the reverse process to close a LUKS device. Unmount any logical volumes "
1046 "on it, deactivate the volume groups by caling C<guestfs_vg_activate (g, 0, "
1047 "[\"/dev/VG\"])>. Then close the mapper device by calling L</"
1048 "guestfs_luks_close> on the C</dev/mapper/mapname> device (I<not> the "
1049 "underlying encrypted block device)."
1053 #: ../src/guestfs.pod:490
1058 #: ../src/guestfs.pod:492
1060 "Libguestfs has APIs for inspecting an unknown disk image to find out if it "
1061 "contains operating systems. (These APIs used to be in a separate Perl-only "
1062 "library called L<Sys::Guestfs::Lib(3)> but since version 1.5.3 the most "
1063 "frequently used part of this library has been rewritten in C and moved into "
1068 #: ../src/guestfs.pod:498
1070 "Add all disks belonging to the unknown virtual machine and call L</"
1071 "guestfs_launch> in the usual way."
1075 #: ../src/guestfs.pod:501
1077 "Then call L</guestfs_inspect_os>. This function uses other libguestfs calls "
1078 "and certain heuristics, and returns a list of operating systems that were "
1079 "found. An empty list means none were found. A single element is the root "
1080 "filesystem of the operating system. For dual- or multi-boot guests, "
1081 "multiple roots can be returned, each one corresponding to a separate "
1082 "operating system. (Multi-boot virtual machines are extremely rare in the "
1083 "world of virtualization, but since this scenario can happen, we have built "
1084 "libguestfs to deal with it.)"
1088 #: ../src/guestfs.pod:510
1090 "For each root, you can then call various C<guestfs_inspect_get_*> functions "
1091 "to get additional details about that operating system. For example, call L</"
1092 "guestfs_inspect_get_type> to return the string C<windows> or C<linux> for "
1093 "Windows and Linux-based operating systems respectively."
1097 #: ../src/guestfs.pod:516
1099 "Un*x-like and Linux-based operating systems usually consist of several "
1100 "filesystems which are mounted at boot time (for example, a separate boot "
1101 "partition mounted on C</boot>). The inspection rules are able to detect how "
1102 "filesystems correspond to mount points. Call "
1103 "C<guestfs_inspect_get_mountpoints> to get this mapping. It might return a "
1104 "hash table like this example:"
1108 #: ../src/guestfs.pod:523
1111 " /boot => /dev/sda1\n"
1112 " / => /dev/vg_guest/lv_root\n"
1113 " /usr => /dev/vg_guest/lv_usr\n"
1118 #: ../src/guestfs.pod:527
1120 "The caller can then make calls to L</guestfs_mount_options> to mount the "
1121 "filesystems as suggested."
1125 #: ../src/guestfs.pod:530
1127 "Be careful to mount filesystems in the right order (eg. C</> before C</"
1128 "usr>). Sorting the keys of the hash by length, shortest first, should work."
1132 #: ../src/guestfs.pod:534
1134 "Inspection currently only works for some common operating systems. "
1135 "Contributors are welcome to send patches for other operating systems that we "
1136 "currently cannot detect."
1140 #: ../src/guestfs.pod:538
1142 "Encrypted disks must be opened before inspection. See L</ENCRYPTED DISKS> "
1143 "for more details. The L</guestfs_inspect_os> function just ignores any "
1144 "encrypted devices."
1148 #: ../src/guestfs.pod:542
1150 "A note on the implementation: The call L</guestfs_inspect_os> performs "
1151 "inspection and caches the results in the guest handle. Subsequent calls to "
1152 "C<guestfs_inspect_get_*> return this cached information, but I<do not> re-"
1153 "read the disks. If you change the content of the guest disks, you can redo "
1154 "inspection by calling L</guestfs_inspect_os> again."
1158 #: ../src/guestfs.pod:549
1159 msgid "SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS"
1163 #: ../src/guestfs.pod:551
1165 "Libguestfs can mount NTFS partitions. It does this using the L<http://www."
1166 "ntfs-3g.org/> driver."
1170 #: ../src/guestfs.pod:554
1172 "DOS and Windows still use drive letters, and the filesystems are always "
1173 "treated as case insensitive by Windows itself, and therefore you might find "
1174 "a Windows configuration file referring to a path like C<c:\\windows"
1175 "\\system32>. When the filesystem is mounted in libguestfs, that directory "
1176 "might be referred to as C</WINDOWS/System32>."
1180 #: ../src/guestfs.pod:560
1182 "Drive letter mappings are outside the scope of libguestfs. You have to use "
1183 "libguestfs to read the appropriate Windows Registry and configuration files, "
1184 "to determine yourself how drives are mapped (see also L<hivex(3)> and L<virt-"
1189 #: ../src/guestfs.pod:565
1191 "Replacing backslash characters with forward slash characters is also outside "
1192 "the scope of libguestfs, but something that you can easily do."
1196 #: ../src/guestfs.pod:568
1198 "Where we can help is in resolving the case insensitivity of paths. For "
1199 "this, call L</guestfs_case_sensitive_path>."
1203 #: ../src/guestfs.pod:571
1205 "Libguestfs also provides some help for decoding Windows Registry \"hive\" "
1206 "files, through the library C<hivex> which is part of the libguestfs project "
1207 "although ships as a separate tarball. You have to locate and download the "
1208 "hive file(s) yourself, and then pass them to C<hivex> functions. See also "
1209 "the programs L<hivexml(1)>, L<hivexsh(1)>, L<hivexregedit(1)> and L<virt-win-"
1210 "reg(1)> for more help on this issue."
1214 #: ../src/guestfs.pod:579
1215 msgid "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES"
1219 #: ../src/guestfs.pod:581
1221 "Although we don't want to discourage you from using the C API, we will "
1222 "mention here that the same API is also available in other languages."
1226 #: ../src/guestfs.pod:584
1228 "The API is broadly identical in all supported languages. This means that "
1229 "the C call C<guestfs_mount(g,path)> is C<$g-E<gt>mount($path)> in Perl, C<g."
1230 "mount(path)> in Python, and C<Guestfs.mount g path> in OCaml. In other "
1231 "words, a straightforward, predictable isomorphism between each language."
1235 #: ../src/guestfs.pod:590
1237 "Error messages are automatically transformed into exceptions if the language "
1242 #: ../src/guestfs.pod:593
1244 "We don't try to \"object orientify\" parts of the API in OO languages, "
1245 "although contributors are welcome to write higher level APIs above what we "
1246 "provide in their favourite languages if they wish."
1250 #: ../src/guestfs.pod:599
1255 #: ../src/guestfs.pod:601
1257 "You can use the I<guestfs.h> header file from C++ programs. The C++ API is "
1258 "identical to the C API. C++ classes and exceptions are not used."
1262 #: ../src/guestfs.pod:605
1267 #: ../src/guestfs.pod:607
1269 "The C# bindings are highly experimental. Please read the warnings at the "
1270 "top of C<csharp/Libguestfs.cs>."
1274 #: ../src/guestfs.pod:610
1279 #: ../src/guestfs.pod:612
1281 "This is the only language binding that is working but incomplete. Only "
1282 "calls which return simple integers have been bound in Haskell, and we are "
1283 "looking for help to complete this binding."
1287 #: ../src/guestfs.pod:616
1292 #: ../src/guestfs.pod:618
1294 "Full documentation is contained in the Javadoc which is distributed with "
1299 #: ../src/guestfs.pod:621
1304 #: ../src/guestfs.pod:623
1305 msgid "For documentation see the file C<guestfs.mli>."
1309 #: ../src/guestfs.pod:625
1314 #: ../src/guestfs.pod:627
1315 msgid "For documentation see L<Sys::Guestfs(3)>."
1319 #: ../src/guestfs.pod:629
1324 #: ../src/guestfs.pod:631
1325 msgid "For documentation do:"
1329 #: ../src/guestfs.pod:633
1333 " >>> import guestfs\n"
1334 " >>> help (guestfs)\n"
1339 #: ../src/guestfs.pod:637
1344 #: ../src/guestfs.pod:639
1346 "Use the Guestfs module. There is no Ruby-specific documentation, but you "
1347 "can find examples written in Ruby in the libguestfs source."
1351 #: ../src/guestfs.pod:642
1352 msgid "B<shell scripts>"
1356 #: ../src/guestfs.pod:644
1357 msgid "For documentation see L<guestfish(1)>."
1361 #: ../src/guestfs.pod:648
1362 msgid "LIBGUESTFS GOTCHAS"
1366 #: ../src/guestfs.pod:650
1368 "L<http://en.wikipedia.org/wiki/Gotcha_(programming)>: \"A feature of a "
1369 "system [...] that works in the way it is documented but is counterintuitive "
1370 "and almost invites mistakes.\""
1374 #: ../src/guestfs.pod:654
1376 "Since we developed libguestfs and the associated tools, there are several "
1377 "things we would have designed differently, but are now stuck with for "
1378 "backwards compatibility or other reasons. If there is ever a libguestfs 2.0 "
1379 "release, you can expect these to change. Beware of them."
1383 #: ../src/guestfs.pod:662
1384 msgid "Autosync / forgetting to sync."
1388 #: ../src/guestfs.pod:664
1390 "When modifying a filesystem from C or another language, you B<must> unmount "
1391 "all filesystems and call L</guestfs_sync> explicitly before you close the "
1392 "libguestfs handle. You can also call:"
1396 #: ../src/guestfs.pod:668
1399 " guestfs_set_autosync (g, 1);\n"
1404 #: ../src/guestfs.pod:670
1406 "to have the unmount/sync done automatically for you when the handle 'g' is "
1407 "closed. (This feature is called \"autosync\", L</guestfs_set_autosync> q.v.)"
1411 #: ../src/guestfs.pod:674
1413 "If you forget to do this, then it is entirely possible that your changes "
1414 "won't be written out, or will be partially written, or (very rarely) that "
1415 "you'll get disk corruption."
1419 #: ../src/guestfs.pod:678
1421 "Note that in L<guestfish(3)> autosync is the default. So quick and dirty "
1422 "guestfish scripts that forget to sync will work just fine, which can make "
1423 "this very puzzling if you are trying to debug a problem."
1427 #: ../src/guestfs.pod:682
1428 msgid "Mount option C<-o sync> should not be the default."
1432 #: ../src/guestfs.pod:684
1434 "If you use L</guestfs_mount>, then C<-o sync,noatime> are added implicitly. "
1435 "However C<-o sync> does not add any reliability benefit, but does have a "
1436 "very large performance impact."
1440 #: ../src/guestfs.pod:688
1442 "The work around is to use L</guestfs_mount_options> and set the mount "
1443 "options that you actually want to use."
1447 #: ../src/guestfs.pod:691
1448 msgid "Read-only should be the default."
1452 #: ../src/guestfs.pod:693
1454 "In L<guestfish(3)>, I<--ro> should be the default, and you should have to "
1455 "specify I<--rw> if you want to make changes to the image."
1459 #: ../src/guestfs.pod:696
1460 msgid "This would reduce the potential to corrupt live VM images."
1464 #: ../src/guestfs.pod:698
1466 "Note that many filesystems change the disk when you just mount and unmount, "
1467 "even if you didn't perform any writes. You need to use L</"
1468 "guestfs_add_drive_ro> to guarantee that the disk is not changed."
1472 #: ../src/guestfs.pod:702
1473 msgid "guestfish command line is hard to use."
1477 #: ../src/guestfs.pod:704
1479 "C<guestfish disk.img> doesn't do what people expect (open C<disk.img> for "
1480 "examination). It tries to run a guestfish command C<disk.img> which doesn't "
1481 "exist, so it fails. In earlier versions of guestfish the error message was "
1482 "also unintuitive, but we have corrected this since. Like the Bourne shell, "
1483 "we should have used C<guestfish -c command> to run commands."
1487 #: ../src/guestfs.pod:711
1488 msgid "guestfish megabyte modifiers don't work right on all commands"
1492 #: ../src/guestfs.pod:713
1494 "In recent guestfish you can use C<1M> to mean 1 megabyte (and similarly for "
1495 "other modifiers). What guestfish actually does is to multiply the number "
1496 "part by the modifier part and pass the result to the C API. However this "
1497 "doesn't work for a few APIs which aren't expecting bytes, but are already "
1498 "expecting some other unit (eg. megabytes)."
1502 #: ../src/guestfs.pod:720
1503 msgid "The most common is L</guestfs_lvcreate>. The guestfish command:"
1507 #: ../src/guestfs.pod:722
1510 " lvcreate LV VG 100M\n"
1515 #: ../src/guestfs.pod:724
1517 "does not do what you might expect. Instead because L</guestfs_lvcreate> is "
1518 "already expecting megabytes, this tries to create a 100 I<terabyte> (100 "
1519 "megabytes * megabytes) logical volume. The error message you get from this "
1520 "is also a little obscure."
1524 #: ../src/guestfs.pod:729
1526 "This could be fixed in the generator by specially marking parameters and "
1527 "return values which take bytes or other units."
1531 #: ../src/guestfs.pod:732
1532 msgid "Library should return errno with error messages."
1536 #: ../src/guestfs.pod:734
1538 "It would be a nice-to-have to be able to get the original value of 'errno' "
1539 "from inside the appliance along error paths (where set). Currently "
1540 "L<guestmount(1)> goes through hoops to try to reverse the error message "
1541 "string into an errno, see the function error() in fuse/guestmount.c."
1545 #: ../src/guestfs.pod:740
1547 "In libguestfs 1.5.4, the protocol was changed so that the Linux errno is "
1548 "sent back from the daemon."
1552 #: ../src/guestfs.pod:745
1553 msgid "PROTOCOL LIMITS"
1557 #: ../src/guestfs.pod:747
1559 "Internally libguestfs uses a message-based protocol to pass API calls and "
1560 "their responses to and from a small \"appliance\" (see L</INTERNALS> for "
1561 "plenty more detail about this). The maximum message size used by the "
1562 "protocol is slightly less than 4 MB. For some API calls you may need to be "
1563 "aware of this limit. The API calls which may be affected are individually "
1564 "documented, with a link back to this section of the documentation."
1568 #: ../src/guestfs.pod:755
1570 "A simple call such as L</guestfs_cat> returns its result (the file data) in "
1571 "a simple string. Because this string is at some point internally encoded as "
1572 "a message, the maximum size that it can return is slightly under 4 MB. If "
1573 "the requested file is larger than this then you will get an error."
1577 #: ../src/guestfs.pod:761
1579 "In order to transfer large files into and out of the guest filesystem, you "
1580 "need to use particular calls that support this. The sections L</UPLOADING> "
1581 "and L</DOWNLOADING> document how to do this."
1585 #: ../src/guestfs.pod:765
1587 "You might also consider mounting the disk image using our FUSE filesystem "
1588 "support (L<guestmount(1)>)."
1592 #: ../src/guestfs.pod:768
1593 msgid "KEYS AND PASSPHRASES"
1597 #: ../src/guestfs.pod:770
1599 "Certain libguestfs calls take a parameter that contains sensitive key "
1600 "material, passed in as a C string."
1604 #: ../src/guestfs.pod:773
1606 "In the future we would hope to change the libguestfs implementation so that "
1607 "keys are L<mlock(2)>-ed into physical RAM, and thus can never end up in "
1608 "swap. However this is I<not> done at the moment, because of the complexity "
1609 "of such an implementation."
1613 #: ../src/guestfs.pod:778
1615 "Therefore you should be aware that any key parameter you pass to libguestfs "
1616 "might end up being written out to the swap partition. If this is a concern, "
1617 "scrub the swap partition or don't use libguestfs on encrypted devices."
1621 #: ../src/guestfs.pod:783
1622 msgid "CONNECTION MANAGEMENT"
1626 #: ../src/guestfs.pod:785
1631 #: ../src/guestfs.pod:787
1633 "C<guestfs_h> is the opaque type representing a connection handle. Create a "
1634 "handle by calling L</guestfs_create>. Call L</guestfs_close> to free the "
1635 "handle and release all resources used."
1639 #: ../src/guestfs.pod:791
1641 "For information on using multiple handles and threads, see the section L</"
1642 "MULTIPLE HANDLES AND MULTIPLE THREADS> below."
1646 #: ../src/guestfs.pod:794
1647 msgid "guestfs_create"
1651 #: ../src/guestfs.pod:796
1654 " guestfs_h *guestfs_create (void);\n"
1659 #: ../src/guestfs.pod:798
1660 msgid "Create a connection handle."
1664 #: ../src/guestfs.pod:800
1665 msgid "You have to call L</guestfs_add_drive> on the handle at least once."
1669 #: ../src/guestfs.pod:802
1671 "This function returns a non-NULL pointer to a handle on success or NULL on "
1676 #: ../src/guestfs.pod:805
1677 msgid "After configuring the handle, you have to call L</guestfs_launch>."
1681 #: ../src/guestfs.pod:807
1683 "You may also want to configure error handling for the handle. See L</ERROR "
1684 "HANDLING> section below."
1688 #: ../src/guestfs.pod:810
1689 msgid "guestfs_close"
1693 #: ../src/guestfs.pod:812
1696 " void guestfs_close (guestfs_h *g);\n"
1701 #: ../src/guestfs.pod:814
1702 msgid "This closes the connection handle and frees up all resources used."
1706 #: ../src/guestfs.pod:816
1707 msgid "ERROR HANDLING"
1711 #: ../src/guestfs.pod:818
1713 "The convention in all functions that return C<int> is that they return C<-1> "
1714 "to indicate an error. You can get additional information on errors by "
1715 "calling L</guestfs_last_error> and/or by setting up an error handler with L</"
1716 "guestfs_set_error_handler>."
1720 #: ../src/guestfs.pod:823
1721 msgid "The default error handler prints the information string to C<stderr>."
1725 #: ../src/guestfs.pod:825
1727 "Out of memory errors are handled differently. The default action is to call "
1728 "L<abort(3)>. If this is undesirable, then you can set a handler using L</"
1729 "guestfs_set_out_of_memory_handler>."
1733 #: ../src/guestfs.pod:829
1734 msgid "guestfs_last_error"
1738 #: ../src/guestfs.pod:831
1741 " const char *guestfs_last_error (guestfs_h *g);\n"
1746 #: ../src/guestfs.pod:833
1748 "This returns the last error message that happened on C<g>. If there has not "
1749 "been an error since the handle was created, then this returns C<NULL>."
1753 #: ../src/guestfs.pod:837
1755 "The lifetime of the returned string is until the next error occurs, or L</"
1756 "guestfs_close> is called."
1760 #: ../src/guestfs.pod:840
1762 "The error string is not localized (ie. is always in English), because this "
1763 "makes searching for error messages in search engines give the largest number "
1768 #: ../src/guestfs.pod:844
1769 msgid "guestfs_set_error_handler"
1773 #: ../src/guestfs.pod:846
1776 " typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
1778 " const char *msg);\n"
1779 " void guestfs_set_error_handler (guestfs_h *g,\n"
1780 " guestfs_error_handler_cb cb,\n"
1786 #: ../src/guestfs.pod:853
1788 "The callback C<cb> will be called if there is an error. The parameters "
1789 "passed to the callback are an opaque data pointer and the error message "
1794 #: ../src/guestfs.pod:857
1796 "Note that the message string C<msg> is freed as soon as the callback "
1797 "function returns, so if you want to stash it somewhere you must make your "
1802 #: ../src/guestfs.pod:861
1803 msgid "The default handler prints messages on C<stderr>."
1807 #: ../src/guestfs.pod:863
1808 msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
1812 #: ../src/guestfs.pod:865
1813 msgid "guestfs_get_error_handler"
1817 #: ../src/guestfs.pod:867
1820 " guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
1821 " void **opaque_rtn);\n"
1826 #: ../src/guestfs.pod:870
1827 msgid "Returns the current error handler callback."
1831 #: ../src/guestfs.pod:872
1832 msgid "guestfs_set_out_of_memory_handler"
1836 #: ../src/guestfs.pod:874
1839 " typedef void (*guestfs_abort_cb) (void);\n"
1840 " int guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
1841 " guestfs_abort_cb);\n"
1846 #: ../src/guestfs.pod:878
1848 "The callback C<cb> will be called if there is an out of memory situation. "
1849 "I<Note this callback must not return>."
1853 #: ../src/guestfs.pod:881
1854 msgid "The default is to call L<abort(3)>."
1858 #: ../src/guestfs.pod:883
1860 "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
1864 #: ../src/guestfs.pod:886
1865 msgid "guestfs_get_out_of_memory_handler"
1869 #: ../src/guestfs.pod:888
1872 " guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
1877 #: ../src/guestfs.pod:890
1878 msgid "This returns the current out of memory handler."
1882 #: ../src/guestfs.pod:892
1887 #: ../src/guestfs.pod:894
1889 "Libguestfs needs a kernel and initrd.img, which it finds by looking along an "
1894 #: ../src/guestfs.pod:897
1896 "By default it looks for these in the directory C<$libdir/guestfs> (eg. C</"
1897 "usr/local/lib/guestfs> or C</usr/lib64/guestfs>)."
1901 #: ../src/guestfs.pod:900
1903 "Use L</guestfs_set_path> or set the environment variable L</LIBGUESTFS_PATH> "
1904 "to change the directories that libguestfs will search in. The value is a "
1905 "colon-separated list of paths. The current directory is I<not> searched "
1906 "unless the path contains an empty element or C<.>. For example "
1907 "C<LIBGUESTFS_PATH=:/usr/lib/guestfs> would search the current directory and "
1908 "then C</usr/lib/guestfs>."
1912 #: ../src/guestfs.pod:907
1913 msgid "HIGH-LEVEL API ACTIONS"
1917 #: ../src/guestfs.pod:909
1918 msgid "ABI GUARANTEE"
1922 #: ../src/guestfs.pod:911
1924 "We guarantee the libguestfs ABI (binary interface), for public, high-level "
1925 "actions as outlined in this section. Although we will deprecate some "
1926 "actions, for example if they get replaced by newer calls, we will keep the "
1927 "old actions forever. This allows you the developer to program in confidence "
1928 "against the libguestfs API."
1932 #: ../src/guestfs.pod:917 ../fish/guestfish.pod:898
1937 #: ../src/guestfs.pod:919
1942 #: ../src/guestfs.pod:921
1947 #: ../src/guestfs.pod:923
1948 msgid "AVAILABILITY"
1952 #: ../src/guestfs.pod:925
1953 msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
1957 #: ../src/guestfs.pod:927
1959 "Using L</guestfs_available> you can test availability of the following "
1960 "groups of functions. This test queries the appliance to see if the "
1961 "appliance you are currently using supports the functionality."
1965 #: ../src/guestfs.pod:932
1966 msgid "@AVAILABILITY@"
1970 #: ../src/guestfs.pod:934
1971 msgid "GUESTFISH supported COMMAND"
1975 #: ../src/guestfs.pod:936
1977 "In L<guestfish(3)> there is a handy interactive command C<supported> which "
1978 "prints out the available groups and whether they are supported by this build "
1979 "of libguestfs. Note however that you have to do C<run> first."
1983 #: ../src/guestfs.pod:941
1984 msgid "SINGLE CALLS AT COMPILE TIME"
1988 #: ../src/guestfs.pod:943
1990 "If you need to test whether a single libguestfs function is available at "
1991 "compile time, we recommend using build tools such as autoconf or cmake. For "
1992 "example in autotools you could use:"
1996 #: ../src/guestfs.pod:948
1999 " AC_CHECK_LIB([guestfs],[guestfs_create])\n"
2000 " AC_CHECK_FUNCS([guestfs_dd])\n"
2005 #: ../src/guestfs.pod:951
2007 "which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
2012 #: ../src/guestfs.pod:954
2013 msgid "SINGLE CALLS AT RUN TIME"
2017 #: ../src/guestfs.pod:956
2019 "Testing at compile time doesn't guarantee that a function really exists in "
2020 "the library. The reason is that you might be dynamically linked against a "
2021 "previous I<libguestfs.so> (dynamic library) which doesn't have the call. "
2022 "This situation unfortunately results in a segmentation fault, which is a "
2023 "shortcoming of the C dynamic linking system itself."
2027 #: ../src/guestfs.pod:963
2029 "You can use L<dlopen(3)> to test if a function is available at run time, as "
2030 "in this example program (note that you still need the compile time check as "
2035 #: ../src/guestfs.pod:967
2038 " #include <config.h>\n"
2043 #: ../src/guestfs.pod:969
2046 " #include <stdio.h>\n"
2047 " #include <stdlib.h>\n"
2048 " #include <unistd.h>\n"
2049 " #include <dlfcn.h>\n"
2050 " #include <guestfs.h>\n"
2055 #: ../src/guestfs.pod:975
2060 " #ifdef HAVE_GUESTFS_DD\n"
2062 " int has_function;\n"
2067 #: ../src/guestfs.pod:981
2070 " /* Test if the function guestfs_dd is really available. */\n"
2071 " dl = dlopen (NULL, RTLD_LAZY);\n"
2073 " fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
2074 " exit (EXIT_FAILURE);\n"
2076 " has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
2082 #: ../src/guestfs.pod:990
2085 " if (!has_function)\n"
2086 " printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
2088 " printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
2089 " /* Now it's safe to call\n"
2090 " guestfs_dd (g, \"foo\", \"bar\");\n"
2094 " printf (\"guestfs_dd function was not found at compile time\\n\");\n"
2101 #: ../src/guestfs.pod:1003
2103 "You may think the above is an awful lot of hassle, and it is. There are "
2104 "other ways outside of the C linking system to ensure that this kind of "
2105 "incompatibility never arises, such as using package versioning:"
2109 #: ../src/guestfs.pod:1008
2112 " Requires: libguestfs >= 1.0.80\n"
2117 #: ../src/guestfs.pod:1010 ../src/guestfs.pod:1015
2122 #: ../src/guestfs.pod:1012
2124 "<!-- old anchor for the next section --> <a name="
2125 "\"state_machine_and_low_level_event_api\"/>"
2129 #: ../src/guestfs.pod:1017
2130 msgid "ARCHITECTURE"
2134 #: ../src/guestfs.pod:1019
2136 "Internally, libguestfs is implemented by running an appliance (a special "
2137 "type of small virtual machine) using L<qemu(1)>. Qemu runs as a child "
2138 "process of the main program."
2142 #: ../src/guestfs.pod:1023
2145 " ___________________\n"
2147 " | main program |\n"
2149 " | | child process / appliance\n"
2150 " | | __________________________\n"
2152 " +-------------------+ RPC | +-----------------+ |\n"
2153 " | libguestfs <--------------------> guestfsd | |\n"
2154 " | | | +-----------------+ |\n"
2155 " \\___________________/ | | Linux kernel | |\n"
2156 " | +--^--------------+ |\n"
2157 " \\_________|________________/\n"
2163 " \\______________/\n"
2168 #: ../src/guestfs.pod:1043
2170 "The library, linked to the main program, creates the child process and hence "
2171 "the appliance in the L</guestfs_launch> function."
2175 #: ../src/guestfs.pod:1046
2177 "Inside the appliance is a Linux kernel and a complete stack of userspace "
2178 "tools (such as LVM and ext2 programs) and a small controlling daemon called "
2179 "L</guestfsd>. The library talks to L</guestfsd> using remote procedure "
2180 "calls (RPC). There is a mostly one-to-one correspondence between libguestfs "
2181 "API calls and RPC calls to the daemon. Lastly the disk image(s) are "
2182 "attached to the qemu process which translates device access by the "
2183 "appliance's Linux kernel into accesses to the image."
2187 #: ../src/guestfs.pod:1055
2189 "A common misunderstanding is that the appliance \"is\" the virtual machine. "
2190 "Although the disk image you are attached to might also be used by some "
2191 "virtual machine, libguestfs doesn't know or care about this. (But you will "
2192 "care if both libguestfs's qemu process and your virtual machine are trying "
2193 "to update the disk image at the same time, since these usually results in "
2194 "massive disk corruption)."
2198 #: ../src/guestfs.pod:1062
2199 msgid "STATE MACHINE"
2203 #: ../src/guestfs.pod:1064
2204 msgid "libguestfs uses a state machine to model the child process:"
2208 #: ../src/guestfs.pod:1066
2220 " / | \\ \\ guestfs_launch\n"
2221 " / | _\\__V______\n"
2223 " / | | LAUNCHING |\n"
2224 " / | \\___________/\n"
2226 " / | guestfs_launch\n"
2228 " ______ / __|____V\n"
2229 " / \\ ------> / \\\n"
2230 " | BUSY | | READY |\n"
2231 " \\______/ <------ \\________/\n"
2236 #: ../src/guestfs.pod:1088
2238 "The normal transitions are (1) CONFIG (when the handle is created, but there "
2239 "is no child process), (2) LAUNCHING (when the child process is booting up), "
2240 "(3) alternating between READY and BUSY as commands are issued to, and "
2241 "carried out by, the child process."
2245 #: ../src/guestfs.pod:1093
2247 "The guest may be killed by L</guestfs_kill_subprocess>, or may die "
2248 "asynchronously at any time (eg. due to some internal error), and that causes "
2249 "the state to transition back to CONFIG."
2253 #: ../src/guestfs.pod:1097
2255 "Configuration commands for qemu such as L</guestfs_add_drive> can only be "
2256 "issued when in the CONFIG state."
2260 #: ../src/guestfs.pod:1100
2262 "The high-level API offers two calls that go from CONFIG through LAUNCHING to "
2263 "READY. L</guestfs_launch> blocks until the child process is READY to accept "
2264 "commands (or until some failure or timeout). L</guestfs_launch> internally "
2265 "moves the state from CONFIG to LAUNCHING while it is running."
2269 #: ../src/guestfs.pod:1106
2271 "High-level API actions such as L</guestfs_mount> can only be issued when in "
2272 "the READY state. These high-level API calls block waiting for the command "
2273 "to be carried out (ie. the state to transition to BUSY and then back to "
2274 "READY). But using the low-level event API, you get non-blocking versions. "
2275 "(But you can still only carry out one operation per handle at a time - that "
2276 "is a limitation of the communications protocol we use)."
2280 #: ../src/guestfs.pod:1114
2282 "Finally, the child process sends asynchronous messages back to the main "
2283 "program, such as kernel log messages. Mostly these are ignored by the high-"
2284 "level API, but using the low-level event API you can register to receive "
2289 #: ../src/guestfs.pod:1119
2290 msgid "SETTING CALLBACKS TO HANDLE EVENTS"
2294 #: ../src/guestfs.pod:1121
2296 "The child process generates events in some situations. Current events "
2297 "include: receiving a log message, the child process exits."
2301 #: ../src/guestfs.pod:1124
2303 "Use the C<guestfs_set_*_callback> functions to set a callback for different "
2308 #: ../src/guestfs.pod:1127
2310 "Only I<one callback of each type> can be registered for each handle. "
2311 "Calling C<guestfs_set_*_callback> again overwrites the previous callback of "
2312 "that type. Cancel all callbacks of this type by calling this function with "
2313 "C<cb> set to C<NULL>."
2317 #: ../src/guestfs.pod:1132
2318 msgid "guestfs_set_log_message_callback"
2322 #: ../src/guestfs.pod:1134
2325 " typedef void (*guestfs_log_message_cb) (guestfs_h *g, void *opaque,\n"
2326 " char *buf, int len);\n"
2327 " void guestfs_set_log_message_callback (guestfs_h *g,\n"
2328 " guestfs_log_message_cb cb,\n"
2334 #: ../src/guestfs.pod:1140
2336 "The callback function C<cb> will be called whenever qemu or the guest writes "
2337 "anything to the console."
2341 #: ../src/guestfs.pod:1143
2342 msgid "Use this function to capture kernel messages and similar."
2346 #: ../src/guestfs.pod:1145
2348 "Normally there is no log message handler, and log messages are just "
2353 #: ../src/guestfs.pod:1148
2354 msgid "guestfs_set_subprocess_quit_callback"
2358 #: ../src/guestfs.pod:1150
2361 " typedef void (*guestfs_subprocess_quit_cb) (guestfs_h *g, void *opaque);\n"
2362 " void guestfs_set_subprocess_quit_callback (guestfs_h *g,\n"
2363 " guestfs_subprocess_quit_cb cb,\n"
2369 #: ../src/guestfs.pod:1155
2371 "The callback function C<cb> will be called when the child process quits, "
2372 "either asynchronously or if killed by L</guestfs_kill_subprocess>. (This "
2373 "corresponds to a transition from any state to the CONFIG state)."
2377 #: ../src/guestfs.pod:1160
2378 msgid "guestfs_set_launch_done_callback"
2382 #: ../src/guestfs.pod:1162
2385 " typedef void (*guestfs_launch_done_cb) (guestfs_h *g, void *opaque);\n"
2386 " void guestfs_set_launch_done_callback (guestfs_h *g,\n"
2387 " guestfs_launch_done_cb cb,\n"
2393 #: ../src/guestfs.pod:1167
2395 "The callback function C<cb> will be called when the child process becomes "
2396 "ready first time after it has been launched. (This corresponds to a "
2397 "transition from LAUNCHING to the READY state)."
2401 #: ../src/guestfs.pod:1171
2402 msgid "guestfs_set_close_callback"
2406 #: ../src/guestfs.pod:1173
2409 " typedef void (*guestfs_close_cb) (guestfs_h *g, void *opaque);\n"
2410 " void guestfs_set_close_callback (guestfs_h *g,\n"
2411 " guestfs_close_cb cb,\n"
2417 #: ../src/guestfs.pod:1178
2419 "The callback function C<cb> will be called while the handle is being closed "
2420 "(synchronously from L</guestfs_close>)."
2424 #: ../src/guestfs.pod:1181
2426 "Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
2427 "handles that are open when the program exits. This means that this callback "
2428 "might be called indirectly from L<exit(3)>, which can cause unexpected "
2429 "problems in higher-level languages (eg. if your HLL interpreter has already "
2430 "been cleaned up by the time this is called, and if your callback then jumps "
2431 "into some HLL function)."
2435 #: ../src/guestfs.pod:1189
2436 msgid "guestfs_set_progress_callback"
2440 #: ../src/guestfs.pod:1191
2443 " typedef void (*guestfs_progress_cb) (guestfs_h *g, void *opaque,\n"
2444 " int proc_nr, int serial,\n"
2445 " uint64_t position, uint64_t total);\n"
2446 " void guestfs_set_progress_callback (guestfs_h *g,\n"
2447 " guestfs_progress_cb cb,\n"
2453 #: ../src/guestfs.pod:1198
2455 "Some long-running operations can generate progress messages. If this "
2456 "callback is registered, then it will be called each time a progress message "
2457 "is generated (usually two seconds after the operation started, and three "
2458 "times per second thereafter until it completes, although the frequency may "
2459 "change in future versions)."
2463 #: ../src/guestfs.pod:1204
2465 "The callback receives two numbers: C<position> and C<total>. The units of "
2466 "C<total> are not defined, although for some operations C<total> may relate "
2467 "in some way to the amount of data to be transferred (eg. in bytes or "
2468 "megabytes), and C<position> may be the portion which has been transferred."
2472 #: ../src/guestfs.pod:1210
2473 msgid "The only defined and stable parts of the API are:"
2477 #: ../src/guestfs.pod:1216
2479 "The callback can display to the user some type of progress bar or indicator "
2480 "which shows the ratio of C<position>:C<total>."
2484 #: ../src/guestfs.pod:1221
2485 msgid "0 E<lt>= C<position> E<lt>= C<total>"
2489 #: ../src/guestfs.pod:1225
2491 "If any progress notification is sent during a call, then a final progress "
2492 "notification is always sent when C<position> = C<total>."
2496 #: ../src/guestfs.pod:1228
2498 "This is to simplify caller code, so callers can easily set the progress "
2499 "indicator to \"100%\" at the end of the operation, without requiring special "
2500 "code to detect this case."
2504 #: ../src/guestfs.pod:1234
2506 "The callback also receives the procedure number and serial number of the "
2507 "call. These are only useful for debugging protocol issues, and the callback "
2508 "can normally ignore them. The callback may want to print these numbers in "
2509 "error messages or debugging messages."
2513 #: ../src/guestfs.pod:1239
2514 msgid "PRIVATE DATA AREA"
2518 #: ../src/guestfs.pod:1241
2520 "You can attach named pieces of private data to the libguestfs handle, and "
2521 "fetch them by name for the lifetime of the handle. This is called the "
2522 "private data area and is only available from the C API."
2526 #: ../src/guestfs.pod:1245
2527 msgid "To attach a named piece of data, use the following call:"
2531 #: ../src/guestfs.pod:1247
2534 " void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
2539 #: ../src/guestfs.pod:1249
2541 "C<key> is the name to associate with this data, and C<data> is an arbitrary "
2542 "pointer (which can be C<NULL>). Any previous item with the same name is "
2547 #: ../src/guestfs.pod:1253
2549 "You can use any C<key> you want, but names beginning with an underscore "
2550 "character are reserved for internal libguestfs purposes (for implementing "
2551 "language bindings). It is recommended to prefix the name with some unique "
2552 "string to avoid collisions with other users."
2556 #: ../src/guestfs.pod:1258
2557 msgid "To retrieve the pointer, use:"
2561 #: ../src/guestfs.pod:1260
2564 " void *guestfs_get_private (guestfs_h *g, const char *key);\n"
2569 #: ../src/guestfs.pod:1262
2571 "This function returns C<NULL> if either no data is found associated with "
2572 "C<key>, or if the user previously set the C<key>'s C<data> pointer to "
2577 #: ../src/guestfs.pod:1266
2579 "Libguestfs does not try to look at or interpret the C<data> pointer in any "
2580 "way. As far as libguestfs is concerned, it need not be a valid pointer at "
2581 "all. In particular, libguestfs does I<not> try to free the data when the "
2582 "handle is closed. If the data must be freed, then the caller must either "
2583 "free it before calling L</guestfs_close> or must set up a close callback to "
2584 "do it (see L</guestfs_set_close_callback>, and note that only one callback "
2585 "can be registered for a handle)."
2589 #: ../src/guestfs.pod:1274
2591 "The private data area is implemented using a hash table, and should be "
2592 "reasonably efficient for moderate numbers of keys."
2596 #: ../src/guestfs.pod:1277
2597 msgid "BLOCK DEVICE NAMING"
2601 #: ../src/guestfs.pod:1279
2603 "In the kernel there is now quite a profusion of schemata for naming block "
2604 "devices (in this context, by I<block device> I mean a physical or virtual "
2605 "hard drive). The original Linux IDE driver used names starting with C</dev/"
2606 "hd*>. SCSI devices have historically used a different naming scheme, C</dev/"
2607 "sd*>. When the Linux kernel I<libata> driver became a popular replacement "
2608 "for the old IDE driver (particularly for SATA devices) those devices also "
2609 "used the C</dev/sd*> scheme. Additionally we now have virtual machines with "
2610 "paravirtualized drivers. This has created several different naming systems, "
2611 "such as C</dev/vd*> for virtio disks and C</dev/xvd*> for Xen PV disks."
2615 #: ../src/guestfs.pod:1291
2617 "As discussed above, libguestfs uses a qemu appliance running an embedded "
2618 "Linux kernel to access block devices. We can run a variety of appliances "
2619 "based on a variety of Linux kernels."
2623 #: ../src/guestfs.pod:1295
2625 "This causes a problem for libguestfs because many API calls use device or "
2626 "partition names. Working scripts and the recipe (example) scripts that we "
2627 "make available over the internet could fail if the naming scheme changes."
2631 #: ../src/guestfs.pod:1300
2633 "Therefore libguestfs defines C</dev/sd*> as the I<standard naming scheme>. "
2634 "Internally C</dev/sd*> names are translated, if necessary, to other names as "
2635 "required. For example, under RHEL 5 which uses the C</dev/hd*> scheme, any "
2636 "device parameter C</dev/sda2> is translated to C</dev/hda2> transparently."
2640 #: ../src/guestfs.pod:1306
2642 "Note that this I<only> applies to parameters. The L</guestfs_list_devices>, "
2643 "L</guestfs_list_partitions> and similar calls return the true names of the "
2644 "devices and partitions as known to the appliance."
2648 #: ../src/guestfs.pod:1311
2649 msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION"
2653 #: ../src/guestfs.pod:1313
2655 "Usually this translation is transparent. However in some (very rare) cases "
2656 "you may need to know the exact algorithm. Such cases include where you use "
2657 "L</guestfs_config> to add a mixture of virtio and IDE devices to the qemu-"
2658 "based appliance, so have a mixture of C</dev/sd*> and C</dev/vd*> devices."
2662 #: ../src/guestfs.pod:1319
2664 "The algorithm is applied only to I<parameters> which are known to be either "
2665 "device or partition names. Return values from functions such as L</"
2666 "guestfs_list_devices> are never changed."
2670 #: ../src/guestfs.pod:1327
2671 msgid "Is the string a parameter which is a device or partition name?"
2675 #: ../src/guestfs.pod:1331
2676 msgid "Does the string begin with C</dev/sd>?"
2680 #: ../src/guestfs.pod:1335
2682 "Does the named device exist? If so, we use that device. However if I<not> "
2683 "then we continue with this algorithm."
2687 #: ../src/guestfs.pod:1340
2688 msgid "Replace initial C</dev/sd> string with C</dev/hd>."
2692 #: ../src/guestfs.pod:1342
2693 msgid "For example, change C</dev/sda2> to C</dev/hda2>."
2697 #: ../src/guestfs.pod:1344
2698 msgid "If that named device exists, use it. If not, continue."
2702 #: ../src/guestfs.pod:1348
2703 msgid "Replace initial C</dev/sd> string with C</dev/vd>."
2707 #: ../src/guestfs.pod:1350
2708 msgid "If that named device exists, use it. If not, return an error."
2712 #: ../src/guestfs.pod:1354
2713 msgid "PORTABILITY CONCERNS"
2717 #: ../src/guestfs.pod:1356
2719 "Although the standard naming scheme and automatic translation is useful for "
2720 "simple programs and guestfish scripts, for larger programs it is best not to "
2721 "rely on this mechanism."
2725 #: ../src/guestfs.pod:1360
2727 "Where possible for maximum future portability programs using libguestfs "
2728 "should use these future-proof techniques:"
2732 #: ../src/guestfs.pod:1367
2734 "Use L</guestfs_list_devices> or L</guestfs_list_partitions> to list actual "
2735 "device names, and then use those names directly."
2739 #: ../src/guestfs.pod:1370
2741 "Since those device names exist by definition, they will never be translated."
2745 #: ../src/guestfs.pod:1375
2747 "Use higher level ways to identify filesystems, such as LVM names, UUIDs and "
2748 "filesystem labels."
2752 #: ../src/guestfs.pod:1380
2757 #: ../src/guestfs.pod:1382
2758 msgid "COMMUNICATION PROTOCOL"
2762 #: ../src/guestfs.pod:1384
2764 "Don't rely on using this protocol directly. This section documents how it "
2765 "currently works, but it may change at any time."
2769 #: ../src/guestfs.pod:1387
2771 "The protocol used to talk between the library and the daemon running inside "
2772 "the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
2773 "1014, RFC 1832, RFC 4506)."
2777 #: ../src/guestfs.pod:1391
2779 "The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
2780 "this file is automatically generated)."
2784 #: ../src/guestfs.pod:1394
2786 "There are two broad cases, ordinary functions that don't have any C<FileIn> "
2787 "and C<FileOut> parameters, which are handled with very simple request/reply "
2788 "messages. Then there are functions that have any C<FileIn> or C<FileOut> "
2789 "parameters, which use the same request and reply messages, but they may also "
2790 "be followed by files sent using a chunked encoding."
2794 #: ../src/guestfs.pod:1401
2795 msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
2799 #: ../src/guestfs.pod:1403
2800 msgid "For ordinary functions, the request message is:"
2804 #: ../src/guestfs.pod:1405
2807 " total length (header + arguments,\n"
2808 " but not including the length word itself)\n"
2809 " struct guestfs_message_header (encoded as XDR)\n"
2810 " struct guestfs_<foo>_args (encoded as XDR)\n"
2815 #: ../src/guestfs.pod:1410
2817 "The total length field allows the daemon to allocate a fixed size buffer "
2818 "into which it slurps the rest of the message. As a result, the total length "
2819 "is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the "
2820 "effective size of any request is limited to somewhere under this size."
2824 #: ../src/guestfs.pod:1416
2826 "Note also that many functions don't take any arguments, in which case the "
2827 "C<guestfs_I<foo>_args> is completely omitted."
2831 #: ../src/guestfs.pod:1419
2833 "The header contains the procedure number (C<guestfs_proc>) which is how the "
2834 "receiver knows what type of args structure to expect, or none at all."
2838 #: ../src/guestfs.pod:1423
2839 msgid "The reply message for ordinary functions is:"
2843 #: ../src/guestfs.pod:1425
2846 " total length (header + ret,\n"
2847 " but not including the length word itself)\n"
2848 " struct guestfs_message_header (encoded as XDR)\n"
2849 " struct guestfs_<foo>_ret (encoded as XDR)\n"
2854 #: ../src/guestfs.pod:1430
2856 "As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
2857 "functions that return no formal return values."
2861 #: ../src/guestfs.pod:1433
2863 "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
2867 #: ../src/guestfs.pod:1436
2869 "In the case of an error, a flag is set in the header, and the reply message "
2870 "is slightly changed:"
2874 #: ../src/guestfs.pod:1439
2877 " total length (header + error,\n"
2878 " but not including the length word itself)\n"
2879 " struct guestfs_message_header (encoded as XDR)\n"
2880 " struct guestfs_message_error (encoded as XDR)\n"
2885 #: ../src/guestfs.pod:1444
2887 "The C<guestfs_message_error> structure contains the error message as a "
2892 #: ../src/guestfs.pod:1447
2893 msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
2897 #: ../src/guestfs.pod:1449
2899 "A C<FileIn> parameter indicates that we transfer a file I<into> the guest. "
2900 "The normal request message is sent (see above). However this is followed by "
2901 "a sequence of file chunks."
2905 #: ../src/guestfs.pod:1453
2908 " total length (header + arguments,\n"
2909 " but not including the length word itself,\n"
2910 " and not including the chunks)\n"
2911 " struct guestfs_message_header (encoded as XDR)\n"
2912 " struct guestfs_<foo>_args (encoded as XDR)\n"
2913 " sequence of chunks for FileIn param #0\n"
2914 " sequence of chunks for FileIn param #1 etc.\n"
2919 #: ../src/guestfs.pod:1461
2920 msgid "The \"sequence of chunks\" is:"
2924 #: ../src/guestfs.pod:1463
2927 " length of chunk (not including length word itself)\n"
2928 " struct guestfs_chunk (encoded as XDR)\n"
2929 " length of chunk\n"
2930 " struct guestfs_chunk (encoded as XDR)\n"
2932 " length of chunk\n"
2933 " struct guestfs_chunk (with data.data_len == 0)\n"
2938 #: ../src/guestfs.pod:1471
2940 "The final chunk has the C<data_len> field set to zero. Additionally a flag "
2941 "is set in the final chunk to indicate either successful completion or early "
2946 #: ../src/guestfs.pod:1475
2948 "At time of writing there are no functions that have more than one FileIn "
2949 "parameter. However this is (theoretically) supported, by sending the "
2950 "sequence of chunks for each FileIn parameter one after another (from left to "
2955 #: ../src/guestfs.pod:1480
2957 "Both the library (sender) I<and> the daemon (receiver) may cancel the "
2958 "transfer. The library does this by sending a chunk with a special flag set "
2959 "to indicate cancellation. When the daemon sees this, it cancels the whole "
2960 "RPC, does I<not> send any reply, and goes back to reading the next request."
2964 #: ../src/guestfs.pod:1486
2966 "The daemon may also cancel. It does this by writing a special word "
2967 "C<GUESTFS_CANCEL_FLAG> to the socket. The library listens for this during "
2968 "the transfer, and if it gets it, it will cancel the transfer (it sends a "
2969 "cancel chunk). The special word is chosen so that even if cancellation "
2970 "happens right at the end of the transfer (after the library has finished "
2971 "writing and has started listening for the reply), the \"spurious\" cancel "
2972 "flag will not be confused with the reply message."
2976 #: ../src/guestfs.pod:1495
2978 "This protocol allows the transfer of arbitrary sized files (no 32 bit "
2979 "limit), and also files where the size is not known in advance (eg. from "
2980 "pipes or sockets). However the chunks are rather small "
2981 "(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need "
2982 "to keep much in memory."
2986 #: ../src/guestfs.pod:1501
2987 msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
2991 #: ../src/guestfs.pod:1503
2993 "The protocol for FileOut parameters is exactly the same as for FileIn "
2994 "parameters, but with the roles of daemon and library reversed."
2998 #: ../src/guestfs.pod:1506
3001 " total length (header + ret,\n"
3002 " but not including the length word itself,\n"
3003 " and not including the chunks)\n"
3004 " struct guestfs_message_header (encoded as XDR)\n"
3005 " struct guestfs_<foo>_ret (encoded as XDR)\n"
3006 " sequence of chunks for FileOut param #0\n"
3007 " sequence of chunks for FileOut param #1 etc.\n"
3012 #: ../src/guestfs.pod:1514
3013 msgid "INITIAL MESSAGE"
3017 #: ../src/guestfs.pod:1516
3019 "Because the underlying channel (QEmu -net channel) doesn't have any sort of "
3020 "connection control, when the daemon launches it sends an initial word "
3021 "(C<GUESTFS_LAUNCH_FLAG>) which indicates that the guest and daemon is "
3022 "alive. This is what L</guestfs_launch> waits for."
3026 #: ../src/guestfs.pod:1521
3027 msgid "MULTIPLE HANDLES AND MULTIPLE THREADS"
3031 #: ../src/guestfs.pod:1523
3033 "All high-level libguestfs actions are synchronous. If you want to use "
3034 "libguestfs asynchronously then you must create a thread."
3038 #: ../src/guestfs.pod:1526
3040 "Only use the handle from a single thread. Either use the handle exclusively "
3041 "from one thread, or provide your own mutex so that two threads cannot issue "
3042 "calls on the same handle at the same time."
3046 #: ../src/guestfs.pod:1530
3047 msgid "QEMU WRAPPERS"
3051 #: ../src/guestfs.pod:1532
3053 "If you want to compile your own qemu, run qemu from a non-standard location, "
3054 "or pass extra arguments to qemu, then you can write a shell-script wrapper "
3059 #: ../src/guestfs.pod:1536
3061 "There is one important rule to remember: you I<must C<exec qemu>> as the "
3062 "last command in the shell script (so that qemu replaces the shell and "
3063 "becomes the direct child of the libguestfs-using program). If you don't do "
3064 "this, then the qemu process won't be cleaned up correctly."
3068 #: ../src/guestfs.pod:1541
3070 "Here is an example of a wrapper, where I have built my own copy of qemu from "
3075 #: ../src/guestfs.pod:1544
3079 " qemudir=/home/rjones/d/qemu\n"
3080 " exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios \"$@\"\n"
3085 #: ../src/guestfs.pod:1548
3087 "Save this script as C</tmp/qemu.wrapper> (or wherever), C<chmod +x>, and "
3088 "then use it by setting the LIBGUESTFS_QEMU environment variable. For "
3093 #: ../src/guestfs.pod:1552
3096 " LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n"
3101 #: ../src/guestfs.pod:1554
3103 "Note that libguestfs also calls qemu with the -help and -version options in "
3104 "order to determine features."
3108 #: ../src/guestfs.pod:1557
3109 msgid "LIBGUESTFS VERSION NUMBERS"
3113 #: ../src/guestfs.pod:1559
3115 "Since April 2010, libguestfs has started to make separate development and "
3116 "stable releases, along with corresponding branches in our git repository. "
3117 "These separate releases can be identified by version number:"
3121 #: ../src/guestfs.pod:1564
3124 " even numbers for stable: 1.2.x, 1.4.x, ...\n"
3125 " .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
3131 " | `-------- sub-version\n"
3133 " `------ always '1' because we don't change the ABI\n"
3138 #: ../src/guestfs.pod:1575
3139 msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
3143 #: ../src/guestfs.pod:1577
3145 "As time passes we cherry pick fixes from the development branch and backport "
3146 "those into the stable branch, the effect being that the stable branch should "
3147 "get more stable and less buggy over time. So the stable releases are ideal "
3148 "for people who don't need new features but would just like the software to "
3153 #: ../src/guestfs.pod:1583
3154 msgid "Our criteria for backporting changes are:"
3158 #: ../src/guestfs.pod:1589
3160 "Documentation changes which don't affect any code are backported unless the "
3161 "documentation refers to a future feature which is not in stable."
3165 #: ../src/guestfs.pod:1595
3167 "Bug fixes which are not controversial, fix obvious problems, and have been "
3168 "well tested are backported."
3172 #: ../src/guestfs.pod:1600
3174 "Simple rearrangements of code which shouldn't affect how it works get "
3175 "backported. This is so that the code in the two branches doesn't get too "
3176 "far out of step, allowing us to backport future fixes more easily."
3180 #: ../src/guestfs.pod:1606
3182 "We I<don't> backport new features, new APIs, new tools etc, except in one "
3183 "exceptional case: the new feature is required in order to implement an "
3184 "important bug fix."
3188 #: ../src/guestfs.pod:1612
3190 "A new stable branch starts when we think the new features in development are "
3191 "substantial and compelling enough over the current stable branch to warrant "
3192 "it. When that happens we create new stable and development versions 1.N.0 "
3193 "and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so "
3194 "stable at this point, but by backporting fixes from development, that branch "
3195 "will stabilize over time."
3199 #: ../src/guestfs.pod:1620 ../fish/guestfish.pod:905
3200 #: ../test-tool/libguestfs-test-tool.pod:104 ../tools/virt-edit.pl:312
3201 #: ../tools/virt-rescue.pl:226
3202 msgid "ENVIRONMENT VARIABLES"
3206 #: ../src/guestfs.pod:1624 ../fish/guestfish.pod:925
3207 msgid "LIBGUESTFS_APPEND"
3211 #: ../src/guestfs.pod:1626 ../fish/guestfish.pod:927
3212 msgid "Pass additional options to the guest kernel."
3216 #: ../src/guestfs.pod:1628 ../fish/guestfish.pod:929
3217 msgid "LIBGUESTFS_DEBUG"
3221 #: ../src/guestfs.pod:1630
3223 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
3224 "effect as calling C<guestfs_set_verbose (g, 1)>."
3228 #: ../src/guestfs.pod:1633 ../fish/guestfish.pod:934
3229 msgid "LIBGUESTFS_MEMSIZE"
3233 #: ../src/guestfs.pod:1635 ../fish/guestfish.pod:936
3235 "Set the memory allocated to the qemu process, in megabytes. For example:"
3239 #: ../src/guestfs.pod:1638 ../fish/guestfish.pod:939
3242 " LIBGUESTFS_MEMSIZE=700\n"
3247 #: ../src/guestfs.pod:1640 ../fish/guestfish.pod:941
3248 msgid "LIBGUESTFS_PATH"
3252 #: ../src/guestfs.pod:1642
3254 "Set the path that libguestfs uses to search for kernel and initrd.img. See "
3255 "the discussion of paths in section PATH above."
3259 #: ../src/guestfs.pod:1645 ../fish/guestfish.pod:946
3260 msgid "LIBGUESTFS_QEMU"
3264 #: ../src/guestfs.pod:1647 ../fish/guestfish.pod:948
3266 "Set the default qemu binary that libguestfs uses. If not set, then the qemu "
3267 "which was found at compile time by the configure script is used."
3271 #: ../src/guestfs.pod:1651
3272 msgid "See also L</QEMU WRAPPERS> above."
3276 #: ../src/guestfs.pod:1653 ../fish/guestfish.pod:952
3277 msgid "LIBGUESTFS_TRACE"
3281 #: ../src/guestfs.pod:1655
3283 "Set C<LIBGUESTFS_TRACE=1> to enable command traces. This has the same "
3284 "effect as calling C<guestfs_set_trace (g, 1)>."
3288 #: ../src/guestfs.pod:1658 ../fish/guestfish.pod:961
3293 #: ../src/guestfs.pod:1660 ../fish/guestfish.pod:963
3294 msgid "Location of temporary directory, defaults to C</tmp>."
3298 #: ../src/guestfs.pod:1662 ../fish/guestfish.pod:965
3300 "If libguestfs was compiled to use the supermin appliance then each handle "
3301 "will require rather a large amount of space in this directory for short "
3302 "periods of time (~ 80 MB). You can use C<$TMPDIR> to configure another "
3303 "directory to use in case C</tmp> is not large enough."
3307 #: ../src/guestfs.pod:1670 ../fish/guestfish.pod:1023
3308 #: ../test-tool/libguestfs-test-tool.pod:109 ../fuse/guestmount.pod:178
3309 #: ../inspector/virt-inspector.pl:846 ../tools/virt-cat.pl:163
3310 #: ../tools/virt-df.pl:482 ../tools/virt-edit.pl:325
3311 #: ../tools/virt-list-filesystems.pl:191 ../tools/virt-list-partitions.pl:229
3312 #: ../tools/virt-ls.pl:210 ../tools/virt-make-fs.pl:527
3313 #: ../tools/virt-rescue.pl:231 ../tools/virt-resize.pl:1390
3314 #: ../tools/virt-tar.pl:257 ../tools/virt-win-reg.pl:461
3319 #: ../src/guestfs.pod:1672
3321 "L<guestfish(1)>, L<guestmount(1)>, L<virt-cat(1)>, L<virt-df(1)>, L<virt-edit"
3322 "(1)>, L<virt-inspector(1)>, L<virt-list-filesystems(1)>, L<virt-list-"
3323 "partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-"
3324 "tar(1)>, L<virt-win-reg(1)>, L<qemu(1)>, L<febootstrap(1)>, L<hivex(3)>, "
3325 "L<http://libguestfs.org/>."
3329 #: ../src/guestfs.pod:1690
3331 "Tools with a similar purpose: L<fdisk(8)>, L<parted(8)>, L<kpartx(8)>, L<lvm"
3332 "(8)>, L<disktype(1)>."
3336 #: ../src/guestfs.pod:1697 ../tools/virt-make-fs.pl:541
3337 #: ../tools/virt-win-reg.pl:476
3342 #: ../src/guestfs.pod:1699
3343 msgid "To get a list of bugs against libguestfs use this link:"
3347 #: ../src/guestfs.pod:1701
3349 "L<https://bugzilla.redhat.com/buglist.cgi?"
3350 "component=libguestfs&product=Virtualization+Tools>"
3354 #: ../src/guestfs.pod:1703
3355 msgid "To report a new bug against libguestfs use this link:"
3359 #: ../src/guestfs.pod:1705
3361 "L<https://bugzilla.redhat.com/enter_bug.cgi?"
3362 "component=libguestfs&product=Virtualization+Tools>"
3366 #: ../src/guestfs.pod:1707
3367 msgid "When reporting a bug, please check:"
3371 #: ../src/guestfs.pod:1713
3372 msgid "That the bug hasn't been reported already."
3376 #: ../src/guestfs.pod:1717
3377 msgid "That you are testing a recent version."
3381 #: ../src/guestfs.pod:1721
3382 msgid "Describe the bug accurately, and give a way to reproduce it."
3386 #: ../src/guestfs.pod:1725
3388 "Run libguestfs-test-tool and paste the B<complete, unedited> output into the "
3393 #: ../src/guestfs.pod:1730 ../fish/guestfish.pod:1039
3394 #: ../test-tool/libguestfs-test-tool.pod:115 ../fuse/guestmount.pod:189
3395 #: ../inspector/virt-inspector.pl:855
3400 #: ../src/guestfs.pod:1732 ../fish/guestfish.pod:1041
3401 #: ../test-tool/libguestfs-test-tool.pod:117 ../fuse/guestmount.pod:191
3402 msgid "Richard W.M. Jones (C<rjones at redhat dot com>)"
3406 #: ../src/guestfs.pod:1734 ../fish/guestfish.pod:1043
3407 #: ../test-tool/libguestfs-test-tool.pod:119 ../fuse/guestmount.pod:193
3408 #: ../inspector/virt-inspector.pl:861 ../tools/virt-cat.pl:177
3409 #: ../tools/virt-df.pl:495 ../tools/virt-edit.pl:341
3410 #: ../tools/virt-list-filesystems.pl:207 ../tools/virt-list-partitions.pl:244
3411 #: ../tools/virt-ls.pl:225 ../tools/virt-make-fs.pl:556
3412 #: ../tools/virt-rescue.pl:245 ../tools/virt-resize.pl:1411
3413 #: ../tools/virt-tar.pl:272 ../tools/virt-win-reg.pl:491
3418 #: ../src/guestfs.pod:1736 ../fish/guestfish.pod:1045
3419 msgid "Copyright (C) 2009-2010 Red Hat Inc. L<http://libguestfs.org/>"
3423 #: ../src/guestfs.pod:1739
3425 "This library is free software; you can redistribute it and/or modify it "
3426 "under the terms of the GNU Lesser General Public License as published by the "
3427 "Free Software Foundation; either version 2 of the License, or (at your "
3428 "option) any later version."
3432 #: ../src/guestfs.pod:1744
3434 "This library is distributed in the hope that it will be useful, but WITHOUT "
3435 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
3436 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License "
3441 #: ../src/guestfs.pod:1749
3443 "You should have received a copy of the GNU Lesser General Public License "
3444 "along with this library; if not, write to the Free Software Foundation, "
3445 "Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"
3449 #: ../src/guestfs-actions.pod:1
3450 msgid "guestfs_add_cdrom"
3454 #: ../src/guestfs-actions.pod:3
3457 " int guestfs_add_cdrom (guestfs_h *g,\n"
3458 "\t\tconst char *filename);\n"
3463 #: ../src/guestfs-actions.pod:6 ../fish/guestfish-actions.pod:5
3464 msgid "This function adds a virtual CD-ROM disk image to the guest."
3468 #: ../src/guestfs-actions.pod:8 ../fish/guestfish-actions.pod:7
3469 msgid "This is equivalent to the qemu parameter C<-cdrom filename>."
3473 #: ../src/guestfs-actions.pod:10 ../src/guestfs-actions.pod:1488
3474 #: ../fish/guestfish-actions.pod:9 ../fish/guestfish-actions.pod:1186
3479 #: ../src/guestfs-actions.pod:16
3481 "This call checks for the existence of C<filename>. This stops you from "
3482 "specifying other types of drive which are supported by qemu such as C<nbd:> "
3483 "and C<http:> URLs. To specify those, use the general C<guestfs_config> call "
3488 #: ../src/guestfs-actions.pod:23
3490 "If you just want to add an ISO file (often you use this as an efficient way "
3491 "to transfer large files into the guest), then you should probably use "
3492 "C<guestfs_add_drive_ro> instead."
3496 #: ../src/guestfs-actions.pod:29 ../src/guestfs-actions.pod:63
3497 #: ../src/guestfs-actions.pod:92 ../src/guestfs-actions.pod:103
3498 #: ../src/guestfs-actions.pod:114 ../src/guestfs-actions.pod:124
3499 #: ../src/guestfs-actions.pod:135 ../src/guestfs-actions.pod:238
3500 #: ../src/guestfs-actions.pod:255 ../src/guestfs-actions.pod:266
3501 #: ../src/guestfs-actions.pod:302 ../src/guestfs-actions.pod:324
3502 #: ../src/guestfs-actions.pod:339 ../src/guestfs-actions.pod:403
3503 #: ../src/guestfs-actions.pod:430 ../src/guestfs-actions.pod:441
3504 #: ../src/guestfs-actions.pod:453 ../src/guestfs-actions.pod:534
3505 #: ../src/guestfs-actions.pod:549 ../src/guestfs-actions.pod:560
3506 #: ../src/guestfs-actions.pod:571 ../src/guestfs-actions.pod:717
3507 #: ../src/guestfs-actions.pod:734 ../src/guestfs-actions.pod:749
3508 #: ../src/guestfs-actions.pod:824 ../src/guestfs-actions.pod:839
3509 #: ../src/guestfs-actions.pod:855 ../src/guestfs-actions.pod:866
3510 #: ../src/guestfs-actions.pod:883 ../src/guestfs-actions.pod:916
3511 #: ../src/guestfs-actions.pod:974 ../src/guestfs-actions.pod:996
3512 #: ../src/guestfs-actions.pod:1027 ../src/guestfs-actions.pod:1115
3513 #: ../src/guestfs-actions.pod:1146 ../src/guestfs-actions.pod:1346
3514 #: ../src/guestfs-actions.pod:1365 ../src/guestfs-actions.pod:1446
3515 #: ../src/guestfs-actions.pod:1794 ../src/guestfs-actions.pod:1917
3516 #: ../src/guestfs-actions.pod:1972 ../src/guestfs-actions.pod:2002
3517 #: ../src/guestfs-actions.pod:2349 ../src/guestfs-actions.pod:2361
3518 #: ../src/guestfs-actions.pod:2378 ../src/guestfs-actions.pod:2443
3519 #: ../src/guestfs-actions.pod:2454 ../src/guestfs-actions.pod:2464
3520 #: ../src/guestfs-actions.pod:2475 ../src/guestfs-actions.pod:2487
3521 #: ../src/guestfs-actions.pod:2517 ../src/guestfs-actions.pod:2581
3522 #: ../src/guestfs-actions.pod:2598 ../src/guestfs-actions.pod:2612
3523 #: ../src/guestfs-actions.pod:2632 ../src/guestfs-actions.pod:2652
3524 #: ../src/guestfs-actions.pod:2681 ../src/guestfs-actions.pod:2697
3525 #: ../src/guestfs-actions.pod:2713 ../src/guestfs-actions.pod:2725
3526 #: ../src/guestfs-actions.pod:2734 ../src/guestfs-actions.pod:2767
3527 #: ../src/guestfs-actions.pod:2780 ../src/guestfs-actions.pod:2790
3528 #: ../src/guestfs-actions.pod:2802 ../src/guestfs-actions.pod:2816
3529 #: ../src/guestfs-actions.pod:2896 ../src/guestfs-actions.pod:2913
3530 #: ../src/guestfs-actions.pod:2923 ../src/guestfs-actions.pod:2968
3531 #: ../src/guestfs-actions.pod:2983 ../src/guestfs-actions.pod:2998
3532 #: ../src/guestfs-actions.pod:3011 ../src/guestfs-actions.pod:3022
3533 #: ../src/guestfs-actions.pod:3033 ../src/guestfs-actions.pod:3047
3534 #: ../src/guestfs-actions.pod:3059 ../src/guestfs-actions.pod:3076
3535 #: ../src/guestfs-actions.pod:3107 ../src/guestfs-actions.pod:3135
3536 #: ../src/guestfs-actions.pod:3151 ../src/guestfs-actions.pod:3167
3537 #: ../src/guestfs-actions.pod:3176 ../src/guestfs-actions.pod:3190
3538 #: ../src/guestfs-actions.pod:3200 ../src/guestfs-actions.pod:3212
3539 #: ../src/guestfs-actions.pod:3224 ../src/guestfs-actions.pod:3256
3540 #: ../src/guestfs-actions.pod:3268 ../src/guestfs-actions.pod:3285
3541 #: ../src/guestfs-actions.pod:3296 ../src/guestfs-actions.pod:3310
3542 #: ../src/guestfs-actions.pod:3350 ../src/guestfs-actions.pod:3381
3543 #: ../src/guestfs-actions.pod:3392 ../src/guestfs-actions.pod:3417
3544 #: ../src/guestfs-actions.pod:3431 ../src/guestfs-actions.pod:3446
3545 #: ../src/guestfs-actions.pod:3568 ../src/guestfs-actions.pod:3620
3546 #: ../src/guestfs-actions.pod:3639 ../src/guestfs-actions.pod:3654
3547 #: ../src/guestfs-actions.pod:3665 ../src/guestfs-actions.pod:3699
3548 #: ../src/guestfs-actions.pod:3713 ../src/guestfs-actions.pod:3723
3549 #: ../src/guestfs-actions.pod:3734 ../src/guestfs-actions.pod:3966
3550 #: ../src/guestfs-actions.pod:3982 ../src/guestfs-actions.pod:3993
3551 #: ../src/guestfs-actions.pod:4002 ../src/guestfs-actions.pod:4013
3552 #: ../src/guestfs-actions.pod:4022 ../src/guestfs-actions.pod:4033
3553 #: ../src/guestfs-actions.pod:4046 ../src/guestfs-actions.pod:4064
3554 #: ../src/guestfs-actions.pod:4080 ../src/guestfs-actions.pod:4096
3555 #: ../src/guestfs-actions.pod:4111 ../src/guestfs-actions.pod:4131
3556 #: ../src/guestfs-actions.pod:4146 ../src/guestfs-actions.pod:4162
3557 #: ../src/guestfs-actions.pod:4180 ../src/guestfs-actions.pod:4196
3558 #: ../src/guestfs-actions.pod:4210 ../src/guestfs-actions.pod:4235
3559 #: ../src/guestfs-actions.pod:4256 ../src/guestfs-actions.pod:4272
3560 #: ../src/guestfs-actions.pod:4293 ../src/guestfs-actions.pod:4305
3561 #: ../src/guestfs-actions.pod:4317 ../src/guestfs-actions.pod:4333
3562 #: ../src/guestfs-actions.pod:4367 ../src/guestfs-actions.pod:4387
3563 #: ../src/guestfs-actions.pod:4410 ../src/guestfs-actions.pod:4500
3564 #: ../src/guestfs-actions.pod:4606 ../src/guestfs-actions.pod:4615
3565 #: ../src/guestfs-actions.pod:4625 ../src/guestfs-actions.pod:4635
3566 #: ../src/guestfs-actions.pod:4654 ../src/guestfs-actions.pod:4664
3567 #: ../src/guestfs-actions.pod:4674 ../src/guestfs-actions.pod:4684
3568 #: ../src/guestfs-actions.pod:4696 ../src/guestfs-actions.pod:4746
3569 #: ../src/guestfs-actions.pod:4760 ../src/guestfs-actions.pod:4773
3570 #: ../src/guestfs-actions.pod:4786 ../src/guestfs-actions.pod:4800
3571 #: ../src/guestfs-actions.pod:4810 ../src/guestfs-actions.pod:4827
3572 #: ../src/guestfs-actions.pod:4857 ../src/guestfs-actions.pod:4868
3573 #: ../src/guestfs-actions.pod:4903 ../src/guestfs-actions.pod:4913
3574 #: ../src/guestfs-actions.pod:4928 ../src/guestfs-actions.pod:4956
3575 #: ../src/guestfs-actions.pod:5060 ../src/guestfs-actions.pod:5075
3576 #: ../src/guestfs-actions.pod:5086 ../src/guestfs-actions.pod:5132
3577 #: ../src/guestfs-actions.pod:5142 ../src/guestfs-actions.pod:5179
3578 #: ../src/guestfs-actions.pod:5206 ../src/guestfs-actions.pod:5248
3579 #: ../src/guestfs-actions.pod:5271 ../src/guestfs-actions.pod:5328
3580 #: ../src/guestfs-actions.pod:5344 ../src/guestfs-actions.pod:5370
3581 msgid "This function returns 0 on success or -1 on error."
3585 #: ../src/guestfs-actions.pod:31
3586 msgid "guestfs_add_drive"
3590 #: ../src/guestfs-actions.pod:33
3593 " int guestfs_add_drive (guestfs_h *g,\n"
3594 "\t\tconst char *filename);\n"
3599 #: ../src/guestfs-actions.pod:36 ../fish/guestfish-actions.pod:32
3601 "This function adds a virtual machine disk image C<filename> to the guest. "
3602 "The first time you call this function, the disk appears as IDE disk 0 (C</"
3603 "dev/sda>) in the guest, the second time as C</dev/sdb>, and so on."
3607 #: ../src/guestfs-actions.pod:41 ../fish/guestfish-actions.pod:37
3609 "You don't necessarily need to be root when using libguestfs. However you "
3610 "obviously do need sufficient permissions to access the filename for whatever "
3611 "operations you want to perform (ie. read access if you just want to read the "
3612 "image or write access if you want to modify the image)."
3616 #: ../src/guestfs-actions.pod:47 ../fish/guestfish-actions.pod:43
3618 "This is equivalent to the qemu parameter C<-drive file=filename,cache=off,"
3623 #: ../src/guestfs-actions.pod:50 ../fish/guestfish-actions.pod:46
3625 "C<cache=off> is omitted in cases where it is not supported by the underlying "
3630 #: ../src/guestfs-actions.pod:53 ../src/guestfs-actions.pod:82
3632 "C<if=...> is set at compile time by the configuration option C<./configure --"
3633 "with-drive-if=...>. In the rare case where you might need to change this at "
3634 "run time, use C<guestfs_add_drive_with_if> or "
3635 "C<guestfs_add_drive_ro_with_if>."
3639 #: ../src/guestfs-actions.pod:58 ../src/guestfs-actions.pod:87
3641 "Note that this call checks for the existence of C<filename>. This stops you "
3642 "from specifying other types of drive which are supported by qemu such as "
3643 "C<nbd:> and C<http:> URLs. To specify those, use the general "
3644 "C<guestfs_config> call instead."
3648 #: ../src/guestfs-actions.pod:65
3649 msgid "guestfs_add_drive_ro"
3653 #: ../src/guestfs-actions.pod:67
3656 " int guestfs_add_drive_ro (guestfs_h *g,\n"
3657 "\t\tconst char *filename);\n"
3662 #: ../src/guestfs-actions.pod:70 ../fish/guestfish-actions.pod:63
3663 msgid "This adds a drive in snapshot mode, making it effectively read-only."
3667 #: ../src/guestfs-actions.pod:73 ../fish/guestfish-actions.pod:66
3669 "Note that writes to the device are allowed, and will be seen for the "
3670 "duration of the guestfs handle, but they are written to a temporary file "
3671 "which is discarded as soon as the guestfs handle is closed. We don't "
3672 "currently have any method to enable changes to be committed, although qemu "
3677 #: ../src/guestfs-actions.pod:79 ../fish/guestfish-actions.pod:72
3679 "This is equivalent to the qemu parameter C<-drive file=filename,snapshot=on,"
3684 #: ../src/guestfs-actions.pod:94
3685 msgid "guestfs_add_drive_ro_with_if"
3689 #: ../src/guestfs-actions.pod:96
3692 " int guestfs_add_drive_ro_with_if (guestfs_h *g,\n"
3693 "\t\tconst char *filename,\n"
3694 "\t\tconst char *iface);\n"
3699 #: ../src/guestfs-actions.pod:100
3701 "This is the same as C<guestfs_add_drive_ro> but it allows you to specify the "
3702 "QEMU interface emulation to use at run time."
3706 #: ../src/guestfs-actions.pod:105
3707 msgid "guestfs_add_drive_with_if"
3711 #: ../src/guestfs-actions.pod:107
3714 " int guestfs_add_drive_with_if (guestfs_h *g,\n"
3715 "\t\tconst char *filename,\n"
3716 "\t\tconst char *iface);\n"
3721 #: ../src/guestfs-actions.pod:111
3723 "This is the same as C<guestfs_add_drive> but it allows you to specify the "
3724 "QEMU interface emulation to use at run time."
3728 #: ../src/guestfs-actions.pod:116
3729 msgid "guestfs_aug_clear"
3733 #: ../src/guestfs-actions.pod:118
3736 " int guestfs_aug_clear (guestfs_h *g,\n"
3737 "\t\tconst char *augpath);\n"
3742 #: ../src/guestfs-actions.pod:121 ../fish/guestfish-actions.pod:103
3744 "Set the value associated with C<path> to C<NULL>. This is the same as the "
3745 "L<augtool(1)> C<clear> command."
3749 #: ../src/guestfs-actions.pod:126
3750 msgid "guestfs_aug_close"
3754 #: ../src/guestfs-actions.pod:128
3757 " int guestfs_aug_close (guestfs_h *g);\n"
3762 #: ../src/guestfs-actions.pod:130
3764 "Close the current Augeas handle and free up any resources used by it. After "
3765 "calling this, you have to call C<guestfs_aug_init> again before you can use "
3766 "any other Augeas functions."
3770 #: ../src/guestfs-actions.pod:137
3771 msgid "guestfs_aug_defnode"
3775 #: ../src/guestfs-actions.pod:139
3778 " struct guestfs_int_bool *guestfs_aug_defnode (guestfs_h *g,\n"
3779 "\t\tconst char *name,\n"
3780 "\t\tconst char *expr,\n"
3781 "\t\tconst char *val);\n"
3786 #: ../src/guestfs-actions.pod:144 ../fish/guestfish-actions.pod:119
3788 "Defines a variable C<name> whose value is the result of evaluating C<expr>."
3792 #: ../src/guestfs-actions.pod:147
3794 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
3795 "calling C<guestfs_aug_set> C<expr>, C<value>. C<name> will be the nodeset "
3796 "containing that single node."
3800 #: ../src/guestfs-actions.pod:151 ../fish/guestfish-actions.pod:126
3802 "On success this returns a pair containing the number of nodes in the "
3803 "nodeset, and a boolean flag if a node was created."
3807 #: ../src/guestfs-actions.pod:155
3809 "This function returns a C<struct guestfs_int_bool *>, or NULL if there was "
3810 "an error. I<The caller must call C<guestfs_free_int_bool> after use>."
3814 #: ../src/guestfs-actions.pod:159
3815 msgid "guestfs_aug_defvar"
3819 #: ../src/guestfs-actions.pod:161
3822 " int guestfs_aug_defvar (guestfs_h *g,\n"
3823 "\t\tconst char *name,\n"
3824 "\t\tconst char *expr);\n"
3829 #: ../src/guestfs-actions.pod:165 ../fish/guestfish-actions.pod:134
3831 "Defines an Augeas variable C<name> whose value is the result of evaluating "
3832 "C<expr>. If C<expr> is NULL, then C<name> is undefined."
3836 #: ../src/guestfs-actions.pod:169 ../fish/guestfish-actions.pod:138
3838 "On success this returns the number of nodes in C<expr>, or C<0> if C<expr> "
3839 "evaluates to something which is not a nodeset."
3843 #: ../src/guestfs-actions.pod:172 ../src/guestfs-actions.pod:313
3844 #: ../src/guestfs-actions.pod:467 ../src/guestfs-actions.pod:492
3845 #: ../src/guestfs-actions.pod:507 ../src/guestfs-actions.pod:523
3846 #: ../src/guestfs-actions.pod:1013 ../src/guestfs-actions.pod:1328
3847 #: ../src/guestfs-actions.pod:1510 ../src/guestfs-actions.pod:1591
3848 #: ../src/guestfs-actions.pod:1622 ../src/guestfs-actions.pod:1665
3849 #: ../src/guestfs-actions.pod:1682 ../src/guestfs-actions.pod:1907
3850 #: ../src/guestfs-actions.pod:2119 ../src/guestfs-actions.pod:2137
3851 #: ../src/guestfs-actions.pod:3370 ../src/guestfs-actions.pod:3477
3852 #: ../src/guestfs-actions.pod:3793 ../src/guestfs-actions.pod:4892
3853 #: ../src/guestfs-actions.pod:5216 ../src/guestfs-actions.pod:5226
3854 #: ../src/guestfs-actions.pod:5236
3855 msgid "On error this function returns -1."
3859 #: ../src/guestfs-actions.pod:174
3860 msgid "guestfs_aug_get"
3864 #: ../src/guestfs-actions.pod:176
3867 " char *guestfs_aug_get (guestfs_h *g,\n"
3868 "\t\tconst char *augpath);\n"
3873 #: ../src/guestfs-actions.pod:179 ../fish/guestfish-actions.pod:145
3875 "Look up the value associated with C<path>. If C<path> matches exactly one "
3876 "node, the C<value> is returned."
3880 #: ../src/guestfs-actions.pod:182 ../src/guestfs-actions.pod:610
3881 #: ../src/guestfs-actions.pod:625 ../src/guestfs-actions.pod:682
3882 #: ../src/guestfs-actions.pod:695 ../src/guestfs-actions.pod:786
3883 #: ../src/guestfs-actions.pod:899 ../src/guestfs-actions.pod:928
3884 #: ../src/guestfs-actions.pod:942 ../src/guestfs-actions.pod:958
3885 #: ../src/guestfs-actions.pod:1041 ../src/guestfs-actions.pod:1205
3886 #: ../src/guestfs-actions.pod:1314 ../src/guestfs-actions.pod:1459
3887 #: ../src/guestfs-actions.pod:1473 ../src/guestfs-actions.pod:1549
3888 #: ../src/guestfs-actions.pod:1567 ../src/guestfs-actions.pod:1701
3889 #: ../src/guestfs-actions.pod:1840 ../src/guestfs-actions.pod:2021
3890 #: ../src/guestfs-actions.pod:2071 ../src/guestfs-actions.pod:2187
3891 #: ../src/guestfs-actions.pod:2222 ../src/guestfs-actions.pod:2432
3892 #: ../src/guestfs-actions.pod:2853 ../src/guestfs-actions.pod:2949
3893 #: ../src/guestfs-actions.pod:3492 ../src/guestfs-actions.pod:3771
3894 #: ../src/guestfs-actions.pod:3909 ../src/guestfs-actions.pod:3952
3895 #: ../src/guestfs-actions.pod:4428 ../src/guestfs-actions.pod:4441
3896 #: ../src/guestfs-actions.pod:4455 ../src/guestfs-actions.pod:4476
3897 #: ../src/guestfs-actions.pod:5009 ../src/guestfs-actions.pod:5025
3898 #: ../src/guestfs-actions.pod:5040 ../src/guestfs-actions.pod:5188
3899 #: ../src/guestfs-actions.pod:5418
3901 "This function returns a string, or NULL on error. I<The caller must free "
3902 "the returned string after use>."
3906 #: ../src/guestfs-actions.pod:185
3907 msgid "guestfs_aug_init"
3911 #: ../src/guestfs-actions.pod:187
3914 " int guestfs_aug_init (guestfs_h *g,\n"
3915 "\t\tconst char *root,\n"
3921 #: ../src/guestfs-actions.pod:191 ../fish/guestfish-actions.pod:152
3923 "Create a new Augeas handle for editing configuration files. If there was "
3924 "any previous Augeas handle associated with this guestfs session, then it is "
3929 #: ../src/guestfs-actions.pod:195
3930 msgid "You must call this before using any other C<guestfs_aug_*> commands."
3934 #: ../src/guestfs-actions.pod:198 ../fish/guestfish-actions.pod:159
3936 "C<root> is the filesystem root. C<root> must not be NULL, use C</> instead."
3940 #: ../src/guestfs-actions.pod:201 ../fish/guestfish-actions.pod:162
3942 "The flags are the same as the flags defined in E<lt>augeas.hE<gt>, the "
3943 "logical I<or> of the following integers:"
3947 #: ../src/guestfs-actions.pod:207 ../fish/guestfish-actions.pod:168
3948 msgid "C<AUG_SAVE_BACKUP> = 1"
3952 #: ../src/guestfs-actions.pod:209 ../fish/guestfish-actions.pod:170
3953 msgid "Keep the original file with a C<.augsave> extension."
3957 #: ../src/guestfs-actions.pod:211 ../fish/guestfish-actions.pod:172
3958 msgid "C<AUG_SAVE_NEWFILE> = 2"
3962 #: ../src/guestfs-actions.pod:213 ../fish/guestfish-actions.pod:174
3964 "Save changes into a file with extension C<.augnew>, and do not overwrite "
3965 "original. Overrides C<AUG_SAVE_BACKUP>."
3969 #: ../src/guestfs-actions.pod:216 ../fish/guestfish-actions.pod:177
3970 msgid "C<AUG_TYPE_CHECK> = 4"
3974 #: ../src/guestfs-actions.pod:218 ../fish/guestfish-actions.pod:179
3975 msgid "Typecheck lenses (can be expensive)."
3979 #: ../src/guestfs-actions.pod:220 ../fish/guestfish-actions.pod:181
3980 msgid "C<AUG_NO_STDINC> = 8"
3984 #: ../src/guestfs-actions.pod:222 ../fish/guestfish-actions.pod:183
3985 msgid "Do not use standard load path for modules."
3989 #: ../src/guestfs-actions.pod:224 ../fish/guestfish-actions.pod:185
3990 msgid "C<AUG_SAVE_NOOP> = 16"
3994 #: ../src/guestfs-actions.pod:226 ../fish/guestfish-actions.pod:187
3995 msgid "Make save a no-op, just record what would have been changed."
3999 #: ../src/guestfs-actions.pod:228 ../fish/guestfish-actions.pod:189
4000 msgid "C<AUG_NO_LOAD> = 32"
4004 #: ../src/guestfs-actions.pod:230
4005 msgid "Do not load the tree in C<guestfs_aug_init>."
4009 #: ../src/guestfs-actions.pod:234
4010 msgid "To close the handle, you can call C<guestfs_aug_close>."
4014 #: ../src/guestfs-actions.pod:236 ../fish/guestfish-actions.pod:197
4015 msgid "To find out more about Augeas, see L<http://augeas.net/>."
4019 #: ../src/guestfs-actions.pod:240
4020 msgid "guestfs_aug_insert"
4024 #: ../src/guestfs-actions.pod:242
4027 " int guestfs_aug_insert (guestfs_h *g,\n"
4028 "\t\tconst char *augpath,\n"
4029 "\t\tconst char *label,\n"
4030 "\t\tint before);\n"
4035 #: ../src/guestfs-actions.pod:247 ../fish/guestfish-actions.pod:203
4037 "Create a new sibling C<label> for C<path>, inserting it into the tree before "
4038 "or after C<path> (depending on the boolean flag C<before>)."
4042 #: ../src/guestfs-actions.pod:251 ../fish/guestfish-actions.pod:207
4044 "C<path> must match exactly one existing node in the tree, and C<label> must "
4045 "be a label, ie. not contain C</>, C<*> or end with a bracketed index C<[N]>."
4049 #: ../src/guestfs-actions.pod:257
4050 msgid "guestfs_aug_load"
4054 #: ../src/guestfs-actions.pod:259
4057 " int guestfs_aug_load (guestfs_h *g);\n"
4062 #: ../src/guestfs-actions.pod:261 ../fish/guestfish-actions.pod:215
4063 msgid "Load files into the tree."
4067 #: ../src/guestfs-actions.pod:263 ../fish/guestfish-actions.pod:217
4068 msgid "See C<aug_load> in the Augeas documentation for the full gory details."
4072 #: ../src/guestfs-actions.pod:268
4073 msgid "guestfs_aug_ls"
4077 #: ../src/guestfs-actions.pod:270
4080 " char **guestfs_aug_ls (guestfs_h *g,\n"
4081 "\t\tconst char *augpath);\n"
4086 #: ../src/guestfs-actions.pod:273
4088 "This is just a shortcut for listing C<guestfs_aug_match> C<path/*> and "
4089 "sorting the resulting nodes into alphabetical order."
4093 #: ../src/guestfs-actions.pod:276 ../src/guestfs-actions.pod:289
4094 #: ../src/guestfs-actions.pod:417 ../src/guestfs-actions.pod:802
4095 #: ../src/guestfs-actions.pod:1053 ../src/guestfs-actions.pod:1069
4096 #: ../src/guestfs-actions.pod:1157 ../src/guestfs-actions.pod:1173
4097 #: ../src/guestfs-actions.pod:1404 ../src/guestfs-actions.pod:1738
4098 #: ../src/guestfs-actions.pod:1751 ../src/guestfs-actions.pod:1767
4099 #: ../src/guestfs-actions.pod:1804 ../src/guestfs-actions.pod:1825
4100 #: ../src/guestfs-actions.pod:1887 ../src/guestfs-actions.pod:1927
4101 #: ../src/guestfs-actions.pod:2093 ../src/guestfs-actions.pod:2259
4102 #: ../src/guestfs-actions.pod:2402 ../src/guestfs-actions.pod:2417
4103 #: ../src/guestfs-actions.pod:2501 ../src/guestfs-actions.pod:2830
4104 #: ../src/guestfs-actions.pod:3337 ../src/guestfs-actions.pod:3748
4105 #: ../src/guestfs-actions.pod:3834 ../src/guestfs-actions.pod:3940
4106 #: ../src/guestfs-actions.pod:4489 ../src/guestfs-actions.pod:4538
4107 #: ../src/guestfs-actions.pod:4590 ../src/guestfs-actions.pod:4706
4108 #: ../src/guestfs-actions.pod:4727 ../src/guestfs-actions.pod:5101
4109 #: ../src/guestfs-actions.pod:5118 ../src/guestfs-actions.pod:5156
4110 #: ../src/guestfs-actions.pod:5292 ../src/guestfs-actions.pod:5308
4111 #: ../src/guestfs-actions.pod:5381 ../src/guestfs-actions.pod:5397
4112 #: ../src/guestfs-actions.pod:5437 ../src/guestfs-actions.pod:5453
4114 "This function returns a NULL-terminated array of strings (like L<environ(3)"
4115 ">), or NULL if there was an error. I<The caller must free the strings and "
4116 "the array after use>."
4120 #: ../src/guestfs-actions.pod:280
4121 msgid "guestfs_aug_match"
4125 #: ../src/guestfs-actions.pod:282
4128 " char **guestfs_aug_match (guestfs_h *g,\n"
4129 "\t\tconst char *augpath);\n"
4134 #: ../src/guestfs-actions.pod:285 ../fish/guestfish-actions.pod:231
4136 "Returns a list of paths which match the path expression C<path>. The "
4137 "returned paths are sufficiently qualified so that they match exactly one "
4138 "node in the current tree."
4142 #: ../src/guestfs-actions.pod:293
4143 msgid "guestfs_aug_mv"
4147 #: ../src/guestfs-actions.pod:295
4150 " int guestfs_aug_mv (guestfs_h *g,\n"
4151 "\t\tconst char *src,\n"
4152 "\t\tconst char *dest);\n"
4157 #: ../src/guestfs-actions.pod:299 ../fish/guestfish-actions.pod:239
4159 "Move the node C<src> to C<dest>. C<src> must match exactly one node. "
4160 "C<dest> is overwritten if it exists."
4164 #: ../src/guestfs-actions.pod:304
4165 msgid "guestfs_aug_rm"
4169 #: ../src/guestfs-actions.pod:306
4172 " int guestfs_aug_rm (guestfs_h *g,\n"
4173 "\t\tconst char *augpath);\n"
4178 #: ../src/guestfs-actions.pod:309 ../fish/guestfish-actions.pod:246
4179 msgid "Remove C<path> and all of its children."
4183 #: ../src/guestfs-actions.pod:311 ../fish/guestfish-actions.pod:248
4184 msgid "On success this returns the number of entries which were removed."
4188 #: ../src/guestfs-actions.pod:315
4189 msgid "guestfs_aug_save"
4193 #: ../src/guestfs-actions.pod:317
4196 " int guestfs_aug_save (guestfs_h *g);\n"
4201 #: ../src/guestfs-actions.pod:319 ../fish/guestfish-actions.pod:254
4202 msgid "This writes all pending changes to disk."
4206 #: ../src/guestfs-actions.pod:321
4208 "The flags which were passed to C<guestfs_aug_init> affect exactly how files "
4213 #: ../src/guestfs-actions.pod:326
4214 msgid "guestfs_aug_set"
4218 #: ../src/guestfs-actions.pod:328
4221 " int guestfs_aug_set (guestfs_h *g,\n"
4222 "\t\tconst char *augpath,\n"
4223 "\t\tconst char *val);\n"
4228 #: ../src/guestfs-actions.pod:332 ../fish/guestfish-actions.pod:263
4229 msgid "Set the value associated with C<path> to C<val>."
4233 #: ../src/guestfs-actions.pod:334
4235 "In the Augeas API, it is possible to clear a node by setting the value to "
4236 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
4237 "this call. Instead you must use the C<guestfs_aug_clear> call."
4241 #: ../src/guestfs-actions.pod:341
4242 msgid "guestfs_available"
4246 #: ../src/guestfs-actions.pod:343
4249 " int guestfs_available (guestfs_h *g,\n"
4250 "\t\tchar *const *groups);\n"
4255 #: ../src/guestfs-actions.pod:346 ../fish/guestfish-actions.pod:274
4257 "This command is used to check the availability of some groups of "
4258 "functionality in the appliance, which not all builds of the libguestfs "
4259 "appliance will be able to provide."
4263 #: ../src/guestfs-actions.pod:350
4265 "The libguestfs groups, and the functions that those groups correspond to, "
4266 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
4267 "runtime by calling C<guestfs_available_all_groups>."
4271 #: ../src/guestfs-actions.pod:355 ../fish/guestfish-actions.pod:283
4273 "The argument C<groups> is a list of group names, eg: C<[\"inotify\", \"augeas"
4274 "\"]> would check for the availability of the Linux inotify functions and "
4275 "Augeas (configuration file editing) functions."
4279 #: ../src/guestfs-actions.pod:360 ../fish/guestfish-actions.pod:288
4280 msgid "The command returns no error if I<all> requested groups are available."
4284 #: ../src/guestfs-actions.pod:362 ../fish/guestfish-actions.pod:290
4286 "It fails with an error if one or more of the requested groups is unavailable "
4291 #: ../src/guestfs-actions.pod:365 ../fish/guestfish-actions.pod:293
4293 "If an unknown group name is included in the list of groups then an error is "
4298 #: ../src/guestfs-actions.pod:368 ../fish/guestfish-actions.pod:296
4303 #: ../src/guestfs-actions.pod:374
4304 msgid "You must call C<guestfs_launch> before calling this function."
4308 #: ../src/guestfs-actions.pod:376 ../fish/guestfish-actions.pod:304
4310 "The reason is because we don't know what groups are supported by the "
4311 "appliance/daemon until it is running and can be queried."
4315 #: ../src/guestfs-actions.pod:382 ../fish/guestfish-actions.pod:310
4317 "If a group of functions is available, this does not necessarily mean that "
4318 "they will work. You still have to check for errors when calling individual "
4319 "API functions even if they are available."
4323 #: ../src/guestfs-actions.pod:389 ../fish/guestfish-actions.pod:317
4325 "It is usually the job of distro packagers to build complete functionality "
4326 "into the libguestfs appliance. Upstream libguestfs, if built from source "
4327 "with all requirements satisfied, will support everything."
4331 #: ../src/guestfs-actions.pod:396
4333 "This call was added in version C<1.0.80>. In previous versions of "
4334 "libguestfs all you could do would be to speculatively execute a command to "
4335 "find out if the daemon implemented it. See also C<guestfs_version>."
4339 #: ../src/guestfs-actions.pod:405
4340 msgid "guestfs_available_all_groups"
4344 #: ../src/guestfs-actions.pod:407
4347 " char **guestfs_available_all_groups (guestfs_h *g);\n"
4352 #: ../src/guestfs-actions.pod:409
4354 "This command returns a list of all optional groups that this daemon knows "
4355 "about. Note this returns both supported and unsupported groups. To find "
4356 "out which ones the daemon can actually support you have to call "
4357 "C<guestfs_available> on each member of the returned list."
4361 #: ../src/guestfs-actions.pod:415
4362 msgid "See also C<guestfs_available> and L<guestfs(3)/AVAILABILITY>."
4366 #: ../src/guestfs-actions.pod:421
4367 msgid "guestfs_base64_in"
4371 #: ../src/guestfs-actions.pod:423
4374 " int guestfs_base64_in (guestfs_h *g,\n"
4375 "\t\tconst char *base64file,\n"
4376 "\t\tconst char *filename);\n"
4381 #: ../src/guestfs-actions.pod:427 ../fish/guestfish-actions.pod:347
4383 "This command uploads base64-encoded data from C<base64file> to C<filename>."
4387 #: ../src/guestfs-actions.pod:432
4388 msgid "guestfs_base64_out"
4392 #: ../src/guestfs-actions.pod:434
4395 " int guestfs_base64_out (guestfs_h *g,\n"
4396 "\t\tconst char *filename,\n"
4397 "\t\tconst char *base64file);\n"
4402 #: ../src/guestfs-actions.pod:438 ../fish/guestfish-actions.pod:356
4404 "This command downloads the contents of C<filename>, writing it out to local "
4405 "file C<base64file> encoded as base64."
4409 #: ../src/guestfs-actions.pod:443
4410 msgid "guestfs_blockdev_flushbufs"
4414 #: ../src/guestfs-actions.pod:445
4417 " int guestfs_blockdev_flushbufs (guestfs_h *g,\n"
4418 "\t\tconst char *device);\n"
4423 #: ../src/guestfs-actions.pod:448 ../fish/guestfish-actions.pod:365
4425 "This tells the kernel to flush internal buffers associated with C<device>."
4429 #: ../src/guestfs-actions.pod:451 ../src/guestfs-actions.pod:465
4430 #: ../src/guestfs-actions.pod:477 ../src/guestfs-actions.pod:490
4431 #: ../src/guestfs-actions.pod:505 ../src/guestfs-actions.pod:521
4432 #: ../src/guestfs-actions.pod:532 ../src/guestfs-actions.pod:547
4433 #: ../src/guestfs-actions.pod:558 ../src/guestfs-actions.pod:569
4434 #: ../fish/guestfish-actions.pod:368 ../fish/guestfish-actions.pod:379
4435 #: ../fish/guestfish-actions.pod:388 ../fish/guestfish-actions.pod:398
4436 #: ../fish/guestfish-actions.pod:410 ../fish/guestfish-actions.pod:423
4437 #: ../fish/guestfish-actions.pod:431 ../fish/guestfish-actions.pod:442
4438 #: ../fish/guestfish-actions.pod:450 ../fish/guestfish-actions.pod:458
4439 msgid "This uses the L<blockdev(8)> command."
4443 #: ../src/guestfs-actions.pod:455
4444 msgid "guestfs_blockdev_getbsz"
4448 #: ../src/guestfs-actions.pod:457
4451 " int guestfs_blockdev_getbsz (guestfs_h *g,\n"
4452 "\t\tconst char *device);\n"
4457 #: ../src/guestfs-actions.pod:460 ../fish/guestfish-actions.pod:374
4458 msgid "This returns the block size of a device."
4462 #: ../src/guestfs-actions.pod:462 ../src/guestfs-actions.pod:544
4463 #: ../fish/guestfish-actions.pod:376 ../fish/guestfish-actions.pod:439
4465 "(Note this is different from both I<size in blocks> and I<filesystem block "
4470 #: ../src/guestfs-actions.pod:469
4471 msgid "guestfs_blockdev_getro"
4475 #: ../src/guestfs-actions.pod:471
4478 " int guestfs_blockdev_getro (guestfs_h *g,\n"
4479 "\t\tconst char *device);\n"
4484 #: ../src/guestfs-actions.pod:474 ../fish/guestfish-actions.pod:385
4486 "Returns a boolean indicating if the block device is read-only (true if read-"
4487 "only, false if not)."
4491 #: ../src/guestfs-actions.pod:479 ../src/guestfs-actions.pod:1087
4492 #: ../src/guestfs-actions.pod:1099 ../src/guestfs-actions.pod:1531
4493 #: ../src/guestfs-actions.pod:1539 ../src/guestfs-actions.pod:1599
4494 #: ../src/guestfs-actions.pod:1642 ../src/guestfs-actions.pod:1654
4495 #: ../src/guestfs-actions.pod:1673 ../src/guestfs-actions.pod:1690
4496 #: ../src/guestfs-actions.pod:2272 ../src/guestfs-actions.pod:2283
4497 #: ../src/guestfs-actions.pod:2296 ../src/guestfs-actions.pod:2309
4498 #: ../src/guestfs-actions.pod:2320 ../src/guestfs-actions.pod:2330
4499 #: ../src/guestfs-actions.pod:2341 ../src/guestfs-actions.pod:3462
4500 msgid "This function returns a C truth value on success or -1 on error."
4504 #: ../src/guestfs-actions.pod:481
4505 msgid "guestfs_blockdev_getsize64"
4509 #: ../src/guestfs-actions.pod:483
4512 " int64_t guestfs_blockdev_getsize64 (guestfs_h *g,\n"
4513 "\t\tconst char *device);\n"
4518 #: ../src/guestfs-actions.pod:486 ../fish/guestfish-actions.pod:394
4519 msgid "This returns the size of the device in bytes."
4523 #: ../src/guestfs-actions.pod:488
4524 msgid "See also C<guestfs_blockdev_getsz>."
4528 #: ../src/guestfs-actions.pod:494
4529 msgid "guestfs_blockdev_getss"
4533 #: ../src/guestfs-actions.pod:496
4536 " int guestfs_blockdev_getss (guestfs_h *g,\n"
4537 "\t\tconst char *device);\n"
4542 #: ../src/guestfs-actions.pod:499 ../fish/guestfish-actions.pod:404
4544 "This returns the size of sectors on a block device. Usually 512, but can be "
4545 "larger for modern devices."
4549 #: ../src/guestfs-actions.pod:502
4551 "(Note, this is not the size in sectors, use C<guestfs_blockdev_getsz> for "
4556 #: ../src/guestfs-actions.pod:509
4557 msgid "guestfs_blockdev_getsz"
4561 #: ../src/guestfs-actions.pod:511
4564 " int64_t guestfs_blockdev_getsz (guestfs_h *g,\n"
4565 "\t\tconst char *device);\n"
4570 #: ../src/guestfs-actions.pod:514 ../fish/guestfish-actions.pod:416
4572 "This returns the size of the device in units of 512-byte sectors (even if "
4573 "the sectorsize isn't 512 bytes ... weird)."
4577 #: ../src/guestfs-actions.pod:517
4579 "See also C<guestfs_blockdev_getss> for the real sector size of the device, "
4580 "and C<guestfs_blockdev_getsize64> for the more useful I<size in bytes>."
4584 #: ../src/guestfs-actions.pod:525
4585 msgid "guestfs_blockdev_rereadpt"
4589 #: ../src/guestfs-actions.pod:527
4592 " int guestfs_blockdev_rereadpt (guestfs_h *g,\n"
4593 "\t\tconst char *device);\n"
4598 #: ../src/guestfs-actions.pod:530 ../fish/guestfish-actions.pod:429
4599 msgid "Reread the partition table on C<device>."
4603 #: ../src/guestfs-actions.pod:536
4604 msgid "guestfs_blockdev_setbsz"
4608 #: ../src/guestfs-actions.pod:538
4611 " int guestfs_blockdev_setbsz (guestfs_h *g,\n"
4612 "\t\tconst char *device,\n"
4613 "\t\tint blocksize);\n"
4618 #: ../src/guestfs-actions.pod:542 ../fish/guestfish-actions.pod:437
4619 msgid "This sets the block size of a device."
4623 #: ../src/guestfs-actions.pod:551
4624 msgid "guestfs_blockdev_setro"
4628 #: ../src/guestfs-actions.pod:553
4631 " int guestfs_blockdev_setro (guestfs_h *g,\n"
4632 "\t\tconst char *device);\n"
4637 #: ../src/guestfs-actions.pod:556 ../fish/guestfish-actions.pod:448
4638 msgid "Sets the block device named C<device> to read-only."
4642 #: ../src/guestfs-actions.pod:562
4643 msgid "guestfs_blockdev_setrw"
4647 #: ../src/guestfs-actions.pod:564
4650 " int guestfs_blockdev_setrw (guestfs_h *g,\n"
4651 "\t\tconst char *device);\n"
4656 #: ../src/guestfs-actions.pod:567 ../fish/guestfish-actions.pod:456
4657 msgid "Sets the block device named C<device> to read-write."
4661 #: ../src/guestfs-actions.pod:573
4662 msgid "guestfs_case_sensitive_path"
4666 #: ../src/guestfs-actions.pod:575
4669 " char *guestfs_case_sensitive_path (guestfs_h *g,\n"
4670 "\t\tconst char *path);\n"
4675 #: ../src/guestfs-actions.pod:578 ../fish/guestfish-actions.pod:464
4677 "This can be used to resolve case insensitive paths on a filesystem which is "
4678 "case sensitive. The use case is to resolve paths which you have read from "
4679 "Windows configuration files or the Windows Registry, to the true path."
4683 #: ../src/guestfs-actions.pod:583 ../fish/guestfish-actions.pod:469
4685 "The command handles a peculiarity of the Linux ntfs-3g filesystem driver "
4686 "(and probably others), which is that although the underlying filesystem is "
4687 "case-insensitive, the driver exports the filesystem to Linux as case-"
4692 #: ../src/guestfs-actions.pod:588 ../fish/guestfish-actions.pod:474
4694 "One consequence of this is that special directories such as C<c:\\windows> "
4695 "may appear as C</WINDOWS> or C</windows> (or other things) depending on the "
4696 "precise details of how they were created. In Windows itself this would not "
4701 #: ../src/guestfs-actions.pod:594 ../fish/guestfish-actions.pod:480
4703 "Bug or feature? You decide: L<http://www.tuxera.com/community/ntfs-3g-faq/"
4708 #: ../src/guestfs-actions.pod:597 ../fish/guestfish-actions.pod:483
4710 "This function resolves the true case of each element in the path and returns "
4711 "the case-sensitive path."
4715 #: ../src/guestfs-actions.pod:600
4717 "Thus C<guestfs_case_sensitive_path> (\"/Windows/System32\") might return C<"
4718 "\"/WINDOWS/system32\"> (the exact return value would depend on details of "
4719 "how the directories were originally created under Windows)."
4723 #: ../src/guestfs-actions.pod:605 ../fish/guestfish-actions.pod:491
4724 msgid "I<Note>: This function does not handle drive names, backslashes etc."
4728 #: ../src/guestfs-actions.pod:608
4729 msgid "See also C<guestfs_realpath>."
4733 #: ../src/guestfs-actions.pod:613
4738 #: ../src/guestfs-actions.pod:615
4741 " char *guestfs_cat (guestfs_h *g,\n"
4742 "\t\tconst char *path);\n"
4747 #: ../src/guestfs-actions.pod:618 ../src/guestfs-actions.pod:3824
4748 #: ../fish/guestfish-actions.pod:500 ../fish/guestfish-actions.pod:2944
4749 msgid "Return the contents of the file named C<path>."
4753 #: ../src/guestfs-actions.pod:620
4755 "Note that this function cannot correctly handle binary files (specifically, "
4756 "files containing C<\\0> character which is treated as end of string). For "
4757 "those you need to use the C<guestfs_read_file> or C<guestfs_download> "
4758 "functions which have a more complex interface."
4762 #: ../src/guestfs-actions.pod:628 ../src/guestfs-actions.pod:789
4763 #: ../src/guestfs-actions.pod:806 ../src/guestfs-actions.pod:1057
4764 #: ../src/guestfs-actions.pod:1073 ../src/guestfs-actions.pod:1161
4765 #: ../src/guestfs-actions.pod:1177 ../src/guestfs-actions.pod:1408
4766 #: ../src/guestfs-actions.pod:1755 ../src/guestfs-actions.pod:1771
4767 #: ../src/guestfs-actions.pod:1808 ../src/guestfs-actions.pod:1829
4768 #: ../src/guestfs-actions.pod:1843 ../src/guestfs-actions.pod:1869
4769 #: ../src/guestfs-actions.pod:3687 ../src/guestfs-actions.pod:3795
4770 #: ../src/guestfs-actions.pod:3816 ../src/guestfs-actions.pod:4542
4771 #: ../src/guestfs-actions.pod:4594 ../src/guestfs-actions.pod:4710
4772 #: ../src/guestfs-actions.pod:4731 ../src/guestfs-actions.pod:5250
4773 #: ../src/guestfs-actions.pod:5273 ../src/guestfs-actions.pod:5296
4774 #: ../src/guestfs-actions.pod:5312 ../src/guestfs-actions.pod:5385
4775 #: ../src/guestfs-actions.pod:5401 ../src/guestfs-actions.pod:5441
4776 #: ../src/guestfs-actions.pod:5457 ../fish/guestfish-actions.pod:507
4777 #: ../fish/guestfish-actions.pod:642 ../fish/guestfish-actions.pod:654
4778 #: ../fish/guestfish-actions.pod:836 ../fish/guestfish-actions.pod:846
4779 #: ../fish/guestfish-actions.pod:913 ../fish/guestfish-actions.pod:923
4780 #: ../fish/guestfish-actions.pod:1118 ../fish/guestfish-actions.pod:1391
4781 #: ../fish/guestfish-actions.pod:1401 ../fish/guestfish-actions.pod:1429
4782 #: ../fish/guestfish-actions.pod:1444 ../fish/guestfish-actions.pod:1454
4783 #: ../fish/guestfish-actions.pod:1473 ../fish/guestfish-actions.pod:2846
4784 #: ../fish/guestfish-actions.pod:2922 ../fish/guestfish-actions.pod:2937
4785 #: ../fish/guestfish-actions.pod:3498 ../fish/guestfish-actions.pod:3544
4786 #: ../fish/guestfish-actions.pod:3629 ../fish/guestfish-actions.pod:3644
4787 #: ../fish/guestfish-actions.pod:4027 ../fish/guestfish-actions.pod:4045
4788 #: ../fish/guestfish-actions.pod:4062 ../fish/guestfish-actions.pod:4072
4789 #: ../fish/guestfish-actions.pod:4120 ../fish/guestfish-actions.pod:4130
4790 #: ../fish/guestfish-actions.pod:4159 ../fish/guestfish-actions.pod:4169
4792 "Because of the message protocol, there is a transfer limit of somewhere "
4793 "between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
4797 #: ../src/guestfs-actions.pod:631
4798 msgid "guestfs_checksum"
4802 #: ../src/guestfs-actions.pod:633
4805 " char *guestfs_checksum (guestfs_h *g,\n"
4806 "\t\tconst char *csumtype,\n"
4807 "\t\tconst char *path);\n"
4812 #: ../src/guestfs-actions.pod:637 ../fish/guestfish-actions.pod:514
4814 "This call computes the MD5, SHAx or CRC checksum of the file named C<path>."
4818 #: ../src/guestfs-actions.pod:640 ../fish/guestfish-actions.pod:517
4820 "The type of checksum to compute is given by the C<csumtype> parameter which "
4821 "must have one of the following values:"
4825 #: ../src/guestfs-actions.pod:645 ../fish/guestfish-actions.pod:522
4830 #: ../src/guestfs-actions.pod:647 ../fish/guestfish-actions.pod:524
4832 "Compute the cyclic redundancy check (CRC) specified by POSIX for the "
4837 #: ../src/guestfs-actions.pod:650 ../fish/guestfish-actions.pod:527
4842 #: ../src/guestfs-actions.pod:652 ../fish/guestfish-actions.pod:529
4843 msgid "Compute the MD5 hash (using the C<md5sum> program)."
4847 #: ../src/guestfs-actions.pod:654 ../fish/guestfish-actions.pod:531
4852 #: ../src/guestfs-actions.pod:656 ../fish/guestfish-actions.pod:533
4853 msgid "Compute the SHA1 hash (using the C<sha1sum> program)."
4857 #: ../src/guestfs-actions.pod:658 ../fish/guestfish-actions.pod:535
4862 #: ../src/guestfs-actions.pod:660 ../fish/guestfish-actions.pod:537
4863 msgid "Compute the SHA224 hash (using the C<sha224sum> program)."
4867 #: ../src/guestfs-actions.pod:662 ../fish/guestfish-actions.pod:539
4872 #: ../src/guestfs-actions.pod:664 ../fish/guestfish-actions.pod:541
4873 msgid "Compute the SHA256 hash (using the C<sha256sum> program)."
4877 #: ../src/guestfs-actions.pod:666 ../fish/guestfish-actions.pod:543
4882 #: ../src/guestfs-actions.pod:668 ../fish/guestfish-actions.pod:545
4883 msgid "Compute the SHA384 hash (using the C<sha384sum> program)."
4887 #: ../src/guestfs-actions.pod:670 ../fish/guestfish-actions.pod:547
4892 #: ../src/guestfs-actions.pod:672 ../fish/guestfish-actions.pod:549
4893 msgid "Compute the SHA512 hash (using the C<sha512sum> program)."
4897 #: ../src/guestfs-actions.pod:676 ../fish/guestfish-actions.pod:553
4898 msgid "The checksum is returned as a printable string."
4902 #: ../src/guestfs-actions.pod:678
4903 msgid "To get the checksum for a device, use C<guestfs_checksum_device>."
4907 #: ../src/guestfs-actions.pod:680
4908 msgid "To get the checksums for many files, use C<guestfs_checksums_out>."
4912 #: ../src/guestfs-actions.pod:685
4913 msgid "guestfs_checksum_device"
4917 #: ../src/guestfs-actions.pod:687
4920 " char *guestfs_checksum_device (guestfs_h *g,\n"
4921 "\t\tconst char *csumtype,\n"
4922 "\t\tconst char *device);\n"
4927 #: ../src/guestfs-actions.pod:691
4929 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
4930 "device named C<device>. For the types of checksums supported see the "
4931 "C<guestfs_checksum> command."
4935 #: ../src/guestfs-actions.pod:698
4936 msgid "guestfs_checksums_out"
4940 #: ../src/guestfs-actions.pod:700
4943 " int guestfs_checksums_out (guestfs_h *g,\n"
4944 "\t\tconst char *csumtype,\n"
4945 "\t\tconst char *directory,\n"
4946 "\t\tconst char *sumsfile);\n"
4951 #: ../src/guestfs-actions.pod:705 ../fish/guestfish-actions.pod:571
4953 "This command computes the checksums of all regular files in C<directory> and "
4954 "then emits a list of those checksums to the local output file C<sumsfile>."
4958 #: ../src/guestfs-actions.pod:709 ../fish/guestfish-actions.pod:575
4960 "This can be used for verifying the integrity of a virtual machine. However "
4961 "to be properly secure you should pay attention to the output of the checksum "
4962 "command (it uses the ones from GNU coreutils). In particular when the "
4963 "filename is not printable, coreutils uses a special backslash syntax. For "
4964 "more information, see the GNU coreutils info file."
4968 #: ../src/guestfs-actions.pod:719
4969 msgid "guestfs_chmod"
4973 #: ../src/guestfs-actions.pod:721
4976 " int guestfs_chmod (guestfs_h *g,\n"
4978 "\t\tconst char *path);\n"
4983 #: ../src/guestfs-actions.pod:725 ../fish/guestfish-actions.pod:589
4985 "Change the mode (permissions) of C<path> to C<mode>. Only numeric modes are "
4990 #: ../src/guestfs-actions.pod:728 ../fish/guestfish-actions.pod:592
4992 "I<Note>: When using this command from guestfish, C<mode> by default would be "
4993 "decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not "
4998 #: ../src/guestfs-actions.pod:732 ../src/guestfs-actions.pod:3045
4999 #: ../src/guestfs-actions.pod:3133 ../src/guestfs-actions.pod:3149
5000 #: ../src/guestfs-actions.pod:3165 ../fish/guestfish-actions.pod:596
5001 #: ../fish/guestfish-actions.pod:2362 ../fish/guestfish-actions.pod:2432
5002 #: ../fish/guestfish-actions.pod:2442 ../fish/guestfish-actions.pod:2452
5003 msgid "The mode actually set is affected by the umask."
5007 #: ../src/guestfs-actions.pod:736
5008 msgid "guestfs_chown"
5012 #: ../src/guestfs-actions.pod:738
5015 " int guestfs_chown (guestfs_h *g,\n"
5018 "\t\tconst char *path);\n"
5023 #: ../src/guestfs-actions.pod:743 ../fish/guestfish-actions.pod:602
5024 msgid "Change the file owner to C<owner> and group to C<group>."
5028 #: ../src/guestfs-actions.pod:745 ../src/guestfs-actions.pod:2374
5029 #: ../fish/guestfish-actions.pod:604 ../fish/guestfish-actions.pod:1890
5031 "Only numeric uid and gid are supported. If you want to use names, you will "
5032 "need to locate and parse the password file yourself (Augeas support makes "
5033 "this relatively easy)."
5037 #: ../src/guestfs-actions.pod:751
5038 msgid "guestfs_command"
5042 #: ../src/guestfs-actions.pod:753
5045 " char *guestfs_command (guestfs_h *g,\n"
5046 "\t\tchar *const *arguments);\n"
5051 #: ../src/guestfs-actions.pod:756 ../fish/guestfish-actions.pod:612
5053 "This call runs a command from the guest filesystem. The filesystem must be "
5054 "mounted, and must contain a compatible operating system (ie. something "
5055 "Linux, with the same or compatible processor architecture)."
5059 #: ../src/guestfs-actions.pod:761
5061 "The single parameter is an argv-style list of arguments. The first element "
5062 "is the name of the program to run. Subsequent elements are parameters. The "
5063 "list must be non-empty (ie. must contain a program name). Note that the "
5064 "command runs directly, and is I<not> invoked via the shell (see "
5069 #: ../src/guestfs-actions.pod:768 ../fish/guestfish-actions.pod:624
5070 msgid "The return value is anything printed to I<stdout> by the command."
5074 #: ../src/guestfs-actions.pod:771 ../fish/guestfish-actions.pod:627
5076 "If the command returns a non-zero exit status, then this function returns an "
5077 "error message. The error message string is the content of I<stderr> from "
5082 #: ../src/guestfs-actions.pod:775 ../fish/guestfish-actions.pod:631
5084 "The C<$PATH> environment variable will contain at least C</usr/bin> and C</"
5085 "bin>. If you require a program from another location, you should provide "
5086 "the full path in the first parameter."
5090 #: ../src/guestfs-actions.pod:780 ../fish/guestfish-actions.pod:636
5092 "Shared libraries and data files required by the program must be available on "
5093 "filesystems which are mounted in the correct places. It is the caller's "
5094 "responsibility to ensure all filesystems that are needed are mounted at the "
5099 #: ../src/guestfs-actions.pod:792
5100 msgid "guestfs_command_lines"
5104 #: ../src/guestfs-actions.pod:794
5107 " char **guestfs_command_lines (guestfs_h *g,\n"
5108 "\t\tchar *const *arguments);\n"
5113 #: ../src/guestfs-actions.pod:797
5115 "This is the same as C<guestfs_command>, but splits the result into a list of "
5120 #: ../src/guestfs-actions.pod:800
5121 msgid "See also: C<guestfs_sh_lines>"
5125 #: ../src/guestfs-actions.pod:809
5126 msgid "guestfs_config"
5130 #: ../src/guestfs-actions.pod:811
5133 " int guestfs_config (guestfs_h *g,\n"
5134 "\t\tconst char *qemuparam,\n"
5135 "\t\tconst char *qemuvalue);\n"
5140 #: ../src/guestfs-actions.pod:815 ../fish/guestfish-actions.pod:661
5142 "This can be used to add arbitrary qemu command line parameters of the form "
5143 "C<-param value>. Actually it's not quite arbitrary - we prevent you from "
5144 "setting some parameters which would interfere with parameters that we use."
5148 #: ../src/guestfs-actions.pod:820 ../fish/guestfish-actions.pod:666
5149 msgid "The first character of C<param> string must be a C<-> (dash)."
5153 #: ../src/guestfs-actions.pod:822 ../fish/guestfish-actions.pod:668
5154 msgid "C<value> can be NULL."
5158 #: ../src/guestfs-actions.pod:826
5159 msgid "guestfs_copy_size"
5163 #: ../src/guestfs-actions.pod:828
5166 " int guestfs_copy_size (guestfs_h *g,\n"
5167 "\t\tconst char *src,\n"
5168 "\t\tconst char *dest,\n"
5169 "\t\tint64_t size);\n"
5174 #: ../src/guestfs-actions.pod:833 ../fish/guestfish-actions.pod:674
5176 "This command copies exactly C<size> bytes from one source device or file "
5177 "C<src> to another destination device or file C<dest>."
5181 #: ../src/guestfs-actions.pod:836 ../fish/guestfish-actions.pod:677
5183 "Note this will fail if the source is too short or if the destination is not "
5188 #: ../src/guestfs-actions.pod:841 ../src/guestfs-actions.pod:976
5189 #: ../src/guestfs-actions.pod:1348 ../src/guestfs-actions.pod:1367
5190 #: ../src/guestfs-actions.pod:5330 ../src/guestfs-actions.pod:5346
5192 "This long-running command can generate progress notification messages so "
5193 "that the caller can display a progress bar or indicator. To receive these "
5194 "messages, the caller must register a progress callback. See L<guestfs(3)/"
5195 "guestfs_set_progress_callback>."
5199 #: ../src/guestfs-actions.pod:846
5204 #: ../src/guestfs-actions.pod:848
5207 " int guestfs_cp (guestfs_h *g,\n"
5208 "\t\tconst char *src,\n"
5209 "\t\tconst char *dest);\n"
5214 #: ../src/guestfs-actions.pod:852 ../fish/guestfish-actions.pod:684
5216 "This copies a file from C<src> to C<dest> where C<dest> is either a "
5217 "destination filename or destination directory."
5221 #: ../src/guestfs-actions.pod:857
5222 msgid "guestfs_cp_a"
5226 #: ../src/guestfs-actions.pod:859
5229 " int guestfs_cp_a (guestfs_h *g,\n"
5230 "\t\tconst char *src,\n"
5231 "\t\tconst char *dest);\n"
5236 #: ../src/guestfs-actions.pod:863 ../fish/guestfish-actions.pod:691
5238 "This copies a file or directory from C<src> to C<dest> recursively using the "
5243 #: ../src/guestfs-actions.pod:868
5248 #: ../src/guestfs-actions.pod:870
5251 " int guestfs_dd (guestfs_h *g,\n"
5252 "\t\tconst char *src,\n"
5253 "\t\tconst char *dest);\n"
5258 #: ../src/guestfs-actions.pod:874 ../fish/guestfish-actions.pod:698
5260 "This command copies from one source device or file C<src> to another "
5261 "destination device or file C<dest>. Normally you would use this to copy to "
5262 "or from a device or partition, for example to duplicate a filesystem."
5266 #: ../src/guestfs-actions.pod:879
5268 "If the destination is a device, it must be as large or larger than the "
5269 "source file or device, otherwise the copy will fail. This command cannot do "
5270 "partial copies (see C<guestfs_copy_size>)."
5274 #: ../src/guestfs-actions.pod:885
5275 msgid "guestfs_debug"
5279 #: ../src/guestfs-actions.pod:887
5282 " char *guestfs_debug (guestfs_h *g,\n"
5283 "\t\tconst char *subcmd,\n"
5284 "\t\tchar *const *extraargs);\n"
5289 #: ../src/guestfs-actions.pod:891
5291 "The C<guestfs_debug> command exposes some internals of C<guestfsd> (the "
5292 "guestfs daemon) that runs inside the qemu subprocess."
5296 #: ../src/guestfs-actions.pod:895 ../fish/guestfish-actions.pod:715
5298 "There is no comprehensive help for this command. You have to look at the "
5299 "file C<daemon/debug.c> in the libguestfs source to find out what you can do."
5303 #: ../src/guestfs-actions.pod:902
5304 msgid "guestfs_debug_upload"
5308 #: ../src/guestfs-actions.pod:904
5311 " int guestfs_debug_upload (guestfs_h *g,\n"
5312 "\t\tconst char *filename,\n"
5313 "\t\tconst char *tmpname,\n"
5319 #: ../src/guestfs-actions.pod:909
5321 "The C<guestfs_debug_upload> command uploads a file to the libguestfs "
5326 #: ../src/guestfs-actions.pod:912 ../fish/guestfish-actions.pod:726
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 it is for."
5333 #: ../src/guestfs-actions.pod:918
5338 #: ../src/guestfs-actions.pod:920
5341 " char *guestfs_df (guestfs_h *g);\n"
5346 #: ../src/guestfs-actions.pod:922 ../fish/guestfish-actions.pod:736
5347 msgid "This command runs the C<df> command to report disk space used."
5351 #: ../src/guestfs-actions.pod:924 ../src/guestfs-actions.pod:938
5352 #: ../fish/guestfish-actions.pod:738 ../fish/guestfish-actions.pod:749
5354 "This command is mostly useful for interactive sessions. It is I<not> "
5355 "intended that you try to parse the output string. Use C<statvfs> from "
5360 #: ../src/guestfs-actions.pod:931
5361 msgid "guestfs_df_h"
5365 #: ../src/guestfs-actions.pod:933
5368 " char *guestfs_df_h (guestfs_h *g);\n"
5373 #: ../src/guestfs-actions.pod:935 ../fish/guestfish-actions.pod:746
5375 "This command runs the C<df -h> command to report disk space used in human-"
5380 #: ../src/guestfs-actions.pod:945
5381 msgid "guestfs_dmesg"
5385 #: ../src/guestfs-actions.pod:947
5388 " char *guestfs_dmesg (guestfs_h *g);\n"
5393 #: ../src/guestfs-actions.pod:949 ../fish/guestfish-actions.pod:757
5395 "This returns the kernel messages (C<dmesg> output) from the guest kernel. "
5396 "This is sometimes useful for extended debugging of problems."
5400 #: ../src/guestfs-actions.pod:953
5402 "Another way to get the same information is to enable verbose messages with "
5403 "C<guestfs_set_verbose> or by setting the environment variable "
5404 "C<LIBGUESTFS_DEBUG=1> before running the program."
5408 #: ../src/guestfs-actions.pod:961
5409 msgid "guestfs_download"
5413 #: ../src/guestfs-actions.pod:963
5416 " int guestfs_download (guestfs_h *g,\n"
5417 "\t\tconst char *remotefilename,\n"
5418 "\t\tconst char *filename);\n"
5423 #: ../src/guestfs-actions.pod:967 ../fish/guestfish-actions.pod:770
5425 "Download file C<remotefilename> and save it as C<filename> on the local "
5430 #: ../src/guestfs-actions.pod:970 ../src/guestfs-actions.pod:4924
5431 #: ../fish/guestfish-actions.pod:773 ../fish/guestfish-actions.pod:3798
5432 msgid "C<filename> can also be a named pipe."
5436 #: ../src/guestfs-actions.pod:972
5437 msgid "See also C<guestfs_upload>, C<guestfs_cat>."
5441 #: ../src/guestfs-actions.pod:981
5442 msgid "guestfs_drop_caches"
5446 #: ../src/guestfs-actions.pod:983
5449 " int guestfs_drop_caches (guestfs_h *g,\n"
5450 "\t\tint whattodrop);\n"
5455 #: ../src/guestfs-actions.pod:986 ../fish/guestfish-actions.pod:783
5457 "This instructs the guest kernel to drop its page cache, and/or dentries and "
5458 "inode caches. The parameter C<whattodrop> tells the kernel what precisely "
5459 "to drop, see L<http://linux-mm.org/Drop_Caches>"
5463 #: ../src/guestfs-actions.pod:991 ../fish/guestfish-actions.pod:788
5464 msgid "Setting C<whattodrop> to 3 should drop everything."
5468 #: ../src/guestfs-actions.pod:993 ../fish/guestfish-actions.pod:790
5470 "This automatically calls L<sync(2)> before the operation, so that the "
5471 "maximum guest memory is freed."
5475 #: ../src/guestfs-actions.pod:998
5480 #: ../src/guestfs-actions.pod:1000
5483 " int64_t guestfs_du (guestfs_h *g,\n"
5484 "\t\tconst char *path);\n"
5489 #: ../src/guestfs-actions.pod:1003 ../fish/guestfish-actions.pod:797
5491 "This command runs the C<du -s> command to estimate file space usage for "
5496 #: ../src/guestfs-actions.pod:1006 ../fish/guestfish-actions.pod:800
5498 "C<path> can be a file or a directory. If C<path> is a directory then the "
5499 "estimate includes the contents of the directory and all subdirectories "
5504 #: ../src/guestfs-actions.pod:1010 ../fish/guestfish-actions.pod:804
5506 "The result is the estimated size in I<kilobytes> (ie. units of 1024 bytes)."
5510 #: ../src/guestfs-actions.pod:1015
5511 msgid "guestfs_e2fsck_f"
5515 #: ../src/guestfs-actions.pod:1017
5518 " int guestfs_e2fsck_f (guestfs_h *g,\n"
5519 "\t\tconst char *device);\n"
5524 #: ../src/guestfs-actions.pod:1020 ../fish/guestfish-actions.pod:811
5526 "This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3 filesystem checker "
5527 "on C<device>, noninteractively (C<-p>), even if the filesystem appears to be "
5532 #: ../src/guestfs-actions.pod:1024
5534 "This command is only needed because of C<guestfs_resize2fs> (q.v.). "
5535 "Normally you should use C<guestfs_fsck>."
5539 #: ../src/guestfs-actions.pod:1029
5540 msgid "guestfs_echo_daemon"
5544 #: ../src/guestfs-actions.pod:1031
5547 " char *guestfs_echo_daemon (guestfs_h *g,\n"
5548 "\t\tchar *const *words);\n"
5553 #: ../src/guestfs-actions.pod:1034 ../fish/guestfish-actions.pod:822
5555 "This command concatenates the list of C<words> passed with single spaces "
5556 "between them and returns the resulting string."
5560 #: ../src/guestfs-actions.pod:1037 ../fish/guestfish-actions.pod:825
5561 msgid "You can use this command to test the connection through to the daemon."
5565 #: ../src/guestfs-actions.pod:1039
5566 msgid "See also C<guestfs_ping_daemon>."
5570 #: ../src/guestfs-actions.pod:1044
5571 msgid "guestfs_egrep"
5575 #: ../src/guestfs-actions.pod:1046
5578 " char **guestfs_egrep (guestfs_h *g,\n"
5579 "\t\tconst char *regex,\n"
5580 "\t\tconst char *path);\n"
5585 #: ../src/guestfs-actions.pod:1050 ../fish/guestfish-actions.pod:833
5587 "This calls the external C<egrep> program and returns the matching lines."
5591 #: ../src/guestfs-actions.pod:1060
5592 msgid "guestfs_egrepi"
5596 #: ../src/guestfs-actions.pod:1062
5599 " char **guestfs_egrepi (guestfs_h *g,\n"
5600 "\t\tconst char *regex,\n"
5601 "\t\tconst char *path);\n"
5606 #: ../src/guestfs-actions.pod:1066 ../fish/guestfish-actions.pod:843
5608 "This calls the external C<egrep -i> program and returns the matching lines."
5612 #: ../src/guestfs-actions.pod:1076
5613 msgid "guestfs_equal"
5617 #: ../src/guestfs-actions.pod:1078
5620 " int guestfs_equal (guestfs_h *g,\n"
5621 "\t\tconst char *file1,\n"
5622 "\t\tconst char *file2);\n"
5627 #: ../src/guestfs-actions.pod:1082 ../fish/guestfish-actions.pod:853
5629 "This compares the two files C<file1> and C<file2> and returns true if their "
5630 "content is exactly equal, or false otherwise."
5634 #: ../src/guestfs-actions.pod:1085 ../fish/guestfish-actions.pod:856
5635 msgid "The external L<cmp(1)> program is used for the comparison."
5639 #: ../src/guestfs-actions.pod:1089
5640 msgid "guestfs_exists"
5644 #: ../src/guestfs-actions.pod:1091
5647 " int guestfs_exists (guestfs_h *g,\n"
5648 "\t\tconst char *path);\n"
5653 #: ../src/guestfs-actions.pod:1094 ../fish/guestfish-actions.pod:862
5655 "This returns C<true> if and only if there is a file, directory (or anything) "
5656 "with the given C<path> name."
5660 #: ../src/guestfs-actions.pod:1097
5661 msgid "See also C<guestfs_is_file>, C<guestfs_is_dir>, C<guestfs_stat>."
5665 #: ../src/guestfs-actions.pod:1101
5666 msgid "guestfs_fallocate"
5670 #: ../src/guestfs-actions.pod:1103
5673 " int guestfs_fallocate (guestfs_h *g,\n"
5674 "\t\tconst char *path,\n"
5680 #: ../src/guestfs-actions.pod:1107 ../src/guestfs-actions.pod:1130
5681 #: ../fish/guestfish-actions.pod:871 ../fish/guestfish-actions.pod:890
5683 "This command preallocates a file (containing zero bytes) named C<path> of "
5684 "size C<len> bytes. If the file exists already, it is overwritten."
5688 #: ../src/guestfs-actions.pod:1111 ../fish/guestfish-actions.pod:875
5690 "Do not confuse this with the guestfish-specific C<alloc> command which "
5691 "allocates a file in the host and attaches it as a device."
5695 #: ../src/guestfs-actions.pod:1117 ../fish/guestfish-actions.pod:879
5697 "This function is deprecated. In new code, use the C<fallocate64> call "
5702 #: ../src/guestfs-actions.pod:1120 ../src/guestfs-actions.pod:1555
5703 #: ../src/guestfs-actions.pod:1573 ../src/guestfs-actions.pod:5279
5704 #: ../src/guestfs-actions.pod:5424 ../fish/guestfish-actions.pod:882
5705 #: ../fish/guestfish-actions.pod:1239 ../fish/guestfish-actions.pod:1253
5706 #: ../fish/guestfish-actions.pod:4051 ../fish/guestfish-actions.pod:4148
5708 "Deprecated functions will not be removed from the API, but the fact that "
5709 "they are deprecated indicates that there are problems with correct use of "
5714 #: ../src/guestfs-actions.pod:1124
5715 msgid "guestfs_fallocate64"
5719 #: ../src/guestfs-actions.pod:1126
5722 " int guestfs_fallocate64 (guestfs_h *g,\n"
5723 "\t\tconst char *path,\n"
5724 "\t\tint64_t len);\n"
5729 #: ../src/guestfs-actions.pod:1134
5731 "Note that this call allocates disk blocks for the file. To create a sparse "
5732 "file use C<guestfs_truncate_size> instead."
5736 #: ../src/guestfs-actions.pod:1137
5738 "The deprecated call C<guestfs_fallocate> does the same, but owing to an "
5739 "oversight it only allowed 30 bit lengths to be specified, effectively "
5740 "limiting the maximum size of files created through that call to 1GB."
5744 #: ../src/guestfs-actions.pod:1142 ../fish/guestfish-actions.pod:902
5746 "Do not confuse this with the guestfish-specific C<alloc> and C<sparse> "
5747 "commands which create a file in the host and attach it as a device."
5751 #: ../src/guestfs-actions.pod:1148
5752 msgid "guestfs_fgrep"
5756 #: ../src/guestfs-actions.pod:1150
5759 " char **guestfs_fgrep (guestfs_h *g,\n"
5760 "\t\tconst char *pattern,\n"
5761 "\t\tconst char *path);\n"
5766 #: ../src/guestfs-actions.pod:1154 ../fish/guestfish-actions.pod:910
5768 "This calls the external C<fgrep> program and returns the matching lines."
5772 #: ../src/guestfs-actions.pod:1164
5773 msgid "guestfs_fgrepi"
5777 #: ../src/guestfs-actions.pod:1166
5780 " char **guestfs_fgrepi (guestfs_h *g,\n"
5781 "\t\tconst char *pattern,\n"
5782 "\t\tconst char *path);\n"
5787 #: ../src/guestfs-actions.pod:1170 ../fish/guestfish-actions.pod:920
5789 "This calls the external C<fgrep -i> program and returns the matching lines."
5793 #: ../src/guestfs-actions.pod:1180
5794 msgid "guestfs_file"
5798 #: ../src/guestfs-actions.pod:1182
5801 " char *guestfs_file (guestfs_h *g,\n"
5802 "\t\tconst char *path);\n"
5807 #: ../src/guestfs-actions.pod:1185 ../fish/guestfish-actions.pod:930
5809 "This call uses the standard L<file(1)> command to determine the type or "
5810 "contents of the file."
5814 #: ../src/guestfs-actions.pod:1188 ../fish/guestfish-actions.pod:933
5816 "This call will also transparently look inside various types of compressed "
5821 #: ../src/guestfs-actions.pod:1191 ../fish/guestfish-actions.pod:936
5823 "The exact command which runs is C<file -zb path>. Note in particular that "
5824 "the filename is not prepended to the output (the C<-b> option)."
5828 #: ../src/guestfs-actions.pod:1195
5830 "This command can also be used on C</dev/> devices (and partitions, LV "
5831 "names). You can for example use this to determine if a device contains a "
5832 "filesystem, although it's usually better to use C<guestfs_vfs_type>."
5836 #: ../src/guestfs-actions.pod:1200 ../fish/guestfish-actions.pod:945
5838 "If the C<path> does not begin with C</dev/> then this command only works for "
5839 "the content of regular files. For other file types (directory, symbolic "
5840 "link etc) it will just return the string C<directory> etc."
5844 #: ../src/guestfs-actions.pod:1208
5845 msgid "guestfs_file_architecture"
5849 #: ../src/guestfs-actions.pod:1210
5852 " char *guestfs_file_architecture (guestfs_h *g,\n"
5853 "\t\tconst char *filename);\n"
5858 #: ../src/guestfs-actions.pod:1213 ../fish/guestfish-actions.pod:954
5860 "This detects the architecture of the binary C<filename>, and returns it if "
5865 #: ../src/guestfs-actions.pod:1216 ../fish/guestfish-actions.pod:957
5866 msgid "Currently defined architectures are:"
5870 #: ../src/guestfs-actions.pod:1220 ../fish/guestfish-actions.pod:961
5875 #: ../src/guestfs-actions.pod:1222 ../fish/guestfish-actions.pod:963
5877 "This string is returned for all 32 bit i386, i486, i586, i686 binaries "
5878 "irrespective of the precise processor requirements of the binary."
5882 #: ../src/guestfs-actions.pod:1225 ../fish/guestfish-actions.pod:966
5887 #: ../src/guestfs-actions.pod:1227 ../fish/guestfish-actions.pod:968
5888 msgid "64 bit x86-64."
5892 #: ../src/guestfs-actions.pod:1229 ../fish/guestfish-actions.pod:970
5897 #: ../src/guestfs-actions.pod:1231 ../fish/guestfish-actions.pod:972
5898 msgid "32 bit SPARC."
5902 #: ../src/guestfs-actions.pod:1233 ../fish/guestfish-actions.pod:974
5907 #: ../src/guestfs-actions.pod:1235 ../fish/guestfish-actions.pod:976
5908 msgid "64 bit SPARC V9 and above."
5912 #: ../src/guestfs-actions.pod:1237 ../fish/guestfish-actions.pod:978
5917 #: ../src/guestfs-actions.pod:1239 ../fish/guestfish-actions.pod:980
5918 msgid "Intel Itanium."
5922 #: ../src/guestfs-actions.pod:1241 ../fish/guestfish-actions.pod:982
5927 #: ../src/guestfs-actions.pod:1243 ../fish/guestfish-actions.pod:984
5928 msgid "32 bit Power PC."
5932 #: ../src/guestfs-actions.pod:1245 ../fish/guestfish-actions.pod:986
5937 #: ../src/guestfs-actions.pod:1247 ../fish/guestfish-actions.pod:988
5938 msgid "64 bit Power PC."
5942 #: ../src/guestfs-actions.pod:1251 ../fish/guestfish-actions.pod:992
5943 msgid "Libguestfs may return other architecture strings in future."
5947 #: ../src/guestfs-actions.pod:1253 ../fish/guestfish-actions.pod:994
5948 msgid "The function works on at least the following types of files:"
5952 #: ../src/guestfs-actions.pod:1259 ../fish/guestfish-actions.pod:1000
5953 msgid "many types of Un*x and Linux binary"
5957 #: ../src/guestfs-actions.pod:1263 ../fish/guestfish-actions.pod:1004
5958 msgid "many types of Un*x and Linux shared library"
5962 #: ../src/guestfs-actions.pod:1267 ../fish/guestfish-actions.pod:1008
5963 msgid "Windows Win32 and Win64 binaries"
5967 #: ../src/guestfs-actions.pod:1271 ../fish/guestfish-actions.pod:1012
5968 msgid "Windows Win32 and Win64 DLLs"
5972 #: ../src/guestfs-actions.pod:1273 ../fish/guestfish-actions.pod:1014
5973 msgid "Win32 binaries and DLLs return C<i386>."
5977 #: ../src/guestfs-actions.pod:1275 ../fish/guestfish-actions.pod:1016
5978 msgid "Win64 binaries and DLLs return C<x86_64>."
5982 #: ../src/guestfs-actions.pod:1279 ../fish/guestfish-actions.pod:1020
5983 msgid "Linux kernel modules"
5987 #: ../src/guestfs-actions.pod:1283 ../fish/guestfish-actions.pod:1024
5988 msgid "Linux new-style initrd images"
5992 #: ../src/guestfs-actions.pod:1287 ../fish/guestfish-actions.pod:1028
5993 msgid "some non-x86 Linux vmlinuz kernels"
5997 #: ../src/guestfs-actions.pod:1291 ../fish/guestfish-actions.pod:1032
5998 msgid "What it can't do currently:"
6002 #: ../src/guestfs-actions.pod:1297 ../fish/guestfish-actions.pod:1038
6003 msgid "static libraries (libfoo.a)"
6007 #: ../src/guestfs-actions.pod:1301 ../fish/guestfish-actions.pod:1042
6008 msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)"
6012 #: ../src/guestfs-actions.pod:1305 ../fish/guestfish-actions.pod:1046
6013 msgid "x86 Linux vmlinuz kernels"
6017 #: ../src/guestfs-actions.pod:1307 ../fish/guestfish-actions.pod:1048
6019 "x86 vmlinuz images (bzImage format) consist of a mix of 16-, 32- and "
6020 "compressed code, and are horribly hard to unpack. If you want to find the "
6021 "architecture of a kernel, use the architecture of the associated initrd or "
6022 "kernel module(s) instead."
6026 #: ../src/guestfs-actions.pod:1317
6027 msgid "guestfs_filesize"
6031 #: ../src/guestfs-actions.pod:1319
6034 " int64_t guestfs_filesize (guestfs_h *g,\n"
6035 "\t\tconst char *file);\n"
6040 #: ../src/guestfs-actions.pod:1322 ../fish/guestfish-actions.pod:1059
6041 msgid "This command returns the size of C<file> in bytes."
6045 #: ../src/guestfs-actions.pod:1324
6047 "To get other stats about a file, use C<guestfs_stat>, C<guestfs_lstat>, "
6048 "C<guestfs_is_dir>, C<guestfs_is_file> etc. To get the size of block "
6049 "devices, use C<guestfs_blockdev_getsize64>."
6053 #: ../src/guestfs-actions.pod:1330
6054 msgid "guestfs_fill"
6058 #: ../src/guestfs-actions.pod:1332
6061 " int guestfs_fill (guestfs_h *g,\n"
6064 "\t\tconst char *path);\n"
6069 #: ../src/guestfs-actions.pod:1337 ../fish/guestfish-actions.pod:1069
6071 "This command creates a new file called C<path>. The initial content of the "
6072 "file is C<len> octets of C<c>, where C<c> must be a number in the range C<"
6077 #: ../src/guestfs-actions.pod:1341
6079 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
6080 "C<guestfs_truncate_size>. To create a file with a pattern of repeating "
6081 "bytes use C<guestfs_fill_pattern>."
6085 #: ../src/guestfs-actions.pod:1353
6086 msgid "guestfs_fill_pattern"
6090 #: ../src/guestfs-actions.pod:1355
6093 " int guestfs_fill_pattern (guestfs_h *g,\n"
6094 "\t\tconst char *pattern,\n"
6096 "\t\tconst char *path);\n"
6101 #: ../src/guestfs-actions.pod:1360
6103 "This function is like C<guestfs_fill> except that it creates a new file of "
6104 "length C<len> containing the repeating pattern of bytes in C<pattern>. The "
6105 "pattern is truncated if necessary to ensure the length of the file is "
6106 "exactly C<len> bytes."
6110 #: ../src/guestfs-actions.pod:1372
6111 msgid "guestfs_find"
6115 #: ../src/guestfs-actions.pod:1374
6118 " char **guestfs_find (guestfs_h *g,\n"
6119 "\t\tconst char *directory);\n"
6124 #: ../src/guestfs-actions.pod:1377 ../fish/guestfish-actions.pod:1091
6126 "This command lists out all files and directories, recursively, starting at "
6127 "C<directory>. It is essentially equivalent to running the shell command "
6128 "C<find directory -print> but some post-processing happens on the output, "
6133 #: ../src/guestfs-actions.pod:1382 ../fish/guestfish-actions.pod:1096
6135 "This returns a list of strings I<without any prefix>. Thus if the directory "
6140 #: ../src/guestfs-actions.pod:1385 ../fish/guestfish-actions.pod:1099
6150 #: ../src/guestfs-actions.pod:1389
6152 "then the returned list from C<guestfs_find> C</tmp> would be 4 elements:"
6156 #: ../src/guestfs-actions.pod:1392 ../fish/guestfish-actions.pod:1106
6167 #: ../src/guestfs-actions.pod:1397 ../fish/guestfish-actions.pod:1111
6168 msgid "If C<directory> is not a directory, then this command returns an error."
6172 #: ../src/guestfs-actions.pod:1400 ../fish/guestfish-actions.pod:1114
6173 msgid "The returned list is sorted."
6177 #: ../src/guestfs-actions.pod:1402
6178 msgid "See also C<guestfs_find0>."
6182 #: ../src/guestfs-actions.pod:1411
6183 msgid "guestfs_find0"
6187 #: ../src/guestfs-actions.pod:1413
6190 " int guestfs_find0 (guestfs_h *g,\n"
6191 "\t\tconst char *directory,\n"
6192 "\t\tconst char *files);\n"
6197 #: ../src/guestfs-actions.pod:1417 ../fish/guestfish-actions.pod:1125
6199 "This command lists out all files and directories, recursively, starting at "
6200 "C<directory>, placing the resulting list in the external file called "
6205 #: ../src/guestfs-actions.pod:1421
6207 "This command works the same way as C<guestfs_find> with the following "
6212 #: ../src/guestfs-actions.pod:1428 ../fish/guestfish-actions.pod:1136
6213 msgid "The resulting list is written to an external file."
6217 #: ../src/guestfs-actions.pod:1432 ../fish/guestfish-actions.pod:1140
6219 "Items (filenames) in the result are separated by C<\\0> characters. See "
6220 "L<find(1)> option I<-print0>."
6224 #: ../src/guestfs-actions.pod:1437 ../fish/guestfish-actions.pod:1145
6225 msgid "This command is not limited in the number of names that it can return."
6229 #: ../src/guestfs-actions.pod:1442 ../fish/guestfish-actions.pod:1150
6230 msgid "The result list is not sorted."
6234 #: ../src/guestfs-actions.pod:1448
6235 msgid "guestfs_findfs_label"
6239 #: ../src/guestfs-actions.pod:1450
6242 " char *guestfs_findfs_label (guestfs_h *g,\n"
6243 "\t\tconst char *label);\n"
6248 #: ../src/guestfs-actions.pod:1453 ../fish/guestfish-actions.pod:1160
6250 "This command searches the filesystems and returns the one which has the "
6251 "given label. An error is returned if no such filesystem can be found."
6255 #: ../src/guestfs-actions.pod:1457
6256 msgid "To find the label of a filesystem, use C<guestfs_vfs_label>."
6260 #: ../src/guestfs-actions.pod:1462
6261 msgid "guestfs_findfs_uuid"
6265 #: ../src/guestfs-actions.pod:1464
6268 " char *guestfs_findfs_uuid (guestfs_h *g,\n"
6269 "\t\tconst char *uuid);\n"
6274 #: ../src/guestfs-actions.pod:1467 ../fish/guestfish-actions.pod:1170
6276 "This command searches the filesystems and returns the one which has the "
6277 "given UUID. An error is returned if no such filesystem can be found."
6281 #: ../src/guestfs-actions.pod:1471
6282 msgid "To find the UUID of a filesystem, use C<guestfs_vfs_uuid>."
6286 #: ../src/guestfs-actions.pod:1476
6287 msgid "guestfs_fsck"
6291 #: ../src/guestfs-actions.pod:1478
6294 " int guestfs_fsck (guestfs_h *g,\n"
6295 "\t\tconst char *fstype,\n"
6296 "\t\tconst char *device);\n"
6301 #: ../src/guestfs-actions.pod:1482 ../fish/guestfish-actions.pod:1180
6303 "This runs the filesystem checker (fsck) on C<device> which should have "
6304 "filesystem type C<fstype>."
6308 #: ../src/guestfs-actions.pod:1485 ../fish/guestfish-actions.pod:1183
6310 "The returned integer is the status. See L<fsck(8)> for the list of status "
6311 "codes from C<fsck>."
6315 #: ../src/guestfs-actions.pod:1494 ../fish/guestfish-actions.pod:1192
6316 msgid "Multiple status codes can be summed together."
6320 #: ../src/guestfs-actions.pod:1498 ../fish/guestfish-actions.pod:1196
6322 "A non-zero return code can mean \"success\", for example if errors have been "
6323 "corrected on the filesystem."
6327 #: ../src/guestfs-actions.pod:1503 ../fish/guestfish-actions.pod:1201
6328 msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)."
6332 #: ../src/guestfs-actions.pod:1508 ../fish/guestfish-actions.pod:1206
6334 "This command is entirely equivalent to running C<fsck -a -t fstype device>."
6338 #: ../src/guestfs-actions.pod:1512
6339 msgid "guestfs_get_append"
6343 #: ../src/guestfs-actions.pod:1514
6346 " const char *guestfs_get_append (guestfs_h *g);\n"
6351 #: ../src/guestfs-actions.pod:1516 ../fish/guestfish-actions.pod:1212
6353 "Return the additional kernel options which are added to the guest kernel "
6358 #: ../src/guestfs-actions.pod:1519 ../fish/guestfish-actions.pod:1215
6359 msgid "If C<NULL> then no options are added."
6363 #: ../src/guestfs-actions.pod:1521
6365 "This function returns a string which may be NULL. There is no way to return "
6366 "an error from this function. The string is owned by the guest handle and "
6367 "must I<not> be freed."
6371 #: ../src/guestfs-actions.pod:1525
6372 msgid "guestfs_get_autosync"
6376 #: ../src/guestfs-actions.pod:1527
6379 " int guestfs_get_autosync (guestfs_h *g);\n"
6384 #: ../src/guestfs-actions.pod:1529 ../fish/guestfish-actions.pod:1221
6385 msgid "Get the autosync flag."
6389 #: ../src/guestfs-actions.pod:1533
6390 msgid "guestfs_get_direct"
6394 #: ../src/guestfs-actions.pod:1535
6397 " int guestfs_get_direct (guestfs_h *g);\n"
6402 #: ../src/guestfs-actions.pod:1537 ../fish/guestfish-actions.pod:1227
6403 msgid "Return the direct appliance mode flag."
6407 #: ../src/guestfs-actions.pod:1541
6408 msgid "guestfs_get_e2label"
6412 #: ../src/guestfs-actions.pod:1543
6415 " char *guestfs_get_e2label (guestfs_h *g,\n"
6416 "\t\tconst char *device);\n"
6421 #: ../src/guestfs-actions.pod:1546 ../fish/guestfish-actions.pod:1233
6423 "This returns the ext2/3/4 filesystem label of the filesystem on C<device>."
6427 #: ../src/guestfs-actions.pod:1552 ../fish/guestfish-actions.pod:1236
6429 "This function is deprecated. In new code, use the C<vfs_label> call instead."
6433 #: ../src/guestfs-actions.pod:1559
6434 msgid "guestfs_get_e2uuid"
6438 #: ../src/guestfs-actions.pod:1561
6441 " char *guestfs_get_e2uuid (guestfs_h *g,\n"
6442 "\t\tconst char *device);\n"
6447 #: ../src/guestfs-actions.pod:1564 ../fish/guestfish-actions.pod:1247
6449 "This returns the ext2/3/4 filesystem UUID of the filesystem on C<device>."
6453 #: ../src/guestfs-actions.pod:1570 ../fish/guestfish-actions.pod:1250
6455 "This function is deprecated. In new code, use the C<vfs_uuid> call instead."
6459 #: ../src/guestfs-actions.pod:1577
6460 msgid "guestfs_get_memsize"
6464 #: ../src/guestfs-actions.pod:1579
6467 " int guestfs_get_memsize (guestfs_h *g);\n"
6472 #: ../src/guestfs-actions.pod:1581 ../fish/guestfish-actions.pod:1261
6474 "This gets the memory size in megabytes allocated to the qemu subprocess."
6478 #: ../src/guestfs-actions.pod:1584
6480 "If C<guestfs_set_memsize> was not called on this handle, and if "
6481 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
6482 "value for memsize."
6486 #: ../src/guestfs-actions.pod:1588 ../src/guestfs-actions.pod:1651
6487 #: ../src/guestfs-actions.pod:4177 ../src/guestfs-actions.pod:4269
6488 #: ../fish/guestfish-actions.pod:1268 ../fish/guestfish-actions.pod:1317
6489 #: ../fish/guestfish-actions.pod:3223 ../fish/guestfish-actions.pod:3300
6491 "For more information on the architecture of libguestfs, see L<guestfs(3)>."
6495 #: ../src/guestfs-actions.pod:1593
6496 msgid "guestfs_get_network"
6500 #: ../src/guestfs-actions.pod:1595
6503 " int guestfs_get_network (guestfs_h *g);\n"
6508 #: ../src/guestfs-actions.pod:1597 ../fish/guestfish-actions.pod:1275
6509 msgid "This returns the enable network flag."
6513 #: ../src/guestfs-actions.pod:1601
6514 msgid "guestfs_get_path"
6518 #: ../src/guestfs-actions.pod:1603
6521 " const char *guestfs_get_path (guestfs_h *g);\n"
6526 #: ../src/guestfs-actions.pod:1605 ../fish/guestfish-actions.pod:1281
6527 msgid "Return the current search path."
6531 #: ../src/guestfs-actions.pod:1607 ../fish/guestfish-actions.pod:1283
6533 "This is always non-NULL. If it wasn't set already, then this will return "
6538 #: ../src/guestfs-actions.pod:1610 ../src/guestfs-actions.pod:1633
6540 "This function returns a string, or NULL on error. The string is owned by "
6541 "the guest handle and must I<not> be freed."
6545 #: ../src/guestfs-actions.pod:1613
6546 msgid "guestfs_get_pid"
6550 #: ../src/guestfs-actions.pod:1615
6553 " int guestfs_get_pid (guestfs_h *g);\n"
6558 #: ../src/guestfs-actions.pod:1617 ../fish/guestfish-actions.pod:1290
6560 "Return the process ID of the qemu subprocess. If there is no qemu "
6561 "subprocess, then this will return an error."
6565 #: ../src/guestfs-actions.pod:1620 ../fish/guestfish-actions.pod:1293
6566 msgid "This is an internal call used for debugging and testing."
6570 #: ../src/guestfs-actions.pod:1624
6571 msgid "guestfs_get_qemu"
6575 #: ../src/guestfs-actions.pod:1626
6578 " const char *guestfs_get_qemu (guestfs_h *g);\n"
6583 #: ../src/guestfs-actions.pod:1628 ../fish/guestfish-actions.pod:1299
6584 msgid "Return the current qemu binary."
6588 #: ../src/guestfs-actions.pod:1630 ../fish/guestfish-actions.pod:1301
6590 "This is always non-NULL. If it wasn't set already, then this will return "
6591 "the default qemu binary name."
6595 #: ../src/guestfs-actions.pod:1636
6596 msgid "guestfs_get_recovery_proc"
6600 #: ../src/guestfs-actions.pod:1638
6603 " int guestfs_get_recovery_proc (guestfs_h *g);\n"
6608 #: ../src/guestfs-actions.pod:1640 ../fish/guestfish-actions.pod:1308
6609 msgid "Return the recovery process enabled flag."
6613 #: ../src/guestfs-actions.pod:1644
6614 msgid "guestfs_get_selinux"
6618 #: ../src/guestfs-actions.pod:1646
6621 " int guestfs_get_selinux (guestfs_h *g);\n"
6626 #: ../src/guestfs-actions.pod:1648
6628 "This returns the current setting of the selinux flag which is passed to the "
6629 "appliance at boot time. See C<guestfs_set_selinux>."
6633 #: ../src/guestfs-actions.pod:1656
6634 msgid "guestfs_get_state"
6638 #: ../src/guestfs-actions.pod:1658
6641 " int guestfs_get_state (guestfs_h *g);\n"
6646 #: ../src/guestfs-actions.pod:1660 ../fish/guestfish-actions.pod:1324
6648 "This returns the current state as an opaque integer. This is only useful "
6649 "for printing debug and internal error messages."
6653 #: ../src/guestfs-actions.pod:1663 ../src/guestfs-actions.pod:2270
6654 #: ../src/guestfs-actions.pod:2281 ../src/guestfs-actions.pod:2318
6655 #: ../src/guestfs-actions.pod:2339 ../fish/guestfish-actions.pod:1327
6656 #: ../fish/guestfish-actions.pod:1810 ../fish/guestfish-actions.pod:1819
6657 #: ../fish/guestfish-actions.pod:1848 ../fish/guestfish-actions.pod:1864
6658 msgid "For more information on states, see L<guestfs(3)>."
6662 #: ../src/guestfs-actions.pod:1667
6663 msgid "guestfs_get_trace"
6667 #: ../src/guestfs-actions.pod:1669
6670 " int guestfs_get_trace (guestfs_h *g);\n"
6675 #: ../src/guestfs-actions.pod:1671 ../fish/guestfish-actions.pod:1333
6676 msgid "Return the command trace flag."
6680 #: ../src/guestfs-actions.pod:1675
6681 msgid "guestfs_get_umask"
6685 #: ../src/guestfs-actions.pod:1677
6688 " int guestfs_get_umask (guestfs_h *g);\n"
6693 #: ../src/guestfs-actions.pod:1679
6695 "Return the current umask. By default the umask is C<022> unless it has been "
6696 "set by calling C<guestfs_umask>."
6700 #: ../src/guestfs-actions.pod:1684
6701 msgid "guestfs_get_verbose"
6705 #: ../src/guestfs-actions.pod:1686
6708 " int guestfs_get_verbose (guestfs_h *g);\n"
6713 #: ../src/guestfs-actions.pod:1688 ../fish/guestfish-actions.pod:1346
6714 msgid "This returns the verbose messages flag."
6718 #: ../src/guestfs-actions.pod:1692
6719 msgid "guestfs_getcon"
6723 #: ../src/guestfs-actions.pod:1694
6726 " char *guestfs_getcon (guestfs_h *g);\n"
6731 #: ../src/guestfs-actions.pod:1696 ../fish/guestfish-actions.pod:1352
6732 msgid "This gets the SELinux security context of the daemon."
6736 #: ../src/guestfs-actions.pod:1698
6738 "See the documentation about SELINUX in L<guestfs(3)>, and C<guestfs_setcon>"
6742 #: ../src/guestfs-actions.pod:1704
6743 msgid "guestfs_getxattrs"
6747 #: ../src/guestfs-actions.pod:1706
6750 " struct guestfs_xattr_list *guestfs_getxattrs (guestfs_h *g,\n"
6751 "\t\tconst char *path);\n"
6756 #: ../src/guestfs-actions.pod:1709 ../fish/guestfish-actions.pod:1361
6758 "This call lists the extended attributes of the file or directory C<path>."
6762 #: ../src/guestfs-actions.pod:1712 ../fish/guestfish-actions.pod:1364
6764 "At the system call level, this is a combination of the L<listxattr(2)> and "
6765 "L<getxattr(2)> calls."
6769 #: ../src/guestfs-actions.pod:1715
6770 msgid "See also: C<guestfs_lgetxattrs>, L<attr(5)>."
6774 #: ../src/guestfs-actions.pod:1717 ../src/guestfs-actions.pod:2389
6775 #: ../src/guestfs-actions.pod:2884
6777 "This function returns a C<struct guestfs_xattr_list *> (see E<lt>guestfs-"
6778 "structs.hE<gt>), or NULL if there was an error. I<The caller must call "
6779 "C<guestfs_free_xattr_list> after use>."
6783 #: ../src/guestfs-actions.pod:1722
6784 msgid "guestfs_glob_expand"
6788 #: ../src/guestfs-actions.pod:1724
6791 " char **guestfs_glob_expand (guestfs_h *g,\n"
6792 "\t\tconst char *pattern);\n"
6797 #: ../src/guestfs-actions.pod:1727 ../fish/guestfish-actions.pod:1373
6799 "This command searches for all the pathnames matching C<pattern> according to "
6800 "the wildcard expansion rules used by the shell."
6804 #: ../src/guestfs-actions.pod:1731 ../fish/guestfish-actions.pod:1377
6806 "If no paths match, then this returns an empty list (note: not an error)."
6810 #: ../src/guestfs-actions.pod:1734 ../fish/guestfish-actions.pod:1380
6812 "It is just a wrapper around the C L<glob(3)> function with flags C<GLOB_MARK|"
6813 "GLOB_BRACE>. See that manual page for more details."
6817 #: ../src/guestfs-actions.pod:1742
6818 msgid "guestfs_grep"
6822 #: ../src/guestfs-actions.pod:1744
6825 " char **guestfs_grep (guestfs_h *g,\n"
6826 "\t\tconst char *regex,\n"
6827 "\t\tconst char *path);\n"
6832 #: ../src/guestfs-actions.pod:1748 ../fish/guestfish-actions.pod:1388
6833 msgid "This calls the external C<grep> program and returns the matching lines."
6837 #: ../src/guestfs-actions.pod:1758
6838 msgid "guestfs_grepi"
6842 #: ../src/guestfs-actions.pod:1760
6845 " char **guestfs_grepi (guestfs_h *g,\n"
6846 "\t\tconst char *regex,\n"
6847 "\t\tconst char *path);\n"
6852 #: ../src/guestfs-actions.pod:1764 ../fish/guestfish-actions.pod:1398
6854 "This calls the external C<grep -i> program and returns the matching lines."
6858 #: ../src/guestfs-actions.pod:1774
6859 msgid "guestfs_grub_install"
6863 #: ../src/guestfs-actions.pod:1776
6866 " int guestfs_grub_install (guestfs_h *g,\n"
6867 "\t\tconst char *root,\n"
6868 "\t\tconst char *device);\n"
6873 #: ../src/guestfs-actions.pod:1780 ../fish/guestfish-actions.pod:1408
6875 "This command installs GRUB (the Grand Unified Bootloader) on C<device>, with "
6876 "the root directory being C<root>."
6880 #: ../src/guestfs-actions.pod:1783 ../fish/guestfish-actions.pod:1411
6882 "Note: If grub-install reports the error \"No suitable drive was found in the "
6883 "generated device map.\" it may be that you need to create a C</boot/grub/"
6884 "device.map> file first that contains the mapping between grub device names "
6885 "and Linux device names. It is usually sufficient to create a file "
6890 #: ../src/guestfs-actions.pod:1790 ../fish/guestfish-actions.pod:1418
6898 #: ../src/guestfs-actions.pod:1792 ../fish/guestfish-actions.pod:1420
6899 msgid "replacing C</dev/vda> with the name of the installation device."
6903 #: ../src/guestfs-actions.pod:1796
6904 msgid "guestfs_head"
6908 #: ../src/guestfs-actions.pod:1798
6911 " char **guestfs_head (guestfs_h *g,\n"
6912 "\t\tconst char *path);\n"
6917 #: ../src/guestfs-actions.pod:1801 ../fish/guestfish-actions.pod:1426
6919 "This command returns up to the first 10 lines of a file as a list of strings."
6923 #: ../src/guestfs-actions.pod:1811
6924 msgid "guestfs_head_n"
6928 #: ../src/guestfs-actions.pod:1813
6931 " char **guestfs_head_n (guestfs_h *g,\n"
6932 "\t\tint nrlines,\n"
6933 "\t\tconst char *path);\n"
6938 #: ../src/guestfs-actions.pod:1817 ../fish/guestfish-actions.pod:1436
6940 "If the parameter C<nrlines> is a positive number, this returns the first "
6941 "C<nrlines> lines of the file C<path>."
6945 #: ../src/guestfs-actions.pod:1820 ../fish/guestfish-actions.pod:1439
6947 "If the parameter C<nrlines> is a negative number, this returns lines from "
6948 "the file C<path>, excluding the last C<nrlines> lines."
6952 #: ../src/guestfs-actions.pod:1823 ../src/guestfs-actions.pod:4725
6953 #: ../fish/guestfish-actions.pod:1442 ../fish/guestfish-actions.pod:3642
6954 msgid "If the parameter C<nrlines> is zero, this returns an empty list."
6958 #: ../src/guestfs-actions.pod:1832
6959 msgid "guestfs_hexdump"
6963 #: ../src/guestfs-actions.pod:1834
6966 " char *guestfs_hexdump (guestfs_h *g,\n"
6967 "\t\tconst char *path);\n"
6972 #: ../src/guestfs-actions.pod:1837 ../fish/guestfish-actions.pod:1451
6974 "This runs C<hexdump -C> on the given C<path>. The result is the human-"
6975 "readable, canonical hex dump of the file."
6979 #: ../src/guestfs-actions.pod:1846
6980 msgid "guestfs_initrd_cat"
6984 #: ../src/guestfs-actions.pod:1848
6987 " char *guestfs_initrd_cat (guestfs_h *g,\n"
6988 "\t\tconst char *initrdpath,\n"
6989 "\t\tconst char *filename,\n"
6990 "\t\tsize_t *size_r);\n"
6995 #: ../src/guestfs-actions.pod:1853 ../fish/guestfish-actions.pod:1461
6997 "This command unpacks the file C<filename> from the initrd file called "
6998 "C<initrdpath>. The filename must be given I<without> the initial C</> "
7003 #: ../src/guestfs-actions.pod:1857 ../fish/guestfish-actions.pod:1465
7005 "For example, in guestfish you could use the following command to examine the "
7006 "boot script (usually called C</init>) contained in a Linux initrd or "
7011 #: ../src/guestfs-actions.pod:1861 ../fish/guestfish-actions.pod:1469
7014 " initrd-cat /boot/initrd-<version>.img init\n"
7019 #: ../src/guestfs-actions.pod:1863
7020 msgid "See also C<guestfs_initrd_list>."
7024 #: ../src/guestfs-actions.pod:1865 ../src/guestfs-actions.pod:3683
7025 #: ../src/guestfs-actions.pod:3812
7027 "This function returns a buffer, or NULL on error. The size of the returned "
7028 "buffer is written to C<*size_r>. I<The caller must free the returned buffer "
7033 #: ../src/guestfs-actions.pod:1872
7034 msgid "guestfs_initrd_list"
7038 #: ../src/guestfs-actions.pod:1874
7041 " char **guestfs_initrd_list (guestfs_h *g,\n"
7042 "\t\tconst char *path);\n"
7047 #: ../src/guestfs-actions.pod:1877 ../fish/guestfish-actions.pod:1480
7048 msgid "This command lists out files contained in an initrd."
7052 #: ../src/guestfs-actions.pod:1879 ../fish/guestfish-actions.pod:1482
7054 "The files are listed without any initial C</> character. The files are "
7055 "listed in the order they appear (not necessarily alphabetical). Directory "
7056 "names are listed as separate items."
7060 #: ../src/guestfs-actions.pod:1883 ../fish/guestfish-actions.pod:1486
7062 "Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as "
7063 "initrd. We I<only> support the newer initramfs format (compressed cpio "
7068 #: ../src/guestfs-actions.pod:1891
7069 msgid "guestfs_inotify_add_watch"
7073 #: ../src/guestfs-actions.pod:1893
7076 " int64_t guestfs_inotify_add_watch (guestfs_h *g,\n"
7077 "\t\tconst char *path,\n"
7083 #: ../src/guestfs-actions.pod:1897 ../fish/guestfish-actions.pod:1494
7084 msgid "Watch C<path> for the events listed in C<mask>."
7088 #: ../src/guestfs-actions.pod:1899 ../fish/guestfish-actions.pod:1496
7090 "Note that if C<path> is a directory then events within that directory are "
7091 "watched, but this does I<not> happen recursively (in subdirectories)."
7095 #: ../src/guestfs-actions.pod:1903 ../fish/guestfish-actions.pod:1500
7097 "Note for non-C or non-Linux callers: the inotify events are defined by the "
7098 "Linux kernel ABI and are listed in C</usr/include/sys/inotify.h>."
7102 #: ../src/guestfs-actions.pod:1909
7103 msgid "guestfs_inotify_close"
7107 #: ../src/guestfs-actions.pod:1911
7110 " int guestfs_inotify_close (guestfs_h *g);\n"
7115 #: ../src/guestfs-actions.pod:1913 ../fish/guestfish-actions.pod:1508
7117 "This closes the inotify handle which was previously opened by inotify_init. "
7118 "It removes all watches, throws away any pending events, and deallocates all "
7123 #: ../src/guestfs-actions.pod:1919
7124 msgid "guestfs_inotify_files"
7128 #: ../src/guestfs-actions.pod:1921
7131 " char **guestfs_inotify_files (guestfs_h *g);\n"
7136 #: ../src/guestfs-actions.pod:1923
7138 "This function is a helpful wrapper around C<guestfs_inotify_read> which just "
7139 "returns a list of pathnames of objects that were touched. The returned "
7140 "pathnames are sorted and deduplicated."
7144 #: ../src/guestfs-actions.pod:1931
7145 msgid "guestfs_inotify_init"
7149 #: ../src/guestfs-actions.pod:1933
7152 " int guestfs_inotify_init (guestfs_h *g,\n"
7153 "\t\tint maxevents);\n"
7158 #: ../src/guestfs-actions.pod:1936 ../fish/guestfish-actions.pod:1524
7160 "This command creates a new inotify handle. The inotify subsystem can be "
7161 "used to notify events which happen to objects in the guest filesystem."
7165 #: ../src/guestfs-actions.pod:1940
7167 "C<maxevents> is the maximum number of events which will be queued up between "
7168 "calls to C<guestfs_inotify_read> or C<guestfs_inotify_files>. If this is "
7169 "passed as C<0>, then the kernel (or previously set) default is used. For "
7170 "Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel "
7171 "throws away events, but records the fact that it threw them away by setting "
7172 "a flag C<IN_Q_OVERFLOW> in the returned structure list (see "
7173 "C<guestfs_inotify_read>)."
7177 #: ../src/guestfs-actions.pod:1950
7179 "Before any events are generated, you have to add some watches to the "
7180 "internal watch list. See: C<guestfs_inotify_add_watch>, "
7181 "C<guestfs_inotify_rm_watch> and C<guestfs_inotify_watch_all>."
7185 #: ../src/guestfs-actions.pod:1956
7187 "Queued up events should be read periodically by calling "
7188 "C<guestfs_inotify_read> (or C<guestfs_inotify_files> which is just a helpful "
7189 "wrapper around C<guestfs_inotify_read>). If you don't read the events out "
7190 "often enough then you risk the internal queue overflowing."
7194 #: ../src/guestfs-actions.pod:1963
7196 "The handle should be closed after use by calling C<guestfs_inotify_close>. "
7197 "This also removes any watches automatically."
7201 #: ../src/guestfs-actions.pod:1967 ../fish/guestfish-actions.pod:1555
7203 "See also L<inotify(7)> for an overview of the inotify interface as exposed "
7204 "by the Linux kernel, which is roughly what we expose via libguestfs. Note "
7205 "that there is one global inotify handle per libguestfs instance."
7209 #: ../src/guestfs-actions.pod:1974
7210 msgid "guestfs_inotify_read"
7214 #: ../src/guestfs-actions.pod:1976
7217 " struct guestfs_inotify_event_list *guestfs_inotify_read (guestfs_h *g);\n"
7222 #: ../src/guestfs-actions.pod:1978 ../fish/guestfish-actions.pod:1564
7224 "Return the complete queue of events that have happened since the previous "
7229 #: ../src/guestfs-actions.pod:1981 ../fish/guestfish-actions.pod:1567
7230 msgid "If no events have happened, this returns an empty list."
7234 #: ../src/guestfs-actions.pod:1983 ../fish/guestfish-actions.pod:1569
7236 "I<Note>: In order to make sure that all events have been read, you must call "
7237 "this function repeatedly until it returns an empty list. The reason is that "
7238 "the call will read events up to the maximum appliance-to-host message size "
7239 "and leave remaining events in the queue."
7243 #: ../src/guestfs-actions.pod:1989
7245 "This function returns a C<struct guestfs_inotify_event_list *> (see "
7246 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
7247 "must call C<guestfs_free_inotify_event_list> after use>."
7251 #: ../src/guestfs-actions.pod:1994
7252 msgid "guestfs_inotify_rm_watch"
7256 #: ../src/guestfs-actions.pod:1996
7259 " int guestfs_inotify_rm_watch (guestfs_h *g,\n"
7265 #: ../src/guestfs-actions.pod:1999
7267 "Remove a previously defined inotify watch. See C<guestfs_inotify_add_watch>."
7271 #: ../src/guestfs-actions.pod:2004
7272 msgid "guestfs_inspect_get_arch"
7276 #: ../src/guestfs-actions.pod:2006
7279 " char *guestfs_inspect_get_arch (guestfs_h *g,\n"
7280 "\t\tconst char *root);\n"
7285 #: ../src/guestfs-actions.pod:2009 ../src/guestfs-actions.pod:2029
7286 #: ../src/guestfs-actions.pod:2079 ../src/guestfs-actions.pod:2102
7287 #: ../src/guestfs-actions.pod:2126 ../src/guestfs-actions.pod:2144
7288 #: ../src/guestfs-actions.pod:2174 ../src/guestfs-actions.pod:2195
7290 "This function should only be called with a root device string as returned by "
7291 "C<guestfs_inspect_os>."
7295 #: ../src/guestfs-actions.pod:2012
7297 "This returns the architecture of the inspected operating system. The "
7298 "possible return values are listed under C<guestfs_file_architecture>."
7302 #: ../src/guestfs-actions.pod:2016 ../fish/guestfish-actions.pod:1593
7304 "If the architecture could not be determined, then the string C<unknown> is "
7309 #: ../src/guestfs-actions.pod:2019 ../src/guestfs-actions.pod:2069
7310 #: ../src/guestfs-actions.pod:2117 ../src/guestfs-actions.pod:2185
7311 #: ../src/guestfs-actions.pod:2220 ../src/guestfs-actions.pod:2257
7312 #: ../fish/guestfish-actions.pod:1596 ../fish/guestfish-actions.pod:1642
7313 #: ../fish/guestfish-actions.pod:1681 ../fish/guestfish-actions.pod:1736
7314 #: ../fish/guestfish-actions.pod:1767 ../fish/guestfish-actions.pod:1801
7315 msgid "Please read L<guestfs(3)/INSPECTION> for more details."
7319 #: ../src/guestfs-actions.pod:2024
7320 msgid "guestfs_inspect_get_distro"
7324 #: ../src/guestfs-actions.pod:2026
7327 " char *guestfs_inspect_get_distro (guestfs_h *g,\n"
7328 "\t\tconst char *root);\n"
7333 #: ../src/guestfs-actions.pod:2032 ../fish/guestfish-actions.pod:1605
7335 "This returns the distro (distribution) of the inspected operating system."
7339 #: ../src/guestfs-actions.pod:2035 ../fish/guestfish-actions.pod:1608
7340 msgid "Currently defined distros are:"
7344 #: ../src/guestfs-actions.pod:2039 ../fish/guestfish-actions.pod:1612
7349 #: ../src/guestfs-actions.pod:2041 ../fish/guestfish-actions.pod:1614
7350 msgid "Debian or a Debian-derived distro such as Ubuntu."
7354 #: ../src/guestfs-actions.pod:2043 ../fish/guestfish-actions.pod:1616
7359 #: ../src/guestfs-actions.pod:2045 ../fish/guestfish-actions.pod:1618
7364 #: ../src/guestfs-actions.pod:2047 ../fish/guestfish-actions.pod:1620
7365 msgid "\"redhat-based\""
7369 #: ../src/guestfs-actions.pod:2049 ../fish/guestfish-actions.pod:1622
7370 msgid "Some Red Hat-derived distro."
7374 #: ../src/guestfs-actions.pod:2051 ../fish/guestfish-actions.pod:1624
7379 #: ../src/guestfs-actions.pod:2053 ../fish/guestfish-actions.pod:1626
7380 msgid "Red Hat Enterprise Linux and some derivatives."
7384 #: ../src/guestfs-actions.pod:2055 ../src/guestfs-actions.pod:2207
7385 #: ../fish/guestfish-actions.pod:1628 ../fish/guestfish-actions.pod:1754
7390 #: ../src/guestfs-actions.pod:2057 ../fish/guestfish-actions.pod:1630
7392 "Windows does not have distributions. This string is returned if the OS type "
7397 #: ../src/guestfs-actions.pod:2060 ../src/guestfs-actions.pod:2211
7398 #: ../fish/guestfish-actions.pod:1633 ../fish/guestfish-actions.pod:1758
7403 #: ../src/guestfs-actions.pod:2062 ../fish/guestfish-actions.pod:1635
7404 msgid "The distro could not be determined."
7408 #: ../src/guestfs-actions.pod:2066 ../src/guestfs-actions.pod:2217
7409 #: ../fish/guestfish-actions.pod:1639 ../fish/guestfish-actions.pod:1764
7411 "Future versions of libguestfs may return other strings here. The caller "
7412 "should be prepared to handle any string."
7416 #: ../src/guestfs-actions.pod:2074
7417 msgid "guestfs_inspect_get_filesystems"
7421 #: ../src/guestfs-actions.pod:2076
7424 " char **guestfs_inspect_get_filesystems (guestfs_h *g,\n"
7425 "\t\tconst char *root);\n"
7430 #: ../src/guestfs-actions.pod:2082 ../fish/guestfish-actions.pod:1651
7432 "This returns a list of all the filesystems that we think are associated with "
7433 "this operating system. This includes the root filesystem, other ordinary "
7434 "filesystems, and non-mounted devices like swap partitions."
7438 #: ../src/guestfs-actions.pod:2087 ../fish/guestfish-actions.pod:1656
7440 "In the case of a multi-boot virtual machine, it is possible for a filesystem "
7441 "to be shared between operating systems."
7445 #: ../src/guestfs-actions.pod:2090
7447 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
7448 "C<guestfs_inspect_get_mountpoints>."
7452 #: ../src/guestfs-actions.pod:2097
7453 msgid "guestfs_inspect_get_major_version"
7457 #: ../src/guestfs-actions.pod:2099
7460 " int guestfs_inspect_get_major_version (guestfs_h *g,\n"
7461 "\t\tconst char *root);\n"
7466 #: ../src/guestfs-actions.pod:2105 ../fish/guestfish-actions.pod:1669
7468 "This returns the major version number of the inspected operating system."
7472 #: ../src/guestfs-actions.pod:2108 ../fish/guestfish-actions.pod:1672
7474 "Windows uses a consistent versioning scheme which is I<not> reflected in the "
7475 "popular public names used by the operating system. Notably the operating "
7476 "system known as \"Windows 7\" is really version 6.1 (ie. major = 6, minor = "
7477 "1). You can find out the real versions corresponding to releases of Windows "
7478 "by consulting Wikipedia or MSDN."
7482 #: ../src/guestfs-actions.pod:2115 ../src/guestfs-actions.pod:2132
7483 #: ../fish/guestfish-actions.pod:1679 ../fish/guestfish-actions.pod:1693
7484 msgid "If the version could not be determined, then C<0> is returned."
7488 #: ../src/guestfs-actions.pod:2121
7489 msgid "guestfs_inspect_get_minor_version"
7493 #: ../src/guestfs-actions.pod:2123
7496 " int guestfs_inspect_get_minor_version (guestfs_h *g,\n"
7497 "\t\tconst char *root);\n"
7502 #: ../src/guestfs-actions.pod:2129 ../fish/guestfish-actions.pod:1690
7504 "This returns the minor version number of the inspected operating system."
7508 #: ../src/guestfs-actions.pod:2134
7510 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
7511 "C<guestfs_inspect_get_major_version>."
7515 #: ../src/guestfs-actions.pod:2139
7516 msgid "guestfs_inspect_get_mountpoints"
7520 #: ../src/guestfs-actions.pod:2141
7523 " char **guestfs_inspect_get_mountpoints (guestfs_h *g,\n"
7524 "\t\tconst char *root);\n"
7529 #: ../src/guestfs-actions.pod:2147 ../fish/guestfish-actions.pod:1705
7531 "This returns a hash of where we think the filesystems associated with this "
7532 "operating system should be mounted. Callers should note that this is at "
7533 "best an educated guess made by reading configuration files such as C</etc/"
7538 #: ../src/guestfs-actions.pod:2152 ../fish/guestfish-actions.pod:1710
7540 "Each element in the returned hashtable has a key which is the path of the "
7541 "mountpoint (eg. C</boot>) and a value which is the filesystem that would be "
7542 "mounted there (eg. C</dev/sda1>)."
7546 #: ../src/guestfs-actions.pod:2157 ../fish/guestfish-actions.pod:1715
7548 "Non-mounted devices such as swap devices are I<not> returned in this list."
7552 #: ../src/guestfs-actions.pod:2160
7554 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
7555 "C<guestfs_inspect_get_filesystems>."
7559 #: ../src/guestfs-actions.pod:2163 ../src/guestfs-actions.pod:3320
7560 #: ../src/guestfs-actions.pod:4842
7562 "This function returns a NULL-terminated array of strings, or NULL if there "
7563 "was an error. The array of strings will always have length C<2n+1>, where "
7564 "C<n> keys and values alternate, followed by the trailing NULL entry. I<The "
7565 "caller must free the strings and the array after use>."
7569 #: ../src/guestfs-actions.pod:2169
7570 msgid "guestfs_inspect_get_product_name"
7574 #: ../src/guestfs-actions.pod:2171
7577 " char *guestfs_inspect_get_product_name (guestfs_h *g,\n"
7578 "\t\tconst char *root);\n"
7583 #: ../src/guestfs-actions.pod:2177 ../fish/guestfish-actions.pod:1728
7585 "This returns the product name of the inspected operating system. The "
7586 "product name is generally some freeform string which can be displayed to the "
7587 "user, but should not be parsed by programs."
7591 #: ../src/guestfs-actions.pod:2182 ../fish/guestfish-actions.pod:1733
7593 "If the product name could not be determined, then the string C<unknown> is "
7598 #: ../src/guestfs-actions.pod:2190
7599 msgid "guestfs_inspect_get_type"
7603 #: ../src/guestfs-actions.pod:2192
7606 " char *guestfs_inspect_get_type (guestfs_h *g,\n"
7607 "\t\tconst char *root);\n"
7612 #: ../src/guestfs-actions.pod:2198 ../fish/guestfish-actions.pod:1745
7614 "This returns the type of the inspected operating system. Currently defined "
7619 #: ../src/guestfs-actions.pod:2203 ../fish/guestfish-actions.pod:1750
7624 #: ../src/guestfs-actions.pod:2205 ../fish/guestfish-actions.pod:1752
7625 msgid "Any Linux-based operating system."
7629 #: ../src/guestfs-actions.pod:2209 ../fish/guestfish-actions.pod:1756
7630 msgid "Any Microsoft Windows operating system."
7634 #: ../src/guestfs-actions.pod:2213 ../fish/guestfish-actions.pod:1760
7635 msgid "The operating system type could not be determined."
7639 #: ../src/guestfs-actions.pod:2225
7640 msgid "guestfs_inspect_os"
7644 #: ../src/guestfs-actions.pod:2227
7647 " char **guestfs_inspect_os (guestfs_h *g);\n"
7652 #: ../src/guestfs-actions.pod:2229 ../fish/guestfish-actions.pod:1773
7654 "This function uses other libguestfs functions and certain heuristics to "
7655 "inspect the disk(s) (usually disks belonging to a virtual machine), looking "
7656 "for operating systems."
7660 #: ../src/guestfs-actions.pod:2233 ../fish/guestfish-actions.pod:1777
7661 msgid "The list returned is empty if no operating systems were found."
7665 #: ../src/guestfs-actions.pod:2235 ../fish/guestfish-actions.pod:1779
7667 "If one operating system was found, then this returns a list with a single "
7668 "element, which is the name of the root filesystem of this operating system. "
7669 "It is also possible for this function to return a list containing more than "
7670 "one element, indicating a dual-boot or multi-boot virtual machine, with each "
7671 "element being the root filesystem of one of the operating systems."
7675 #: ../src/guestfs-actions.pod:2242
7677 "You can pass the root string(s) returned to other C<guestfs_inspect_get_*> "
7678 "functions in order to query further information about each operating system, "
7679 "such as the name and version."
7683 #: ../src/guestfs-actions.pod:2247
7685 "This function uses other libguestfs features such as C<guestfs_mount_ro> and "
7686 "C<guestfs_umount_all> in order to mount and unmount filesystems and look at "
7687 "the contents. This should be called with no disks currently mounted. The "
7688 "function may also use Augeas, so any existing Augeas handle will be closed."
7692 #: ../src/guestfs-actions.pod:2253 ../fish/guestfish-actions.pod:1797
7694 "This function cannot decrypt encrypted disks. The caller must do that first "
7695 "(supplying the necessary keys) if the disk is encrypted."
7699 #: ../src/guestfs-actions.pod:2263
7700 msgid "guestfs_is_busy"
7704 #: ../src/guestfs-actions.pod:2265
7707 " int guestfs_is_busy (guestfs_h *g);\n"
7712 #: ../src/guestfs-actions.pod:2267 ../fish/guestfish-actions.pod:1807
7714 "This returns true iff this handle is busy processing a command (in the "
7719 #: ../src/guestfs-actions.pod:2274
7720 msgid "guestfs_is_config"
7724 #: ../src/guestfs-actions.pod:2276
7727 " int guestfs_is_config (guestfs_h *g);\n"
7732 #: ../src/guestfs-actions.pod:2278 ../fish/guestfish-actions.pod:1816
7734 "This returns true iff this handle is being configured (in the C<CONFIG> "
7739 #: ../src/guestfs-actions.pod:2285
7740 msgid "guestfs_is_dir"
7744 #: ../src/guestfs-actions.pod:2287
7747 " int guestfs_is_dir (guestfs_h *g,\n"
7748 "\t\tconst char *path);\n"
7753 #: ../src/guestfs-actions.pod:2290 ../fish/guestfish-actions.pod:1825
7755 "This returns C<true> if and only if there is a directory with the given "
7756 "C<path> name. Note that it returns false for other objects like files."
7760 #: ../src/guestfs-actions.pod:2294 ../src/guestfs-actions.pod:2307
7761 msgid "See also C<guestfs_stat>."
7765 #: ../src/guestfs-actions.pod:2298
7766 msgid "guestfs_is_file"
7770 #: ../src/guestfs-actions.pod:2300
7773 " int guestfs_is_file (guestfs_h *g,\n"
7774 "\t\tconst char *path);\n"
7779 #: ../src/guestfs-actions.pod:2303 ../fish/guestfish-actions.pod:1835
7781 "This returns C<true> if and only if there is a file with the given C<path> "
7782 "name. Note that it returns false for other objects like directories."
7786 #: ../src/guestfs-actions.pod:2311
7787 msgid "guestfs_is_launching"
7791 #: ../src/guestfs-actions.pod:2313
7794 " int guestfs_is_launching (guestfs_h *g);\n"
7799 #: ../src/guestfs-actions.pod:2315 ../fish/guestfish-actions.pod:1845
7801 "This returns true iff this handle is launching the subprocess (in the "
7802 "C<LAUNCHING> state)."
7806 #: ../src/guestfs-actions.pod:2322
7807 msgid "guestfs_is_lv"
7811 #: ../src/guestfs-actions.pod:2324
7814 " int guestfs_is_lv (guestfs_h *g,\n"
7815 "\t\tconst char *device);\n"
7820 #: ../src/guestfs-actions.pod:2327 ../fish/guestfish-actions.pod:1854
7822 "This command tests whether C<device> is a logical volume, and returns true "
7823 "iff this is the case."
7827 #: ../src/guestfs-actions.pod:2332
7828 msgid "guestfs_is_ready"
7832 #: ../src/guestfs-actions.pod:2334
7835 " int guestfs_is_ready (guestfs_h *g);\n"
7840 #: ../src/guestfs-actions.pod:2336 ../fish/guestfish-actions.pod:1861
7842 "This returns true iff this handle is ready to accept commands (in the "
7847 #: ../src/guestfs-actions.pod:2343
7848 msgid "guestfs_kill_subprocess"
7852 #: ../src/guestfs-actions.pod:2345
7855 " int guestfs_kill_subprocess (guestfs_h *g);\n"
7860 #: ../src/guestfs-actions.pod:2347 ../fish/guestfish-actions.pod:1870
7861 msgid "This kills the qemu subprocess. You should never need to call this."
7865 #: ../src/guestfs-actions.pod:2351
7866 msgid "guestfs_launch"
7870 #: ../src/guestfs-actions.pod:2353
7873 " int guestfs_launch (guestfs_h *g);\n"
7878 #: ../src/guestfs-actions.pod:2355 ../fish/guestfish-actions.pod:1876
7880 "Internally libguestfs is implemented by running a virtual machine using "
7885 #: ../src/guestfs-actions.pod:2358 ../fish/guestfish-actions.pod:1879
7887 "You should call this after configuring the handle (eg. adding drives) but "
7888 "before performing any actions."
7892 #: ../src/guestfs-actions.pod:2363
7893 msgid "guestfs_lchown"
7897 #: ../src/guestfs-actions.pod:2365
7900 " int guestfs_lchown (guestfs_h *g,\n"
7903 "\t\tconst char *path);\n"
7908 #: ../src/guestfs-actions.pod:2370
7910 "Change the file owner to C<owner> and group to C<group>. This is like "
7911 "C<guestfs_chown> but if C<path> is a symlink then the link itself is "
7912 "changed, not the target."
7916 #: ../src/guestfs-actions.pod:2380
7917 msgid "guestfs_lgetxattrs"
7921 #: ../src/guestfs-actions.pod:2382
7924 " struct guestfs_xattr_list *guestfs_lgetxattrs (guestfs_h *g,\n"
7925 "\t\tconst char *path);\n"
7930 #: ../src/guestfs-actions.pod:2385
7932 "This is the same as C<guestfs_getxattrs>, but if C<path> is a symbolic link, "
7933 "then it returns the extended attributes of the link itself."
7937 #: ../src/guestfs-actions.pod:2394
7938 msgid "guestfs_list_devices"
7942 #: ../src/guestfs-actions.pod:2396
7945 " char **guestfs_list_devices (guestfs_h *g);\n"
7950 #: ../src/guestfs-actions.pod:2398 ../fish/guestfish-actions.pod:1906
7951 msgid "List all the block devices."
7955 #: ../src/guestfs-actions.pod:2400 ../fish/guestfish-actions.pod:1908
7956 msgid "The full block device names are returned, eg. C</dev/sda>"
7960 #: ../src/guestfs-actions.pod:2406
7961 msgid "guestfs_list_partitions"
7965 #: ../src/guestfs-actions.pod:2408
7968 " char **guestfs_list_partitions (guestfs_h *g);\n"
7973 #: ../src/guestfs-actions.pod:2410 ../fish/guestfish-actions.pod:1914
7974 msgid "List all the partitions detected on all block devices."
7978 #: ../src/guestfs-actions.pod:2412 ../fish/guestfish-actions.pod:1916
7979 msgid "The full partition device names are returned, eg. C</dev/sda1>"
7983 #: ../src/guestfs-actions.pod:2414
7985 "This does not return logical volumes. For that you will need to call "
7990 #: ../src/guestfs-actions.pod:2421
7995 #: ../src/guestfs-actions.pod:2423
7998 " char *guestfs_ll (guestfs_h *g,\n"
7999 "\t\tconst char *directory);\n"
8004 #: ../src/guestfs-actions.pod:2426 ../fish/guestfish-actions.pod:1925
8006 "List the files in C<directory> (relative to the root directory, there is no "
8007 "cwd) in the format of 'ls -la'."
8011 #: ../src/guestfs-actions.pod:2429 ../fish/guestfish-actions.pod:1928
8013 "This command is mostly useful for interactive sessions. It is I<not> "
8014 "intended that you try to parse the output string."
8018 #: ../src/guestfs-actions.pod:2435
8023 #: ../src/guestfs-actions.pod:2437
8026 " int guestfs_ln (guestfs_h *g,\n"
8027 "\t\tconst char *target,\n"
8028 "\t\tconst char *linkname);\n"
8033 #: ../src/guestfs-actions.pod:2441 ../fish/guestfish-actions.pod:1935
8034 msgid "This command creates a hard link using the C<ln> command."
8038 #: ../src/guestfs-actions.pod:2445
8039 msgid "guestfs_ln_f"
8043 #: ../src/guestfs-actions.pod:2447
8046 " int guestfs_ln_f (guestfs_h *g,\n"
8047 "\t\tconst char *target,\n"
8048 "\t\tconst char *linkname);\n"
8053 #: ../src/guestfs-actions.pod:2451 ../fish/guestfish-actions.pod:1941
8055 "This command creates a hard link using the C<ln -f> command. The C<-f> "
8056 "option removes the link (C<linkname>) if it exists already."
8060 #: ../src/guestfs-actions.pod:2456
8061 msgid "guestfs_ln_s"
8065 #: ../src/guestfs-actions.pod:2458
8068 " int guestfs_ln_s (guestfs_h *g,\n"
8069 "\t\tconst char *target,\n"
8070 "\t\tconst char *linkname);\n"
8075 #: ../src/guestfs-actions.pod:2462 ../fish/guestfish-actions.pod:1948
8076 msgid "This command creates a symbolic link using the C<ln -s> command."
8080 #: ../src/guestfs-actions.pod:2466
8081 msgid "guestfs_ln_sf"
8085 #: ../src/guestfs-actions.pod:2468
8088 " int guestfs_ln_sf (guestfs_h *g,\n"
8089 "\t\tconst char *target,\n"
8090 "\t\tconst char *linkname);\n"
8095 #: ../src/guestfs-actions.pod:2472 ../fish/guestfish-actions.pod:1954
8097 "This command creates a symbolic link using the C<ln -sf> command, The C<-f> "
8098 "option removes the link (C<linkname>) if it exists already."
8102 #: ../src/guestfs-actions.pod:2477
8103 msgid "guestfs_lremovexattr"
8107 #: ../src/guestfs-actions.pod:2479
8110 " int guestfs_lremovexattr (guestfs_h *g,\n"
8111 "\t\tconst char *xattr,\n"
8112 "\t\tconst char *path);\n"
8117 #: ../src/guestfs-actions.pod:2483
8119 "This is the same as C<guestfs_removexattr>, but if C<path> is a symbolic "
8120 "link, then it removes an extended attribute of the link itself."
8124 #: ../src/guestfs-actions.pod:2489
8129 #: ../src/guestfs-actions.pod:2491
8132 " char **guestfs_ls (guestfs_h *g,\n"
8133 "\t\tconst char *directory);\n"
8138 #: ../src/guestfs-actions.pod:2494 ../fish/guestfish-actions.pod:1969
8140 "List the files in C<directory> (relative to the root directory, there is no "
8141 "cwd). The '.' and '..' entries are not returned, but hidden files are shown."
8145 #: ../src/guestfs-actions.pod:2498
8147 "This command is mostly useful for interactive sessions. Programs should "
8148 "probably use C<guestfs_readdir> instead."
8152 #: ../src/guestfs-actions.pod:2505
8153 msgid "guestfs_lsetxattr"
8157 #: ../src/guestfs-actions.pod:2507
8160 " int guestfs_lsetxattr (guestfs_h *g,\n"
8161 "\t\tconst char *xattr,\n"
8162 "\t\tconst char *val,\n"
8164 "\t\tconst char *path);\n"
8169 #: ../src/guestfs-actions.pod:2513
8171 "This is the same as C<guestfs_setxattr>, but if C<path> is a symbolic link, "
8172 "then it sets an extended attribute of the link itself."
8176 #: ../src/guestfs-actions.pod:2519
8177 msgid "guestfs_lstat"
8181 #: ../src/guestfs-actions.pod:2521
8184 " struct guestfs_stat *guestfs_lstat (guestfs_h *g,\n"
8185 "\t\tconst char *path);\n"
8190 #: ../src/guestfs-actions.pod:2524 ../src/guestfs-actions.pod:4507
8191 #: ../fish/guestfish-actions.pod:1988 ../fish/guestfish-actions.pod:3477
8192 msgid "Returns file information for the given C<path>."
8196 #: ../src/guestfs-actions.pod:2526
8198 "This is the same as C<guestfs_stat> except that if C<path> is a symbolic "
8199 "link, then the link is stat-ed, not the file it refers to."
8203 #: ../src/guestfs-actions.pod:2530 ../fish/guestfish-actions.pod:1994
8204 msgid "This is the same as the C<lstat(2)> system call."
8208 #: ../src/guestfs-actions.pod:2532 ../src/guestfs-actions.pod:4511
8210 "This function returns a C<struct guestfs_stat *>, or NULL if there was an "
8211 "error. I<The caller must call C<guestfs_free_stat> after use>."
8215 #: ../src/guestfs-actions.pod:2536
8216 msgid "guestfs_lstatlist"
8220 #: ../src/guestfs-actions.pod:2538
8223 " struct guestfs_stat_list *guestfs_lstatlist (guestfs_h *g,\n"
8224 "\t\tconst char *path,\n"
8225 "\t\tchar *const *names);\n"
8230 #: ../src/guestfs-actions.pod:2542
8232 "This call allows you to perform the C<guestfs_lstat> operation on multiple "
8233 "files, where all files are in the directory C<path>. C<names> is the list "
8234 "of files from this directory."
8238 #: ../src/guestfs-actions.pod:2546 ../fish/guestfish-actions.pod:2004
8240 "On return you get a list of stat structs, with a one-to-one correspondence "
8241 "to the C<names> list. If any name did not exist or could not be lstat'd, "
8242 "then the C<ino> field of that structure is set to C<-1>."
8246 #: ../src/guestfs-actions.pod:2551
8248 "This call is intended for programs that want to efficiently list a directory "
8249 "contents without making many round-trips. See also C<guestfs_lxattrlist> "
8250 "for a similarly efficient call for getting extended attributes. Very long "
8251 "directory listings might cause the protocol message size to be exceeded, "
8252 "causing this call to fail. The caller must split up such requests into "
8253 "smaller groups of names."
8257 #: ../src/guestfs-actions.pod:2559
8259 "This function returns a C<struct guestfs_stat_list *> (see E<lt>guestfs-"
8260 "structs.hE<gt>), or NULL if there was an error. I<The caller must call "
8261 "C<guestfs_free_stat_list> after use>."
8265 #: ../src/guestfs-actions.pod:2564
8266 msgid "guestfs_luks_add_key"
8270 #: ../src/guestfs-actions.pod:2566
8273 " int guestfs_luks_add_key (guestfs_h *g,\n"
8274 "\t\tconst char *device,\n"
8275 "\t\tconst char *key,\n"
8276 "\t\tconst char *newkey,\n"
8277 "\t\tint keyslot);\n"
8282 #: ../src/guestfs-actions.pod:2572 ../fish/guestfish-actions.pod:2021
8284 "This command adds a new key on LUKS device C<device>. C<key> is any "
8285 "existing key, and is used to access the device. C<newkey> is the new key to "
8286 "add. C<keyslot> is the key slot that will be replaced."
8290 #: ../src/guestfs-actions.pod:2577
8292 "Note that if C<keyslot> already contains a key, then this command will "
8293 "fail. You have to use C<guestfs_luks_kill_slot> first to remove that key."
8297 #: ../src/guestfs-actions.pod:2583 ../src/guestfs-actions.pod:2617
8298 #: ../src/guestfs-actions.pod:2637 ../src/guestfs-actions.pod:2654
8299 #: ../src/guestfs-actions.pod:2683 ../src/guestfs-actions.pod:2699
8301 "This function takes a key or passphrase parameter which could contain "
8302 "sensitive material. Read the section L</KEYS AND PASSPHRASES> for more "
8307 #: ../src/guestfs-actions.pod:2587
8308 msgid "guestfs_luks_close"
8312 #: ../src/guestfs-actions.pod:2589
8315 " int guestfs_luks_close (guestfs_h *g,\n"
8316 "\t\tconst char *device);\n"
8321 #: ../src/guestfs-actions.pod:2592
8323 "This closes a LUKS device that was created earlier by C<guestfs_luks_open> "
8324 "or C<guestfs_luks_open_ro>. The C<device> parameter must be the name of the "
8325 "LUKS mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
8326 "underlying block device."
8330 #: ../src/guestfs-actions.pod:2600
8331 msgid "guestfs_luks_format"
8335 #: ../src/guestfs-actions.pod:2602
8338 " int guestfs_luks_format (guestfs_h *g,\n"
8339 "\t\tconst char *device,\n"
8340 "\t\tconst char *key,\n"
8341 "\t\tint keyslot);\n"
8346 #: ../src/guestfs-actions.pod:2607 ../fish/guestfish-actions.pod:2047
8348 "This command erases existing data on C<device> and formats the device as a "
8349 "LUKS encrypted device. C<key> is the initial key, which is added to key "
8350 "slot C<slot>. (LUKS supports 8 key slots, numbered 0-7)."
8354 #: ../src/guestfs-actions.pod:2614 ../src/guestfs-actions.pod:2634
8355 #: ../src/guestfs-actions.pod:2736 ../src/guestfs-actions.pod:3448
8356 #: ../src/guestfs-actions.pod:4048 ../src/guestfs-actions.pod:4369
8357 #: ../src/guestfs-actions.pod:4389 ../src/guestfs-actions.pod:4412
8358 #: ../src/guestfs-actions.pod:5351 ../fish/guestfish-actions.pod:2055
8359 #: ../fish/guestfish-actions.pod:2068 ../fish/guestfish-actions.pod:2139
8360 #: ../fish/guestfish-actions.pod:2654 ../fish/guestfish-actions.pod:3118
8361 #: ../fish/guestfish-actions.pod:3376 ../fish/guestfish-actions.pod:3392
8362 #: ../fish/guestfish-actions.pod:3407 ../fish/guestfish-actions.pod:4095
8364 "B<This command is dangerous. Without careful use you can easily destroy all "
8369 #: ../src/guestfs-actions.pod:2621
8370 msgid "guestfs_luks_format_cipher"
8374 #: ../src/guestfs-actions.pod:2623
8377 " int guestfs_luks_format_cipher (guestfs_h *g,\n"
8378 "\t\tconst char *device,\n"
8379 "\t\tconst char *key,\n"
8380 "\t\tint keyslot,\n"
8381 "\t\tconst char *cipher);\n"
8386 #: ../src/guestfs-actions.pod:2629
8388 "This command is the same as C<guestfs_luks_format> but it also allows you to "
8389 "set the C<cipher> used."
8393 #: ../src/guestfs-actions.pod:2641
8394 msgid "guestfs_luks_kill_slot"
8398 #: ../src/guestfs-actions.pod:2643
8401 " int guestfs_luks_kill_slot (guestfs_h *g,\n"
8402 "\t\tconst char *device,\n"
8403 "\t\tconst char *key,\n"
8404 "\t\tint keyslot);\n"
8409 #: ../src/guestfs-actions.pod:2648 ../fish/guestfish-actions.pod:2075
8411 "This command deletes the key in key slot C<keyslot> from the encrypted LUKS "
8412 "device C<device>. C<key> must be one of the I<other> keys."
8416 #: ../src/guestfs-actions.pod:2658
8417 msgid "guestfs_luks_open"
8421 #: ../src/guestfs-actions.pod:2660
8424 " int guestfs_luks_open (guestfs_h *g,\n"
8425 "\t\tconst char *device,\n"
8426 "\t\tconst char *key,\n"
8427 "\t\tconst char *mapname);\n"
8432 #: ../src/guestfs-actions.pod:2665 ../fish/guestfish-actions.pod:2086
8434 "This command opens a block device which has been encrypted according to the "
8435 "Linux Unified Key Setup (LUKS) standard."
8439 #: ../src/guestfs-actions.pod:2668 ../fish/guestfish-actions.pod:2089
8440 msgid "C<device> is the encrypted block device or partition."
8444 #: ../src/guestfs-actions.pod:2670 ../fish/guestfish-actions.pod:2091
8446 "The caller must supply one of the keys associated with the LUKS block "
8447 "device, in the C<key> parameter."
8451 #: ../src/guestfs-actions.pod:2673 ../fish/guestfish-actions.pod:2094
8453 "This creates a new block device called C</dev/mapper/mapname>. Reads and "
8454 "writes to this block device are decrypted from and encrypted to the "
8455 "underlying C<device> respectively."
8459 #: ../src/guestfs-actions.pod:2677
8461 "If this block device contains LVM volume groups, then calling "
8462 "C<guestfs_vgscan> followed by C<guestfs_vg_activate_all> will make them "
8467 #: ../src/guestfs-actions.pod:2687
8468 msgid "guestfs_luks_open_ro"
8472 #: ../src/guestfs-actions.pod:2689
8475 " int guestfs_luks_open_ro (guestfs_h *g,\n"
8476 "\t\tconst char *device,\n"
8477 "\t\tconst char *key,\n"
8478 "\t\tconst char *mapname);\n"
8483 #: ../src/guestfs-actions.pod:2694
8485 "This is the same as C<guestfs_luks_open> except that a read-only mapping is "
8490 #: ../src/guestfs-actions.pod:2703
8491 msgid "guestfs_lvcreate"
8495 #: ../src/guestfs-actions.pod:2705
8498 " int guestfs_lvcreate (guestfs_h *g,\n"
8499 "\t\tconst char *logvol,\n"
8500 "\t\tconst char *volgroup,\n"
8501 "\t\tint mbytes);\n"
8506 #: ../src/guestfs-actions.pod:2710 ../fish/guestfish-actions.pod:2119
8508 "This creates an LVM logical volume called C<logvol> on the volume group "
8509 "C<volgroup>, with C<size> megabytes."
8513 #: ../src/guestfs-actions.pod:2715
8514 msgid "guestfs_lvm_clear_filter"
8518 #: ../src/guestfs-actions.pod:2717
8521 " int guestfs_lvm_clear_filter (guestfs_h *g);\n"
8526 #: ../src/guestfs-actions.pod:2719
8528 "This undoes the effect of C<guestfs_lvm_set_filter>. LVM will be able to "
8529 "see every block device."
8533 #: ../src/guestfs-actions.pod:2722 ../src/guestfs-actions.pod:2758
8534 #: ../fish/guestfish-actions.pod:2129 ../fish/guestfish-actions.pod:2160
8536 "This command also clears the LVM cache and performs a volume group scan."
8540 #: ../src/guestfs-actions.pod:2727
8541 msgid "guestfs_lvm_remove_all"
8545 #: ../src/guestfs-actions.pod:2729
8548 " int guestfs_lvm_remove_all (guestfs_h *g);\n"
8553 #: ../src/guestfs-actions.pod:2731 ../fish/guestfish-actions.pod:2136
8555 "This command removes all LVM logical volumes, volume groups and physical "
8560 #: ../src/guestfs-actions.pod:2739
8561 msgid "guestfs_lvm_set_filter"
8565 #: ../src/guestfs-actions.pod:2741
8568 " int guestfs_lvm_set_filter (guestfs_h *g,\n"
8569 "\t\tchar *const *devices);\n"
8574 #: ../src/guestfs-actions.pod:2744 ../fish/guestfish-actions.pod:2146
8576 "This sets the LVM device filter so that LVM will only be able to \"see\" the "
8577 "block devices in the list C<devices>, and will ignore all other attached "
8582 #: ../src/guestfs-actions.pod:2748 ../fish/guestfish-actions.pod:2150
8584 "Where disk image(s) contain duplicate PVs or VGs, this command is useful to "
8585 "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also "
8586 "there are two types of duplication possible: either cloned PVs/VGs which "
8587 "have identical UUIDs; or VGs that are not cloned but just happen to have the "
8588 "same name. In normal operation you cannot create this situation, but you "
8589 "can do it outside LVM, eg. by cloning disk images or by bit twiddling "
8590 "inside the LVM metadata."
8594 #: ../src/guestfs-actions.pod:2761 ../fish/guestfish-actions.pod:2163
8595 msgid "You can filter whole block devices or individual partitions."
8599 #: ../src/guestfs-actions.pod:2763 ../fish/guestfish-actions.pod:2165
8601 "You cannot use this if any VG is currently in use (eg. contains a mounted "
8602 "filesystem), even if you are not filtering out that VG."
8606 #: ../src/guestfs-actions.pod:2769
8607 msgid "guestfs_lvremove"
8611 #: ../src/guestfs-actions.pod:2771
8614 " int guestfs_lvremove (guestfs_h *g,\n"
8615 "\t\tconst char *device);\n"
8620 #: ../src/guestfs-actions.pod:2774 ../fish/guestfish-actions.pod:2173
8622 "Remove an LVM logical volume C<device>, where C<device> is the path to the "
8623 "LV, such as C</dev/VG/LV>."
8627 #: ../src/guestfs-actions.pod:2777 ../fish/guestfish-actions.pod:2176
8629 "You can also remove all LVs in a volume group by specifying the VG name, C</"
8634 #: ../src/guestfs-actions.pod:2782
8635 msgid "guestfs_lvrename"
8639 #: ../src/guestfs-actions.pod:2784
8642 " int guestfs_lvrename (guestfs_h *g,\n"
8643 "\t\tconst char *logvol,\n"
8644 "\t\tconst char *newlogvol);\n"
8649 #: ../src/guestfs-actions.pod:2788 ../fish/guestfish-actions.pod:2183
8650 msgid "Rename a logical volume C<logvol> with the new name C<newlogvol>."
8654 #: ../src/guestfs-actions.pod:2792
8655 msgid "guestfs_lvresize"
8659 #: ../src/guestfs-actions.pod:2794
8662 " int guestfs_lvresize (guestfs_h *g,\n"
8663 "\t\tconst char *device,\n"
8664 "\t\tint mbytes);\n"
8669 #: ../src/guestfs-actions.pod:2798 ../fish/guestfish-actions.pod:2189
8671 "This resizes (expands or shrinks) an existing LVM logical volume to "
8672 "C<mbytes>. When reducing, data in the reduced part is lost."
8676 #: ../src/guestfs-actions.pod:2804
8677 msgid "guestfs_lvresize_free"
8681 #: ../src/guestfs-actions.pod:2806
8684 " int guestfs_lvresize_free (guestfs_h *g,\n"
8685 "\t\tconst char *lv,\n"
8686 "\t\tint percent);\n"
8691 #: ../src/guestfs-actions.pod:2810 ../fish/guestfish-actions.pod:2197
8693 "This expands an existing logical volume C<lv> so that it fills C<pc>% of the "
8694 "remaining free space in the volume group. Commonly you would call this with "
8695 "pc = 100 which expands the logical volume as much as possible, using all "
8696 "remaining free space in the volume group."
8700 #: ../src/guestfs-actions.pod:2818
8705 #: ../src/guestfs-actions.pod:2820
8708 " char **guestfs_lvs (guestfs_h *g);\n"
8713 #: ../src/guestfs-actions.pod:2822 ../fish/guestfish-actions.pod:2207
8715 "List all the logical volumes detected. This is the equivalent of the L<lvs"
8720 #: ../src/guestfs-actions.pod:2825 ../fish/guestfish-actions.pod:2210
8722 "This returns a list of the logical volume device names (eg. C</dev/"
8723 "VolGroup00/LogVol00>)."
8727 #: ../src/guestfs-actions.pod:2828
8728 msgid "See also C<guestfs_lvs_full>."
8732 #: ../src/guestfs-actions.pod:2834
8733 msgid "guestfs_lvs_full"
8737 #: ../src/guestfs-actions.pod:2836
8740 " struct guestfs_lvm_lv_list *guestfs_lvs_full (guestfs_h *g);\n"
8745 #: ../src/guestfs-actions.pod:2838 ../fish/guestfish-actions.pod:2219
8747 "List all the logical volumes detected. This is the equivalent of the L<lvs"
8748 "(8)> command. The \"full\" version includes all fields."
8752 #: ../src/guestfs-actions.pod:2841
8754 "This function returns a C<struct guestfs_lvm_lv_list *> (see E<lt>guestfs-"
8755 "structs.hE<gt>), or NULL if there was an error. I<The caller must call "
8756 "C<guestfs_free_lvm_lv_list> after use>."
8760 #: ../src/guestfs-actions.pod:2846
8761 msgid "guestfs_lvuuid"
8765 #: ../src/guestfs-actions.pod:2848
8768 " char *guestfs_lvuuid (guestfs_h *g,\n"
8769 "\t\tconst char *device);\n"
8774 #: ../src/guestfs-actions.pod:2851 ../fish/guestfish-actions.pod:2226
8775 msgid "This command returns the UUID of the LVM LV C<device>."
8779 #: ../src/guestfs-actions.pod:2856
8780 msgid "guestfs_lxattrlist"
8784 #: ../src/guestfs-actions.pod:2858
8787 " struct guestfs_xattr_list *guestfs_lxattrlist (guestfs_h *g,\n"
8788 "\t\tconst char *path,\n"
8789 "\t\tchar *const *names);\n"
8794 #: ../src/guestfs-actions.pod:2862 ../fish/guestfish-actions.pod:2232
8796 "This call allows you to get the extended attributes of multiple files, where "
8797 "all files are in the directory C<path>. C<names> is the list of files from "
8802 #: ../src/guestfs-actions.pod:2866 ../fish/guestfish-actions.pod:2236
8804 "On return you get a flat list of xattr structs which must be interpreted "
8805 "sequentially. The first xattr struct always has a zero-length C<attrname>. "
8806 "C<attrval> in this struct is zero-length to indicate there was an error "
8807 "doing C<lgetxattr> for this file, I<or> is a C string which is a decimal "
8808 "number (the number of following attributes for this file, which could be C<"
8809 "\"0\">). Then after the first xattr struct are the zero or more attributes "
8810 "for the first named file. This repeats for the second and subsequent files."
8814 #: ../src/guestfs-actions.pod:2876
8816 "This call is intended for programs that want to efficiently list a directory "
8817 "contents without making many round-trips. See also C<guestfs_lstatlist> for "
8818 "a similarly efficient call for getting standard stats. Very long directory "
8819 "listings might cause the protocol message size to be exceeded, causing this "
8820 "call to fail. The caller must split up such requests into smaller groups of "
8825 #: ../src/guestfs-actions.pod:2889
8826 msgid "guestfs_mkdir"
8830 #: ../src/guestfs-actions.pod:2891
8833 " int guestfs_mkdir (guestfs_h *g,\n"
8834 "\t\tconst char *path);\n"
8839 #: ../src/guestfs-actions.pod:2894 ../fish/guestfish-actions.pod:2258
8840 msgid "Create a directory named C<path>."
8844 #: ../src/guestfs-actions.pod:2898
8845 msgid "guestfs_mkdir_mode"
8849 #: ../src/guestfs-actions.pod:2900
8852 " int guestfs_mkdir_mode (guestfs_h *g,\n"
8853 "\t\tconst char *path,\n"
8859 #: ../src/guestfs-actions.pod:2904 ../fish/guestfish-actions.pod:2264
8861 "This command creates a directory, setting the initial permissions of the "
8862 "directory to C<mode>."
8866 #: ../src/guestfs-actions.pod:2907 ../fish/guestfish-actions.pod:2267
8868 "For common Linux filesystems, the actual mode which is set will be C<mode & "
8869 "~umask & 01777>. Non-native-Linux filesystems may interpret the mode in "
8874 #: ../src/guestfs-actions.pod:2911
8875 msgid "See also C<guestfs_mkdir>, C<guestfs_umask>"
8879 #: ../src/guestfs-actions.pod:2915
8880 msgid "guestfs_mkdir_p"
8884 #: ../src/guestfs-actions.pod:2917
8887 " int guestfs_mkdir_p (guestfs_h *g,\n"
8888 "\t\tconst char *path);\n"
8893 #: ../src/guestfs-actions.pod:2920 ../fish/guestfish-actions.pod:2277
8895 "Create a directory named C<path>, creating any parent directories as "
8896 "necessary. This is like the C<mkdir -p> shell command."
8900 #: ../src/guestfs-actions.pod:2925
8901 msgid "guestfs_mkdtemp"
8905 #: ../src/guestfs-actions.pod:2927
8908 " char *guestfs_mkdtemp (guestfs_h *g,\n"
8909 "\t\tconst char *template);\n"
8914 #: ../src/guestfs-actions.pod:2930 ../fish/guestfish-actions.pod:2284
8916 "This command creates a temporary directory. The C<template> parameter "
8917 "should be a full pathname for the temporary directory name with the final "
8918 "six characters being \"XXXXXX\"."
8922 #: ../src/guestfs-actions.pod:2935 ../fish/guestfish-actions.pod:2289
8924 "For example: \"/tmp/myprogXXXXXX\" or \"/Temp/myprogXXXXXX\", the second one "
8925 "being suitable for Windows filesystems."
8929 #: ../src/guestfs-actions.pod:2938 ../fish/guestfish-actions.pod:2292
8930 msgid "The name of the temporary directory that was created is returned."
8934 #: ../src/guestfs-actions.pod:2941 ../fish/guestfish-actions.pod:2295
8935 msgid "The temporary directory is created with mode 0700 and is owned by root."
8939 #: ../src/guestfs-actions.pod:2944 ../fish/guestfish-actions.pod:2298
8941 "The caller is responsible for deleting the temporary directory and its "
8942 "contents after use."
8946 #: ../src/guestfs-actions.pod:2947 ../fish/guestfish-actions.pod:2301
8947 msgid "See also: L<mkdtemp(3)>"
8951 #: ../src/guestfs-actions.pod:2952
8952 msgid "guestfs_mke2fs_J"
8956 #: ../src/guestfs-actions.pod:2954
8959 " int guestfs_mke2fs_J (guestfs_h *g,\n"
8960 "\t\tconst char *fstype,\n"
8961 "\t\tint blocksize,\n"
8962 "\t\tconst char *device,\n"
8963 "\t\tconst char *journal);\n"
8968 #: ../src/guestfs-actions.pod:2960 ../fish/guestfish-actions.pod:2307
8970 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
8971 "C<journal>. It is equivalent to the command:"
8975 #: ../src/guestfs-actions.pod:2964 ../fish/guestfish-actions.pod:2311
8978 " mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
8983 #: ../src/guestfs-actions.pod:2966
8984 msgid "See also C<guestfs_mke2journal>."
8988 #: ../src/guestfs-actions.pod:2970
8989 msgid "guestfs_mke2fs_JL"
8993 #: ../src/guestfs-actions.pod:2972
8996 " int guestfs_mke2fs_JL (guestfs_h *g,\n"
8997 "\t\tconst char *fstype,\n"
8998 "\t\tint blocksize,\n"
8999 "\t\tconst char *device,\n"
9000 "\t\tconst char *label);\n"
9005 #: ../src/guestfs-actions.pod:2978 ../fish/guestfish-actions.pod:2319
9007 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
9008 "the journal labeled C<label>."
9012 #: ../src/guestfs-actions.pod:2981
9013 msgid "See also C<guestfs_mke2journal_L>."
9017 #: ../src/guestfs-actions.pod:2985
9018 msgid "guestfs_mke2fs_JU"
9022 #: ../src/guestfs-actions.pod:2987
9025 " int guestfs_mke2fs_JU (guestfs_h *g,\n"
9026 "\t\tconst char *fstype,\n"
9027 "\t\tint blocksize,\n"
9028 "\t\tconst char *device,\n"
9029 "\t\tconst char *uuid);\n"
9034 #: ../src/guestfs-actions.pod:2993 ../fish/guestfish-actions.pod:2328
9036 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
9037 "the journal with UUID C<uuid>."
9041 #: ../src/guestfs-actions.pod:2996
9042 msgid "See also C<guestfs_mke2journal_U>."
9046 #: ../src/guestfs-actions.pod:3000
9047 msgid "guestfs_mke2journal"
9051 #: ../src/guestfs-actions.pod:3002
9054 " int guestfs_mke2journal (guestfs_h *g,\n"
9055 "\t\tint blocksize,\n"
9056 "\t\tconst char *device);\n"
9061 #: ../src/guestfs-actions.pod:3006 ../fish/guestfish-actions.pod:2337
9063 "This creates an ext2 external journal on C<device>. It is equivalent to the "
9068 #: ../src/guestfs-actions.pod:3009 ../fish/guestfish-actions.pod:2340
9071 " mke2fs -O journal_dev -b blocksize device\n"
9076 #: ../src/guestfs-actions.pod:3013
9077 msgid "guestfs_mke2journal_L"
9081 #: ../src/guestfs-actions.pod:3015
9084 " int guestfs_mke2journal_L (guestfs_h *g,\n"
9085 "\t\tint blocksize,\n"
9086 "\t\tconst char *label,\n"
9087 "\t\tconst char *device);\n"
9092 #: ../src/guestfs-actions.pod:3020 ../fish/guestfish-actions.pod:2346
9093 msgid "This creates an ext2 external journal on C<device> with label C<label>."
9097 #: ../src/guestfs-actions.pod:3024
9098 msgid "guestfs_mke2journal_U"
9102 #: ../src/guestfs-actions.pod:3026
9105 " int guestfs_mke2journal_U (guestfs_h *g,\n"
9106 "\t\tint blocksize,\n"
9107 "\t\tconst char *uuid,\n"
9108 "\t\tconst char *device);\n"
9113 #: ../src/guestfs-actions.pod:3031 ../fish/guestfish-actions.pod:2352
9114 msgid "This creates an ext2 external journal on C<device> with UUID C<uuid>."
9118 #: ../src/guestfs-actions.pod:3035
9119 msgid "guestfs_mkfifo"
9123 #: ../src/guestfs-actions.pod:3037
9126 " int guestfs_mkfifo (guestfs_h *g,\n"
9128 "\t\tconst char *path);\n"
9133 #: ../src/guestfs-actions.pod:3041
9135 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
9136 "is just a convenient wrapper around C<guestfs_mknod>."
9140 #: ../src/guestfs-actions.pod:3049
9141 msgid "guestfs_mkfs"
9145 #: ../src/guestfs-actions.pod:3051
9148 " int guestfs_mkfs (guestfs_h *g,\n"
9149 "\t\tconst char *fstype,\n"
9150 "\t\tconst char *device);\n"
9155 #: ../src/guestfs-actions.pod:3055 ../fish/guestfish-actions.pod:2368
9157 "This creates a filesystem on C<device> (usually a partition or LVM logical "
9158 "volume). The filesystem type is C<fstype>, for example C<ext3>."
9162 #: ../src/guestfs-actions.pod:3061
9163 msgid "guestfs_mkfs_b"
9167 #: ../src/guestfs-actions.pod:3063
9170 " int guestfs_mkfs_b (guestfs_h *g,\n"
9171 "\t\tconst char *fstype,\n"
9172 "\t\tint blocksize,\n"
9173 "\t\tconst char *device);\n"
9178 #: ../src/guestfs-actions.pod:3068
9180 "This call is similar to C<guestfs_mkfs>, but it allows you to control the "
9181 "block size of the resulting filesystem. Supported block sizes depend on the "
9182 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
9186 #: ../src/guestfs-actions.pod:3073 ../fish/guestfish-actions.pod:2381
9188 "For VFAT and NTFS the C<blocksize> parameter is treated as the requested "
9193 #: ../src/guestfs-actions.pod:3078
9194 msgid "guestfs_mkmountpoint"
9198 #: ../src/guestfs-actions.pod:3080
9201 " int guestfs_mkmountpoint (guestfs_h *g,\n"
9202 "\t\tconst char *exemptpath);\n"
9207 #: ../src/guestfs-actions.pod:3083
9209 "C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are specialized calls "
9210 "that can be used to create extra mountpoints before mounting the first "
9215 #: ../src/guestfs-actions.pod:3087 ../fish/guestfish-actions.pod:2392
9217 "These calls are I<only> necessary in some very limited circumstances, mainly "
9218 "the case where you want to mount a mix of unrelated and/or read-only "
9219 "filesystems together."
9223 #: ../src/guestfs-actions.pod:3091 ../fish/guestfish-actions.pod:2396
9225 "For example, live CDs often contain a \"Russian doll\" nest of filesystems, "
9226 "an ISO outer layer, with a squashfs image inside, with an ext2/3 image "
9227 "inside that. You can unpack this as follows in guestfish:"
9231 #: ../src/guestfs-actions.pod:3096 ../fish/guestfish-actions.pod:2401
9234 " add-ro Fedora-11-i686-Live.iso\n"
9236 " mkmountpoint /cd\n"
9237 " mkmountpoint /squash\n"
9238 " mkmountpoint /ext3\n"
9239 " mount /dev/sda /cd\n"
9240 " mount-loop /cd/LiveOS/squashfs.img /squash\n"
9241 " mount-loop /squash/LiveOS/ext3fs.img /ext3\n"
9246 #: ../src/guestfs-actions.pod:3105 ../fish/guestfish-actions.pod:2410
9247 msgid "The inner filesystem is now unpacked under the /ext3 mountpoint."
9251 #: ../src/guestfs-actions.pod:3109
9252 msgid "guestfs_mknod"
9256 #: ../src/guestfs-actions.pod:3111
9259 " int guestfs_mknod (guestfs_h *g,\n"
9261 "\t\tint devmajor,\n"
9262 "\t\tint devminor,\n"
9263 "\t\tconst char *path);\n"
9268 #: ../src/guestfs-actions.pod:3117 ../fish/guestfish-actions.pod:2416
9270 "This call creates block or character special devices, or named pipes (FIFOs)."
9274 #: ../src/guestfs-actions.pod:3120 ../fish/guestfish-actions.pod:2419
9276 "The C<mode> parameter should be the mode, using the standard constants. "
9277 "C<devmajor> and C<devminor> are the device major and minor numbers, only "
9278 "used when creating block and character special devices."
9282 #: ../src/guestfs-actions.pod:3125
9284 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
9285 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
9286 "regular file). These constants are available in the standard Linux header "
9287 "files, or you can use C<guestfs_mknod_b>, C<guestfs_mknod_c> or "
9288 "C<guestfs_mkfifo> which are wrappers around this command which bitwise OR in "
9289 "the appropriate constant for you."
9293 #: ../src/guestfs-actions.pod:3137
9294 msgid "guestfs_mknod_b"
9298 #: ../src/guestfs-actions.pod:3139
9301 " int guestfs_mknod_b (guestfs_h *g,\n"
9303 "\t\tint devmajor,\n"
9304 "\t\tint devminor,\n"
9305 "\t\tconst char *path);\n"
9310 #: ../src/guestfs-actions.pod:3145
9312 "This call creates a block device node called C<path> with mode C<mode> and "
9313 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
9314 "wrapper around C<guestfs_mknod>."
9318 #: ../src/guestfs-actions.pod:3153
9319 msgid "guestfs_mknod_c"
9323 #: ../src/guestfs-actions.pod:3155
9326 " int guestfs_mknod_c (guestfs_h *g,\n"
9328 "\t\tint devmajor,\n"
9329 "\t\tint devminor,\n"
9330 "\t\tconst char *path);\n"
9335 #: ../src/guestfs-actions.pod:3161
9337 "This call creates a char device node called C<path> with mode C<mode> and "
9338 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
9339 "wrapper around C<guestfs_mknod>."
9343 #: ../src/guestfs-actions.pod:3169
9344 msgid "guestfs_mkswap"
9348 #: ../src/guestfs-actions.pod:3171
9351 " int guestfs_mkswap (guestfs_h *g,\n"
9352 "\t\tconst char *device);\n"
9357 #: ../src/guestfs-actions.pod:3174 ../fish/guestfish-actions.pod:2458
9358 msgid "Create a swap partition on C<device>."
9362 #: ../src/guestfs-actions.pod:3178
9363 msgid "guestfs_mkswap_L"
9367 #: ../src/guestfs-actions.pod:3180
9370 " int guestfs_mkswap_L (guestfs_h *g,\n"
9371 "\t\tconst char *label,\n"
9372 "\t\tconst char *device);\n"
9377 #: ../src/guestfs-actions.pod:3184 ../fish/guestfish-actions.pod:2464
9378 msgid "Create a swap partition on C<device> with label C<label>."
9382 #: ../src/guestfs-actions.pod:3186 ../fish/guestfish-actions.pod:2466
9384 "Note that you cannot attach a swap label to a block device (eg. C</dev/"
9385 "sda>), just to a partition. This appears to be a limitation of the kernel "
9390 #: ../src/guestfs-actions.pod:3192
9391 msgid "guestfs_mkswap_U"
9395 #: ../src/guestfs-actions.pod:3194
9398 " int guestfs_mkswap_U (guestfs_h *g,\n"
9399 "\t\tconst char *uuid,\n"
9400 "\t\tconst char *device);\n"
9405 #: ../src/guestfs-actions.pod:3198 ../fish/guestfish-actions.pod:2474
9406 msgid "Create a swap partition on C<device> with UUID C<uuid>."
9410 #: ../src/guestfs-actions.pod:3202
9411 msgid "guestfs_mkswap_file"
9415 #: ../src/guestfs-actions.pod:3204
9418 " int guestfs_mkswap_file (guestfs_h *g,\n"
9419 "\t\tconst char *path);\n"
9424 #: ../src/guestfs-actions.pod:3207 ../fish/guestfish-actions.pod:2480
9425 msgid "Create a swap file."
9429 #: ../src/guestfs-actions.pod:3209
9431 "This command just writes a swap file signature to an existing file. To "
9432 "create the file itself, use something like C<guestfs_fallocate>."
9436 #: ../src/guestfs-actions.pod:3214
9437 msgid "guestfs_modprobe"
9441 #: ../src/guestfs-actions.pod:3216
9444 " int guestfs_modprobe (guestfs_h *g,\n"
9445 "\t\tconst char *modulename);\n"
9450 #: ../src/guestfs-actions.pod:3219 ../fish/guestfish-actions.pod:2489
9451 msgid "This loads a kernel module in the appliance."
9455 #: ../src/guestfs-actions.pod:3221 ../fish/guestfish-actions.pod:2491
9457 "The kernel module must have been whitelisted when libguestfs was built (see "
9458 "C<appliance/kmod.whitelist.in> in the source)."
9462 #: ../src/guestfs-actions.pod:3226
9463 msgid "guestfs_mount"
9467 #: ../src/guestfs-actions.pod:3228
9470 " int guestfs_mount (guestfs_h *g,\n"
9471 "\t\tconst char *device,\n"
9472 "\t\tconst char *mountpoint);\n"
9477 #: ../src/guestfs-actions.pod:3232 ../fish/guestfish-actions.pod:2498
9479 "Mount a guest disk at a position in the filesystem. Block devices are named "
9480 "C</dev/sda>, C</dev/sdb> and so on, as they were added to the guest. If "
9481 "those block devices contain partitions, they will have the usual names (eg. "
9482 "C</dev/sda1>). Also LVM C</dev/VG/LV>-style names can be used."
9486 #: ../src/guestfs-actions.pod:3238 ../fish/guestfish-actions.pod:2504
9488 "The rules are the same as for L<mount(2)>: A filesystem must first be "
9489 "mounted on C</> before others can be mounted. Other filesystems can only be "
9490 "mounted on directories which already exist."
9494 #: ../src/guestfs-actions.pod:3243 ../fish/guestfish-actions.pod:2509
9496 "The mounted filesystem is writable, if we have sufficient permissions on the "
9497 "underlying device."
9501 #: ../src/guestfs-actions.pod:3246
9503 "B<Important note:> When you use this call, the filesystem options C<sync> "
9504 "and C<noatime> are set implicitly. This was originally done because we "
9505 "thought it would improve reliability, but it turns out that I<-o sync> has a "
9506 "very large negative performance impact and negligible effect on "
9507 "reliability. Therefore we recommend that you avoid using C<guestfs_mount> "
9508 "in any code that needs performance, and instead use C<guestfs_mount_options> "
9509 "(use an empty string for the first parameter if you don't want any options)."
9513 #: ../src/guestfs-actions.pod:3258
9514 msgid "guestfs_mount_loop"
9518 #: ../src/guestfs-actions.pod:3260
9521 " int guestfs_mount_loop (guestfs_h *g,\n"
9522 "\t\tconst char *file,\n"
9523 "\t\tconst char *mountpoint);\n"
9528 #: ../src/guestfs-actions.pod:3264 ../fish/guestfish-actions.pod:2526
9530 "This command lets you mount C<file> (a filesystem image in a file) on a "
9531 "mount point. It is entirely equivalent to the command C<mount -o loop file "
9536 #: ../src/guestfs-actions.pod:3270
9537 msgid "guestfs_mount_options"
9541 #: ../src/guestfs-actions.pod:3272
9544 " int guestfs_mount_options (guestfs_h *g,\n"
9545 "\t\tconst char *options,\n"
9546 "\t\tconst char *device,\n"
9547 "\t\tconst char *mountpoint);\n"
9552 #: ../src/guestfs-actions.pod:3277
9554 "This is the same as the C<guestfs_mount> command, but it allows you to set "
9555 "the mount options as for the L<mount(8)> I<-o> flag."
9559 #: ../src/guestfs-actions.pod:3281 ../fish/guestfish-actions.pod:2538
9561 "If the C<options> parameter is an empty string, then no options are passed "
9562 "(all options default to whatever the filesystem uses)."
9566 #: ../src/guestfs-actions.pod:3287
9567 msgid "guestfs_mount_ro"
9571 #: ../src/guestfs-actions.pod:3289
9574 " int guestfs_mount_ro (guestfs_h *g,\n"
9575 "\t\tconst char *device,\n"
9576 "\t\tconst char *mountpoint);\n"
9581 #: ../src/guestfs-actions.pod:3293
9583 "This is the same as the C<guestfs_mount> command, but it mounts the "
9584 "filesystem with the read-only (I<-o ro>) flag."
9588 #: ../src/guestfs-actions.pod:3298
9589 msgid "guestfs_mount_vfs"
9593 #: ../src/guestfs-actions.pod:3300
9596 " int guestfs_mount_vfs (guestfs_h *g,\n"
9597 "\t\tconst char *options,\n"
9598 "\t\tconst char *vfstype,\n"
9599 "\t\tconst char *device,\n"
9600 "\t\tconst char *mountpoint);\n"
9605 #: ../src/guestfs-actions.pod:3306
9607 "This is the same as the C<guestfs_mount> command, but it allows you to set "
9608 "both the mount options and the vfstype as for the L<mount(8)> I<-o> and I<-"
9613 #: ../src/guestfs-actions.pod:3312
9614 msgid "guestfs_mountpoints"
9618 #: ../src/guestfs-actions.pod:3314
9621 " char **guestfs_mountpoints (guestfs_h *g);\n"
9626 #: ../src/guestfs-actions.pod:3316
9628 "This call is similar to C<guestfs_mounts>. That call returns a list of "
9629 "devices. This one returns a hash table (map) of device name to directory "
9630 "where the device is mounted."
9634 #: ../src/guestfs-actions.pod:3326
9635 msgid "guestfs_mounts"
9639 #: ../src/guestfs-actions.pod:3328
9642 " char **guestfs_mounts (guestfs_h *g);\n"
9647 #: ../src/guestfs-actions.pod:3330 ../fish/guestfish-actions.pod:2569
9649 "This returns the list of currently mounted filesystems. It returns the list "
9650 "of devices (eg. C</dev/sda1>, C</dev/VG/LV>)."
9654 #: ../src/guestfs-actions.pod:3333 ../fish/guestfish-actions.pod:2572
9655 msgid "Some internal mounts are not shown."
9659 #: ../src/guestfs-actions.pod:3335
9660 msgid "See also: C<guestfs_mountpoints>"
9664 #: ../src/guestfs-actions.pod:3341
9669 #: ../src/guestfs-actions.pod:3343
9672 " int guestfs_mv (guestfs_h *g,\n"
9673 "\t\tconst char *src,\n"
9674 "\t\tconst char *dest);\n"
9679 #: ../src/guestfs-actions.pod:3347 ../fish/guestfish-actions.pod:2580
9681 "This moves a file from C<src> to C<dest> where C<dest> is either a "
9682 "destination filename or destination directory."
9686 #: ../src/guestfs-actions.pod:3352
9687 msgid "guestfs_ntfs_3g_probe"
9691 #: ../src/guestfs-actions.pod:3354
9694 " int guestfs_ntfs_3g_probe (guestfs_h *g,\n"
9696 "\t\tconst char *device);\n"
9701 #: ../src/guestfs-actions.pod:3358 ../fish/guestfish-actions.pod:2587
9703 "This command runs the L<ntfs-3g.probe(8)> command which probes an NTFS "
9704 "C<device> for mountability. (Not all NTFS volumes can be mounted read-"
9705 "write, and some cannot be mounted at all)."
9709 #: ../src/guestfs-actions.pod:3362 ../fish/guestfish-actions.pod:2591
9711 "C<rw> is a boolean flag. Set it to true if you want to test if the volume "
9712 "can be mounted read-write. Set it to false if you want to test if the "
9713 "volume can be mounted read-only."
9717 #: ../src/guestfs-actions.pod:3366 ../fish/guestfish-actions.pod:2595
9719 "The return value is an integer which C<0> if the operation would succeed, or "
9720 "some non-zero value documented in the L<ntfs-3g.probe(8)> manual page."
9724 #: ../src/guestfs-actions.pod:3372
9725 msgid "guestfs_ntfsresize"
9729 #: ../src/guestfs-actions.pod:3374
9732 " int guestfs_ntfsresize (guestfs_h *g,\n"
9733 "\t\tconst char *device);\n"
9738 #: ../src/guestfs-actions.pod:3377 ../fish/guestfish-actions.pod:2603
9740 "This command resizes an NTFS filesystem, expanding or shrinking it to the "
9741 "size of the underlying device. See also L<ntfsresize(8)>."
9745 #: ../src/guestfs-actions.pod:3383
9746 msgid "guestfs_ntfsresize_size"
9750 #: ../src/guestfs-actions.pod:3385
9753 " int guestfs_ntfsresize_size (guestfs_h *g,\n"
9754 "\t\tconst char *device,\n"
9755 "\t\tint64_t size);\n"
9760 #: ../src/guestfs-actions.pod:3389
9762 "This command is the same as C<guestfs_ntfsresize> except that it allows you "
9763 "to specify the new size (in bytes) explicitly."
9767 #: ../src/guestfs-actions.pod:3394
9768 msgid "guestfs_part_add"
9772 #: ../src/guestfs-actions.pod:3396
9775 " int guestfs_part_add (guestfs_h *g,\n"
9776 "\t\tconst char *device,\n"
9777 "\t\tconst char *prlogex,\n"
9778 "\t\tint64_t startsect,\n"
9779 "\t\tint64_t endsect);\n"
9784 #: ../src/guestfs-actions.pod:3402
9786 "This command adds a partition to C<device>. If there is no partition table "
9787 "on the device, call C<guestfs_part_init> first."
9791 #: ../src/guestfs-actions.pod:3405 ../fish/guestfish-actions.pod:2621
9793 "The C<prlogex> parameter is the type of partition. Normally you should pass "
9794 "C<p> or C<primary> here, but MBR partition tables also support C<l> (or "
9795 "C<logical>) and C<e> (or C<extended>) partition types."
9799 #: ../src/guestfs-actions.pod:3410 ../fish/guestfish-actions.pod:2626
9801 "C<startsect> and C<endsect> are the start and end of the partition in "
9802 "I<sectors>. C<endsect> may be negative, which means it counts backwards "
9803 "from the end of the disk (C<-1> is the last sector)."
9807 #: ../src/guestfs-actions.pod:3414
9809 "Creating a partition which covers the whole disk is not so easy. Use "
9810 "C<guestfs_part_disk> to do that."
9814 #: ../src/guestfs-actions.pod:3419
9815 msgid "guestfs_part_del"
9819 #: ../src/guestfs-actions.pod:3421
9822 " int guestfs_part_del (guestfs_h *g,\n"
9823 "\t\tconst char *device,\n"
9824 "\t\tint partnum);\n"
9829 #: ../src/guestfs-actions.pod:3425 ../fish/guestfish-actions.pod:2637
9830 msgid "This command deletes the partition numbered C<partnum> on C<device>."
9834 #: ../src/guestfs-actions.pod:3427 ../fish/guestfish-actions.pod:2639
9836 "Note that in the case of MBR partitioning, deleting an extended partition "
9837 "also deletes any logical partitions it contains."
9841 #: ../src/guestfs-actions.pod:3433
9842 msgid "guestfs_part_disk"
9846 #: ../src/guestfs-actions.pod:3435
9849 " int guestfs_part_disk (guestfs_h *g,\n"
9850 "\t\tconst char *device,\n"
9851 "\t\tconst char *parttype);\n"
9856 #: ../src/guestfs-actions.pod:3439
9858 "This command is simply a combination of C<guestfs_part_init> followed by "
9859 "C<guestfs_part_add> to create a single primary partition covering the whole "
9864 #: ../src/guestfs-actions.pod:3443
9866 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
9867 "possible values are described in C<guestfs_part_init>."
9871 #: ../src/guestfs-actions.pod:3451
9872 msgid "guestfs_part_get_bootable"
9876 #: ../src/guestfs-actions.pod:3453
9879 " int guestfs_part_get_bootable (guestfs_h *g,\n"
9880 "\t\tconst char *device,\n"
9881 "\t\tint partnum);\n"
9886 #: ../src/guestfs-actions.pod:3457 ../fish/guestfish-actions.pod:2661
9888 "This command returns true if the partition C<partnum> on C<device> has the "
9889 "bootable flag set."
9893 #: ../src/guestfs-actions.pod:3460
9894 msgid "See also C<guestfs_part_set_bootable>."
9898 #: ../src/guestfs-actions.pod:3464
9899 msgid "guestfs_part_get_mbr_id"
9903 #: ../src/guestfs-actions.pod:3466
9906 " int guestfs_part_get_mbr_id (guestfs_h *g,\n"
9907 "\t\tconst char *device,\n"
9908 "\t\tint partnum);\n"
9913 #: ../src/guestfs-actions.pod:3470 ../fish/guestfish-actions.pod:2670
9915 "Returns the MBR type byte (also known as the ID byte) from the numbered "
9916 "partition C<partnum>."
9920 #: ../src/guestfs-actions.pod:3473 ../src/guestfs-actions.pod:3635
9922 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
9923 "undefined results for other partition table types (see "
9924 "C<guestfs_part_get_parttype>)."
9928 #: ../src/guestfs-actions.pod:3479
9929 msgid "guestfs_part_get_parttype"
9933 #: ../src/guestfs-actions.pod:3481
9936 " char *guestfs_part_get_parttype (guestfs_h *g,\n"
9937 "\t\tconst char *device);\n"
9942 #: ../src/guestfs-actions.pod:3484 ../fish/guestfish-actions.pod:2681
9944 "This command examines the partition table on C<device> and returns the "
9945 "partition table type (format) being used."
9949 #: ../src/guestfs-actions.pod:3487
9951 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
9952 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
9953 "possible, although unusual. See C<guestfs_part_init> for a full list."
9957 #: ../src/guestfs-actions.pod:3495
9958 msgid "guestfs_part_init"
9962 #: ../src/guestfs-actions.pod:3497
9965 " int guestfs_part_init (guestfs_h *g,\n"
9966 "\t\tconst char *device,\n"
9967 "\t\tconst char *parttype);\n"
9972 #: ../src/guestfs-actions.pod:3501 ../fish/guestfish-actions.pod:2693
9974 "This creates an empty partition table on C<device> of one of the partition "
9975 "types listed below. Usually C<parttype> should be either C<msdos> or C<gpt> "
9976 "(for large disks)."
9980 #: ../src/guestfs-actions.pod:3505
9982 "Initially there are no partitions. Following this, you should call "
9983 "C<guestfs_part_add> for each partition required."
9987 #: ../src/guestfs-actions.pod:3508 ../fish/guestfish-actions.pod:2700
9988 msgid "Possible values for C<parttype> are:"
9992 #: ../src/guestfs-actions.pod:3512 ../fish/guestfish-actions.pod:2704
9993 msgid "B<efi> | B<gpt>"
9997 #: ../src/guestfs-actions.pod:3514 ../fish/guestfish-actions.pod:2706
9998 msgid "Intel EFI / GPT partition table."
10002 #: ../src/guestfs-actions.pod:3516 ../fish/guestfish-actions.pod:2708
10004 "This is recommended for >= 2 TB partitions that will be accessed from Linux "
10005 "and Intel-based Mac OS X. It also has limited backwards compatibility with "
10006 "the C<mbr> format."
10010 #: ../src/guestfs-actions.pod:3520 ../fish/guestfish-actions.pod:2712
10011 msgid "B<mbr> | B<msdos>"
10015 #: ../src/guestfs-actions.pod:3522 ../fish/guestfish-actions.pod:2714
10017 "The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and "
10018 "Windows. This partition type will B<only> work for device sizes up to 2 "
10019 "TB. For large disks we recommend using C<gpt>."
10023 #: ../src/guestfs-actions.pod:3529 ../fish/guestfish-actions.pod:2721
10025 "Other partition table types that may work but are not supported include:"
10029 #: ../src/guestfs-actions.pod:3534 ../fish/guestfish-actions.pod:2726
10034 #: ../src/guestfs-actions.pod:3536 ../fish/guestfish-actions.pod:2728
10035 msgid "AIX disk labels."
10039 #: ../src/guestfs-actions.pod:3538 ../fish/guestfish-actions.pod:2730
10040 msgid "B<amiga> | B<rdb>"
10044 #: ../src/guestfs-actions.pod:3540 ../fish/guestfish-actions.pod:2732
10045 msgid "Amiga \"Rigid Disk Block\" format."
10049 #: ../src/guestfs-actions.pod:3542 ../fish/guestfish-actions.pod:2734
10054 #: ../src/guestfs-actions.pod:3544 ../fish/guestfish-actions.pod:2736
10055 msgid "BSD disk labels."
10059 #: ../src/guestfs-actions.pod:3546 ../fish/guestfish-actions.pod:2738
10064 #: ../src/guestfs-actions.pod:3548 ../fish/guestfish-actions.pod:2740
10065 msgid "DASD, used on IBM mainframes."
10069 #: ../src/guestfs-actions.pod:3550 ../fish/guestfish-actions.pod:2742
10074 #: ../src/guestfs-actions.pod:3552 ../fish/guestfish-actions.pod:2744
10075 msgid "MIPS/SGI volumes."
10079 #: ../src/guestfs-actions.pod:3554 ../fish/guestfish-actions.pod:2746
10084 #: ../src/guestfs-actions.pod:3556 ../fish/guestfish-actions.pod:2748
10085 msgid "Old Mac partition format. Modern Macs use C<gpt>."
10089 #: ../src/guestfs-actions.pod:3558 ../fish/guestfish-actions.pod:2750
10094 #: ../src/guestfs-actions.pod:3560 ../fish/guestfish-actions.pod:2752
10095 msgid "NEC PC-98 format, common in Japan apparently."
10099 #: ../src/guestfs-actions.pod:3562 ../fish/guestfish-actions.pod:2754
10104 #: ../src/guestfs-actions.pod:3564 ../fish/guestfish-actions.pod:2756
10105 msgid "Sun disk labels."
10109 #: ../src/guestfs-actions.pod:3570
10110 msgid "guestfs_part_list"
10114 #: ../src/guestfs-actions.pod:3572
10117 " struct guestfs_partition_list *guestfs_part_list (guestfs_h *g,\n"
10118 "\t\tconst char *device);\n"
10123 #: ../src/guestfs-actions.pod:3575 ../fish/guestfish-actions.pod:2764
10125 "This command parses the partition table on C<device> and returns the list of "
10126 "partitions found."
10130 #: ../src/guestfs-actions.pod:3578 ../fish/guestfish-actions.pod:2767
10131 msgid "The fields in the returned structure are:"
10135 #: ../src/guestfs-actions.pod:3582 ../fish/guestfish-actions.pod:2771
10136 msgid "B<part_num>"
10140 #: ../src/guestfs-actions.pod:3584 ../fish/guestfish-actions.pod:2773
10141 msgid "Partition number, counting from 1."
10145 #: ../src/guestfs-actions.pod:3586 ../fish/guestfish-actions.pod:2775
10146 msgid "B<part_start>"
10150 #: ../src/guestfs-actions.pod:3588
10152 "Start of the partition I<in bytes>. To get sectors you have to divide by "
10153 "the device's sector size, see C<guestfs_blockdev_getss>."
10157 #: ../src/guestfs-actions.pod:3591 ../fish/guestfish-actions.pod:2780
10158 msgid "B<part_end>"
10162 #: ../src/guestfs-actions.pod:3593 ../fish/guestfish-actions.pod:2782
10163 msgid "End of the partition in bytes."
10167 #: ../src/guestfs-actions.pod:3595 ../fish/guestfish-actions.pod:2784
10168 msgid "B<part_size>"
10172 #: ../src/guestfs-actions.pod:3597 ../fish/guestfish-actions.pod:2786
10173 msgid "Size of the partition in bytes."
10177 #: ../src/guestfs-actions.pod:3601
10179 "This function returns a C<struct guestfs_partition_list *> (see E<lt>guestfs-"
10180 "structs.hE<gt>), or NULL if there was an error. I<The caller must call "
10181 "C<guestfs_free_partition_list> after use>."
10185 #: ../src/guestfs-actions.pod:3606
10186 msgid "guestfs_part_set_bootable"
10190 #: ../src/guestfs-actions.pod:3608
10193 " int guestfs_part_set_bootable (guestfs_h *g,\n"
10194 "\t\tconst char *device,\n"
10195 "\t\tint partnum,\n"
10196 "\t\tint bootable);\n"
10201 #: ../src/guestfs-actions.pod:3613 ../fish/guestfish-actions.pod:2794
10203 "This sets the bootable flag on partition numbered C<partnum> on device "
10204 "C<device>. Note that partitions are numbered from 1."
10208 #: ../src/guestfs-actions.pod:3616 ../fish/guestfish-actions.pod:2797
10210 "The bootable flag is used by some operating systems (notably Windows) to "
10211 "determine which partition to boot from. It is by no means universally "
10216 #: ../src/guestfs-actions.pod:3622
10217 msgid "guestfs_part_set_mbr_id"
10221 #: ../src/guestfs-actions.pod:3624
10224 " int guestfs_part_set_mbr_id (guestfs_h *g,\n"
10225 "\t\tconst char *device,\n"
10226 "\t\tint partnum,\n"
10227 "\t\tint idbyte);\n"
10232 #: ../src/guestfs-actions.pod:3629 ../fish/guestfish-actions.pod:2805
10234 "Sets the MBR type byte (also known as the ID byte) of the numbered partition "
10235 "C<partnum> to C<idbyte>. Note that the type bytes quoted in most "
10236 "documentation are in fact hexadecimal numbers, but usually documented "
10237 "without any leading \"0x\" which might be confusing."
10241 #: ../src/guestfs-actions.pod:3641
10242 msgid "guestfs_part_set_name"
10246 #: ../src/guestfs-actions.pod:3643
10249 " int guestfs_part_set_name (guestfs_h *g,\n"
10250 "\t\tconst char *device,\n"
10251 "\t\tint partnum,\n"
10252 "\t\tconst char *name);\n"
10257 #: ../src/guestfs-actions.pod:3648 ../fish/guestfish-actions.pod:2819
10259 "This sets the partition name on partition numbered C<partnum> on device "
10260 "C<device>. Note that partitions are numbered from 1."
10264 #: ../src/guestfs-actions.pod:3651 ../fish/guestfish-actions.pod:2822
10266 "The partition name can only be set on certain types of partition table. "
10267 "This works on C<gpt> but not on C<mbr> partitions."
10271 #: ../src/guestfs-actions.pod:3656
10272 msgid "guestfs_ping_daemon"
10276 #: ../src/guestfs-actions.pod:3658
10279 " int guestfs_ping_daemon (guestfs_h *g);\n"
10284 #: ../src/guestfs-actions.pod:3660 ../fish/guestfish-actions.pod:2829
10286 "This is a test probe into the guestfs daemon running inside the qemu "
10287 "subprocess. Calling this function checks that the daemon responds to the "
10288 "ping message, without affecting the daemon or attached block device(s) in "
10293 #: ../src/guestfs-actions.pod:3667
10294 msgid "guestfs_pread"
10298 #: ../src/guestfs-actions.pod:3669
10301 " char *guestfs_pread (guestfs_h *g,\n"
10302 "\t\tconst char *path,\n"
10304 "\t\tint64_t offset,\n"
10305 "\t\tsize_t *size_r);\n"
10310 #: ../src/guestfs-actions.pod:3675 ../fish/guestfish-actions.pod:2838
10312 "This command lets you read part of a file. It reads C<count> bytes of the "
10313 "file, starting at C<offset>, from file C<path>."
10317 #: ../src/guestfs-actions.pod:3678 ../fish/guestfish-actions.pod:2841
10319 "This may read fewer bytes than requested. For further details see the "
10320 "L<pread(2)> system call."
10324 #: ../src/guestfs-actions.pod:3681
10325 msgid "See also C<guestfs_pwrite>."
10329 #: ../src/guestfs-actions.pod:3690
10330 msgid "guestfs_pvcreate"
10334 #: ../src/guestfs-actions.pod:3692
10337 " int guestfs_pvcreate (guestfs_h *g,\n"
10338 "\t\tconst char *device);\n"
10343 #: ../src/guestfs-actions.pod:3695 ../fish/guestfish-actions.pod:2853
10345 "This creates an LVM physical volume on the named C<device>, where C<device> "
10346 "should usually be a partition name such as C</dev/sda1>."
10350 #: ../src/guestfs-actions.pod:3701
10351 msgid "guestfs_pvremove"
10355 #: ../src/guestfs-actions.pod:3703
10358 " int guestfs_pvremove (guestfs_h *g,\n"
10359 "\t\tconst char *device);\n"
10364 #: ../src/guestfs-actions.pod:3706 ../fish/guestfish-actions.pod:2861
10366 "This wipes a physical volume C<device> so that LVM will no longer recognise "
10371 #: ../src/guestfs-actions.pod:3709 ../fish/guestfish-actions.pod:2864
10373 "The implementation uses the C<pvremove> command which refuses to wipe "
10374 "physical volumes that contain any volume groups, so you have to remove those "
10379 #: ../src/guestfs-actions.pod:3715
10380 msgid "guestfs_pvresize"
10384 #: ../src/guestfs-actions.pod:3717
10387 " int guestfs_pvresize (guestfs_h *g,\n"
10388 "\t\tconst char *device);\n"
10393 #: ../src/guestfs-actions.pod:3720 ../fish/guestfish-actions.pod:2872
10395 "This resizes (expands or shrinks) an existing LVM physical volume to match "
10396 "the new size of the underlying device."
10400 #: ../src/guestfs-actions.pod:3725
10401 msgid "guestfs_pvresize_size"
10405 #: ../src/guestfs-actions.pod:3727
10408 " int guestfs_pvresize_size (guestfs_h *g,\n"
10409 "\t\tconst char *device,\n"
10410 "\t\tint64_t size);\n"
10415 #: ../src/guestfs-actions.pod:3731
10417 "This command is the same as C<guestfs_pvresize> except that it allows you to "
10418 "specify the new size (in bytes) explicitly."
10422 #: ../src/guestfs-actions.pod:3736
10423 msgid "guestfs_pvs"
10427 #: ../src/guestfs-actions.pod:3738
10430 " char **guestfs_pvs (guestfs_h *g);\n"
10435 #: ../src/guestfs-actions.pod:3740 ../fish/guestfish-actions.pod:2886
10437 "List all the physical volumes detected. This is the equivalent of the L<pvs"
10442 #: ../src/guestfs-actions.pod:3743 ../fish/guestfish-actions.pod:2889
10444 "This returns a list of just the device names that contain PVs (eg. C</dev/"
10449 #: ../src/guestfs-actions.pod:3746
10450 msgid "See also C<guestfs_pvs_full>."
10454 #: ../src/guestfs-actions.pod:3752
10455 msgid "guestfs_pvs_full"
10459 #: ../src/guestfs-actions.pod:3754
10462 " struct guestfs_lvm_pv_list *guestfs_pvs_full (guestfs_h *g);\n"
10467 #: ../src/guestfs-actions.pod:3756 ../fish/guestfish-actions.pod:2898
10469 "List all the physical volumes detected. This is the equivalent of the L<pvs"
10470 "(8)> command. The \"full\" version includes all fields."
10474 #: ../src/guestfs-actions.pod:3759
10476 "This function returns a C<struct guestfs_lvm_pv_list *> (see E<lt>guestfs-"
10477 "structs.hE<gt>), or NULL if there was an error. I<The caller must call "
10478 "C<guestfs_free_lvm_pv_list> after use>."
10482 #: ../src/guestfs-actions.pod:3764
10483 msgid "guestfs_pvuuid"
10487 #: ../src/guestfs-actions.pod:3766
10490 " char *guestfs_pvuuid (guestfs_h *g,\n"
10491 "\t\tconst char *device);\n"
10496 #: ../src/guestfs-actions.pod:3769 ../fish/guestfish-actions.pod:2905
10497 msgid "This command returns the UUID of the LVM PV C<device>."
10501 #: ../src/guestfs-actions.pod:3774
10502 msgid "guestfs_pwrite"
10506 #: ../src/guestfs-actions.pod:3776
10509 " int guestfs_pwrite (guestfs_h *g,\n"
10510 "\t\tconst char *path,\n"
10511 "\t\tconst char *content,\n"
10512 "\t\tsize_t content_size,\n"
10513 "\t\tint64_t offset);\n"
10518 #: ../src/guestfs-actions.pod:3782 ../fish/guestfish-actions.pod:2911
10520 "This command writes to part of a file. It writes the data buffer C<content> "
10521 "to the file C<path> starting at offset C<offset>."
10525 #: ../src/guestfs-actions.pod:3785 ../fish/guestfish-actions.pod:2914
10527 "This command implements the L<pwrite(2)> system call, and like that system "
10528 "call it may not write the full data requested. The return value is the "
10529 "number of bytes that were actually written to the file. This could even be "
10530 "0, although short writes are unlikely for regular files in ordinary "
10535 #: ../src/guestfs-actions.pod:3791
10536 msgid "See also C<guestfs_pread>."
10540 #: ../src/guestfs-actions.pod:3798
10541 msgid "guestfs_read_file"
10545 #: ../src/guestfs-actions.pod:3800
10548 " char *guestfs_read_file (guestfs_h *g,\n"
10549 "\t\tconst char *path,\n"
10550 "\t\tsize_t *size_r);\n"
10555 #: ../src/guestfs-actions.pod:3804 ../fish/guestfish-actions.pod:2929
10556 msgid "This calls returns the contents of the file C<path> as a buffer."
10560 #: ../src/guestfs-actions.pod:3807
10562 "Unlike C<guestfs_cat>, this function can correctly handle files that contain "
10563 "embedded ASCII NUL characters. However unlike C<guestfs_download>, this "
10564 "function is limited in the total size of file that can be handled."
10568 #: ../src/guestfs-actions.pod:3819
10569 msgid "guestfs_read_lines"
10573 #: ../src/guestfs-actions.pod:3821
10576 " char **guestfs_read_lines (guestfs_h *g,\n"
10577 "\t\tconst char *path);\n"
10582 #: ../src/guestfs-actions.pod:3826 ../fish/guestfish-actions.pod:2946
10584 "The file contents are returned as a list of lines. Trailing C<LF> and "
10585 "C<CRLF> character sequences are I<not> returned."
10589 #: ../src/guestfs-actions.pod:3829
10591 "Note that this function cannot correctly handle binary files (specifically, "
10592 "files containing C<\\0> character which is treated as end of line). For "
10593 "those you need to use the C<guestfs_read_file> function which has a more "
10594 "complex interface."
10598 #: ../src/guestfs-actions.pod:3838
10599 msgid "guestfs_readdir"
10603 #: ../src/guestfs-actions.pod:3840
10606 " struct guestfs_dirent_list *guestfs_readdir (guestfs_h *g,\n"
10607 "\t\tconst char *dir);\n"
10612 #: ../src/guestfs-actions.pod:3843 ../fish/guestfish-actions.pod:2958
10613 msgid "This returns the list of directory entries in directory C<dir>."
10617 #: ../src/guestfs-actions.pod:3845 ../fish/guestfish-actions.pod:2960
10619 "All entries in the directory are returned, including C<.> and C<..>. The "
10620 "entries are I<not> sorted, but returned in the same order as the underlying "
10625 #: ../src/guestfs-actions.pod:3849 ../fish/guestfish-actions.pod:2964
10627 "Also this call returns basic file type information about each file. The "
10628 "C<ftyp> field will contain one of the following characters:"
10632 #: ../src/guestfs-actions.pod:3854 ../fish/guestfish-actions.pod:2969
10637 #: ../src/guestfs-actions.pod:3856 ../fish/guestfish-actions.pod:2971
10638 msgid "Block special"
10642 #: ../src/guestfs-actions.pod:3858 ../fish/guestfish-actions.pod:2973
10647 #: ../src/guestfs-actions.pod:3860 ../fish/guestfish-actions.pod:2975
10648 msgid "Char special"
10652 #: ../src/guestfs-actions.pod:3862 ../fish/guestfish-actions.pod:2977
10657 #: ../src/guestfs-actions.pod:3864 ../fish/guestfish-actions.pod:2979
10662 #: ../src/guestfs-actions.pod:3866 ../fish/guestfish-actions.pod:2981
10667 #: ../src/guestfs-actions.pod:3868 ../fish/guestfish-actions.pod:2983
10668 msgid "FIFO (named pipe)"
10672 #: ../src/guestfs-actions.pod:3870 ../fish/guestfish-actions.pod:2985
10677 #: ../src/guestfs-actions.pod:3872 ../fish/guestfish-actions.pod:2987
10678 msgid "Symbolic link"
10682 #: ../src/guestfs-actions.pod:3874 ../fish/guestfish-actions.pod:2989
10687 #: ../src/guestfs-actions.pod:3876 ../fish/guestfish-actions.pod:2991
10688 msgid "Regular file"
10692 #: ../src/guestfs-actions.pod:3878 ../fish/guestfish-actions.pod:2993
10697 #: ../src/guestfs-actions.pod:3880 ../fish/guestfish-actions.pod:2995
10702 #: ../src/guestfs-actions.pod:3882 ../fish/guestfish-actions.pod:2997
10707 #: ../src/guestfs-actions.pod:3884 ../fish/guestfish-actions.pod:2999
10708 msgid "Unknown file type"
10712 #: ../src/guestfs-actions.pod:3886 ../fish/guestfish-actions.pod:3001
10717 #: ../src/guestfs-actions.pod:3888 ../fish/guestfish-actions.pod:3003
10719 "The L<readdir(3)> call returned a C<d_type> field with an unexpected value"
10723 #: ../src/guestfs-actions.pod:3893
10725 "This function is primarily intended for use by programs. To get a simple "
10726 "list of names, use C<guestfs_ls>. To get a printable directory for human "
10727 "consumption, use C<guestfs_ll>."
10731 #: ../src/guestfs-actions.pod:3897
10733 "This function returns a C<struct guestfs_dirent_list *> (see E<lt>guestfs-"
10734 "structs.hE<gt>), or NULL if there was an error. I<The caller must call "
10735 "C<guestfs_free_dirent_list> after use>."
10739 #: ../src/guestfs-actions.pod:3902
10740 msgid "guestfs_readlink"
10744 #: ../src/guestfs-actions.pod:3904
10747 " char *guestfs_readlink (guestfs_h *g,\n"
10748 "\t\tconst char *path);\n"
10753 #: ../src/guestfs-actions.pod:3907 ../fish/guestfish-actions.pod:3016
10754 msgid "This command reads the target of a symbolic link."
10758 #: ../src/guestfs-actions.pod:3912
10759 msgid "guestfs_readlinklist"
10763 #: ../src/guestfs-actions.pod:3914
10766 " char **guestfs_readlinklist (guestfs_h *g,\n"
10767 "\t\tconst char *path,\n"
10768 "\t\tchar *const *names);\n"
10773 #: ../src/guestfs-actions.pod:3918 ../fish/guestfish-actions.pod:3022
10775 "This call allows you to do a C<readlink> operation on multiple files, where "
10776 "all files are in the directory C<path>. C<names> is the list of files from "
10781 #: ../src/guestfs-actions.pod:3922 ../fish/guestfish-actions.pod:3026
10783 "On return you get a list of strings, with a one-to-one correspondence to the "
10784 "C<names> list. Each string is the value of the symbolic link."
10788 #: ../src/guestfs-actions.pod:3926 ../fish/guestfish-actions.pod:3030
10790 "If the C<readlink(2)> operation fails on any name, then the corresponding "
10791 "result string is the empty string C<\"\">. However the whole operation is "
10792 "completed even if there were C<readlink(2)> errors, and so you can call this "
10793 "function with names where you don't know if they are symbolic links already "
10794 "(albeit slightly less efficient)."
10798 #: ../src/guestfs-actions.pod:3933 ../fish/guestfish-actions.pod:3037
10800 "This call is intended for programs that want to efficiently list a directory "
10801 "contents without making many round-trips. Very long directory listings "
10802 "might cause the protocol message size to be exceeded, causing this call to "
10803 "fail. The caller must split up such requests into smaller groups of names."
10807 #: ../src/guestfs-actions.pod:3944
10808 msgid "guestfs_realpath"
10812 #: ../src/guestfs-actions.pod:3946
10815 " char *guestfs_realpath (guestfs_h *g,\n"
10816 "\t\tconst char *path);\n"
10821 #: ../src/guestfs-actions.pod:3949 ../fish/guestfish-actions.pod:3048
10823 "Return the canonicalized absolute pathname of C<path>. The returned path "
10824 "has no C<.>, C<..> or symbolic link path elements."
10828 #: ../src/guestfs-actions.pod:3955
10829 msgid "guestfs_removexattr"
10833 #: ../src/guestfs-actions.pod:3957
10836 " int guestfs_removexattr (guestfs_h *g,\n"
10837 "\t\tconst char *xattr,\n"
10838 "\t\tconst char *path);\n"
10843 #: ../src/guestfs-actions.pod:3961 ../fish/guestfish-actions.pod:3055
10845 "This call removes the extended attribute named C<xattr> of the file C<path>."
10849 #: ../src/guestfs-actions.pod:3964
10850 msgid "See also: C<guestfs_lremovexattr>, L<attr(5)>."
10854 #: ../src/guestfs-actions.pod:3968
10855 msgid "guestfs_resize2fs"
10859 #: ../src/guestfs-actions.pod:3970
10862 " int guestfs_resize2fs (guestfs_h *g,\n"
10863 "\t\tconst char *device);\n"
10868 #: ../src/guestfs-actions.pod:3973 ../fish/guestfish-actions.pod:3064
10870 "This resizes an ext2, ext3 or ext4 filesystem to match the size of the "
10871 "underlying device."
10875 #: ../src/guestfs-actions.pod:3976
10877 "I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> on the "
10878 "C<device> before calling this command. For unknown reasons C<resize2fs> "
10879 "sometimes gives an error about this and sometimes not. In any case, it is "
10880 "always safe to call C<guestfs_e2fsck_f> before calling this function."
10884 #: ../src/guestfs-actions.pod:3984
10885 msgid "guestfs_resize2fs_size"
10889 #: ../src/guestfs-actions.pod:3986
10892 " int guestfs_resize2fs_size (guestfs_h *g,\n"
10893 "\t\tconst char *device,\n"
10894 "\t\tint64_t size);\n"
10899 #: ../src/guestfs-actions.pod:3990
10901 "This command is the same as C<guestfs_resize2fs> except that it allows you "
10902 "to specify the new size (in bytes) explicitly."
10906 #: ../src/guestfs-actions.pod:3995
10911 #: ../src/guestfs-actions.pod:3997
10914 " int guestfs_rm (guestfs_h *g,\n"
10915 "\t\tconst char *path);\n"
10920 #: ../src/guestfs-actions.pod:4000 ../fish/guestfish-actions.pod:3084
10921 msgid "Remove the single file C<path>."
10925 #: ../src/guestfs-actions.pod:4004
10926 msgid "guestfs_rm_rf"
10930 #: ../src/guestfs-actions.pod:4006
10933 " int guestfs_rm_rf (guestfs_h *g,\n"
10934 "\t\tconst char *path);\n"
10939 #: ../src/guestfs-actions.pod:4009 ../fish/guestfish-actions.pod:3090
10941 "Remove the file or directory C<path>, recursively removing the contents if "
10942 "its a directory. This is like the C<rm -rf> shell command."
10946 #: ../src/guestfs-actions.pod:4015
10947 msgid "guestfs_rmdir"
10951 #: ../src/guestfs-actions.pod:4017
10954 " int guestfs_rmdir (guestfs_h *g,\n"
10955 "\t\tconst char *path);\n"
10960 #: ../src/guestfs-actions.pod:4020 ../fish/guestfish-actions.pod:3098
10961 msgid "Remove the single directory C<path>."
10965 #: ../src/guestfs-actions.pod:4024
10966 msgid "guestfs_rmmountpoint"
10970 #: ../src/guestfs-actions.pod:4026
10973 " int guestfs_rmmountpoint (guestfs_h *g,\n"
10974 "\t\tconst char *exemptpath);\n"
10979 #: ../src/guestfs-actions.pod:4029
10981 "This calls removes a mountpoint that was previously created with "
10982 "C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> for full details."
10986 #: ../src/guestfs-actions.pod:4035
10987 msgid "guestfs_scrub_device"
10991 #: ../src/guestfs-actions.pod:4037
10994 " int guestfs_scrub_device (guestfs_h *g,\n"
10995 "\t\tconst char *device);\n"
11000 #: ../src/guestfs-actions.pod:4040 ../fish/guestfish-actions.pod:3112
11002 "This command writes patterns over C<device> to make data retrieval more "
11007 #: ../src/guestfs-actions.pod:4043 ../src/guestfs-actions.pod:4061
11008 #: ../src/guestfs-actions.pod:4077 ../fish/guestfish-actions.pod:3115
11009 #: ../fish/guestfish-actions.pod:3130 ../fish/guestfish-actions.pod:3143
11011 "It is an interface to the L<scrub(1)> program. See that manual page for "
11016 #: ../src/guestfs-actions.pod:4051
11017 msgid "guestfs_scrub_file"
11021 #: ../src/guestfs-actions.pod:4053
11024 " int guestfs_scrub_file (guestfs_h *g,\n"
11025 "\t\tconst char *file);\n"
11030 #: ../src/guestfs-actions.pod:4056 ../fish/guestfish-actions.pod:3125
11032 "This command writes patterns over a file to make data retrieval more "
11037 #: ../src/guestfs-actions.pod:4059 ../fish/guestfish-actions.pod:3128
11038 msgid "The file is I<removed> after scrubbing."
11042 #: ../src/guestfs-actions.pod:4066
11043 msgid "guestfs_scrub_freespace"
11047 #: ../src/guestfs-actions.pod:4068
11050 " int guestfs_scrub_freespace (guestfs_h *g,\n"
11051 "\t\tconst char *dir);\n"
11056 #: ../src/guestfs-actions.pod:4071
11058 "This command creates the directory C<dir> and then fills it with files until "
11059 "the filesystem is full, and scrubs the files as for C<guestfs_scrub_file>, "
11060 "and deletes them. The intention is to scrub any free space on the partition "
11061 "containing C<dir>."
11065 #: ../src/guestfs-actions.pod:4082
11066 msgid "guestfs_set_append"
11070 #: ../src/guestfs-actions.pod:4084
11073 " int guestfs_set_append (guestfs_h *g,\n"
11074 "\t\tconst char *append);\n"
11079 #: ../src/guestfs-actions.pod:4087 ../fish/guestfish-actions.pod:3150
11081 "This function is used to add additional options to the guest kernel command "
11086 #: ../src/guestfs-actions.pod:4090 ../fish/guestfish-actions.pod:3153
11088 "The default is C<NULL> unless overridden by setting C<LIBGUESTFS_APPEND> "
11089 "environment variable."
11093 #: ../src/guestfs-actions.pod:4093 ../fish/guestfish-actions.pod:3156
11095 "Setting C<append> to C<NULL> means I<no> additional options are passed "
11096 "(libguestfs always adds a few of its own)."
11100 #: ../src/guestfs-actions.pod:4098
11101 msgid "guestfs_set_autosync"
11105 #: ../src/guestfs-actions.pod:4100
11108 " int guestfs_set_autosync (guestfs_h *g,\n"
11109 "\t\tint autosync);\n"
11114 #: ../src/guestfs-actions.pod:4103
11116 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
11117 "effort attempt to run C<guestfs_umount_all> followed by C<guestfs_sync> when "
11118 "the handle is closed (also if the program exits without closing handles)."
11122 #: ../src/guestfs-actions.pod:4108 ../fish/guestfish-actions.pod:3168
11124 "This is disabled by default (except in guestfish where it is enabled by "
11129 #: ../src/guestfs-actions.pod:4113
11130 msgid "guestfs_set_direct"
11134 #: ../src/guestfs-actions.pod:4115
11137 " int guestfs_set_direct (guestfs_h *g,\n"
11138 "\t\tint direct);\n"
11143 #: ../src/guestfs-actions.pod:4118 ../fish/guestfish-actions.pod:3175
11145 "If the direct appliance mode flag is enabled, then stdin and stdout are "
11146 "passed directly through to the appliance once it is launched."
11150 #: ../src/guestfs-actions.pod:4122
11152 "One consequence of this is that log messages aren't caught by the library "
11153 "and handled by C<guestfs_set_log_message_callback>, but go straight to "
11158 #: ../src/guestfs-actions.pod:4126 ../fish/guestfish-actions.pod:3183
11159 msgid "You probably don't want to use this unless you know what you are doing."
11163 #: ../src/guestfs-actions.pod:4129 ../fish/guestfish-actions.pod:3186
11164 msgid "The default is disabled."
11168 #: ../src/guestfs-actions.pod:4133
11169 msgid "guestfs_set_e2label"
11173 #: ../src/guestfs-actions.pod:4135
11176 " int guestfs_set_e2label (guestfs_h *g,\n"
11177 "\t\tconst char *device,\n"
11178 "\t\tconst char *label);\n"
11183 #: ../src/guestfs-actions.pod:4139 ../fish/guestfish-actions.pod:3192
11185 "This sets the ext2/3/4 filesystem label of the filesystem on C<device> to "
11186 "C<label>. Filesystem labels are limited to 16 characters."
11190 #: ../src/guestfs-actions.pod:4143
11192 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label> to return "
11193 "the existing label on a filesystem."
11197 #: ../src/guestfs-actions.pod:4148
11198 msgid "guestfs_set_e2uuid"
11202 #: ../src/guestfs-actions.pod:4150
11205 " int guestfs_set_e2uuid (guestfs_h *g,\n"
11206 "\t\tconst char *device,\n"
11207 "\t\tconst char *uuid);\n"
11212 #: ../src/guestfs-actions.pod:4154 ../fish/guestfish-actions.pod:3203
11214 "This sets the ext2/3/4 filesystem UUID of the filesystem on C<device> to "
11215 "C<uuid>. The format of the UUID and alternatives such as C<clear>, "
11216 "C<random> and C<time> are described in the L<tune2fs(8)> manpage."
11220 #: ../src/guestfs-actions.pod:4159
11222 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid> to return "
11223 "the existing UUID of a filesystem."
11227 #: ../src/guestfs-actions.pod:4164
11228 msgid "guestfs_set_memsize"
11232 #: ../src/guestfs-actions.pod:4166
11235 " int guestfs_set_memsize (guestfs_h *g,\n"
11236 "\t\tint memsize);\n"
11241 #: ../src/guestfs-actions.pod:4169
11243 "This sets the memory size in megabytes allocated to the qemu subprocess. "
11244 "This only has any effect if called before C<guestfs_launch>."
11248 #: ../src/guestfs-actions.pod:4173 ../fish/guestfish-actions.pod:3219
11250 "You can also change this by setting the environment variable "
11251 "C<LIBGUESTFS_MEMSIZE> before the handle is created."
11255 #: ../src/guestfs-actions.pod:4182
11256 msgid "guestfs_set_network"
11260 #: ../src/guestfs-actions.pod:4184
11263 " int guestfs_set_network (guestfs_h *g,\n"
11264 "\t\tint network);\n"
11269 #: ../src/guestfs-actions.pod:4187 ../fish/guestfish-actions.pod:3230
11271 "If C<network> is true, then the network is enabled in the libguestfs "
11272 "appliance. The default is false."
11276 #: ../src/guestfs-actions.pod:4190 ../fish/guestfish-actions.pod:3233
11278 "This affects whether commands are able to access the network (see L<guestfs"
11279 "(3)/RUNNING COMMANDS>)."
11283 #: ../src/guestfs-actions.pod:4193
11285 "You must call this before calling C<guestfs_launch>, otherwise it has no "
11290 #: ../src/guestfs-actions.pod:4198
11291 msgid "guestfs_set_path"
11295 #: ../src/guestfs-actions.pod:4200
11298 " int guestfs_set_path (guestfs_h *g,\n"
11299 "\t\tconst char *searchpath);\n"
11304 #: ../src/guestfs-actions.pod:4203 ../fish/guestfish-actions.pod:3243
11305 msgid "Set the path that libguestfs searches for kernel and initrd.img."
11309 #: ../src/guestfs-actions.pod:4205 ../fish/guestfish-actions.pod:3245
11311 "The default is C<$libdir/guestfs> unless overridden by setting "
11312 "C<LIBGUESTFS_PATH> environment variable."
11316 #: ../src/guestfs-actions.pod:4208 ../fish/guestfish-actions.pod:3248
11317 msgid "Setting C<path> to C<NULL> restores the default path."
11321 #: ../src/guestfs-actions.pod:4212
11322 msgid "guestfs_set_qemu"
11326 #: ../src/guestfs-actions.pod:4214
11329 " int guestfs_set_qemu (guestfs_h *g,\n"
11330 "\t\tconst char *qemu);\n"
11335 #: ../src/guestfs-actions.pod:4217 ../fish/guestfish-actions.pod:3254
11336 msgid "Set the qemu binary that we will use."
11340 #: ../src/guestfs-actions.pod:4219 ../fish/guestfish-actions.pod:3256
11342 "The default is chosen when the library was compiled by the configure script."
11346 #: ../src/guestfs-actions.pod:4222 ../fish/guestfish-actions.pod:3259
11348 "You can also override this by setting the C<LIBGUESTFS_QEMU> environment "
11353 #: ../src/guestfs-actions.pod:4225 ../fish/guestfish-actions.pod:3262
11354 msgid "Setting C<qemu> to C<NULL> restores the default qemu binary."
11358 #: ../src/guestfs-actions.pod:4227 ../fish/guestfish-actions.pod:3264
11360 "Note that you should call this function as early as possible after creating "
11361 "the handle. This is because some pre-launch operations depend on testing "
11362 "qemu features (by running C<qemu -help>). If the qemu binary changes, we "
11363 "don't retest features, and so you might see inconsistent results. Using the "
11364 "environment variable C<LIBGUESTFS_QEMU> is safest of all since that picks "
11365 "the qemu binary at the same time as the handle is created."
11369 #: ../src/guestfs-actions.pod:4237
11370 msgid "guestfs_set_recovery_proc"
11374 #: ../src/guestfs-actions.pod:4239
11377 " int guestfs_set_recovery_proc (guestfs_h *g,\n"
11378 "\t\tint recoveryproc);\n"
11383 #: ../src/guestfs-actions.pod:4242
11385 "If this is called with the parameter C<false> then C<guestfs_launch> does "
11386 "not create a recovery process. The purpose of the recovery process is to "
11387 "stop runaway qemu processes in the case where the main program aborts "
11392 #: ../src/guestfs-actions.pod:4247
11394 "This only has any effect if called before C<guestfs_launch>, and the default "
11399 #: ../src/guestfs-actions.pod:4250 ../fish/guestfish-actions.pod:3284
11401 "About the only time when you would want to disable this is if the main "
11402 "process will fork itself into the background (\"daemonize\" itself). In "
11403 "this case the recovery process thinks that the main program has disappeared "
11404 "and so kills qemu, which is not very helpful."
11408 #: ../src/guestfs-actions.pod:4258
11409 msgid "guestfs_set_selinux"
11413 #: ../src/guestfs-actions.pod:4260
11416 " int guestfs_set_selinux (guestfs_h *g,\n"
11417 "\t\tint selinux);\n"
11422 #: ../src/guestfs-actions.pod:4263 ../fish/guestfish-actions.pod:3294
11424 "This sets the selinux flag that is passed to the appliance at boot time. "
11425 "The default is C<selinux=0> (disabled)."
11429 #: ../src/guestfs-actions.pod:4266 ../fish/guestfish-actions.pod:3297
11431 "Note that if SELinux is enabled, it is always in Permissive mode "
11432 "(C<enforcing=0>)."
11436 #: ../src/guestfs-actions.pod:4274
11437 msgid "guestfs_set_trace"
11441 #: ../src/guestfs-actions.pod:4276
11444 " int guestfs_set_trace (guestfs_h *g,\n"
11445 "\t\tint trace);\n"
11450 #: ../src/guestfs-actions.pod:4279 ../fish/guestfish-actions.pod:3307
11452 "If the command trace flag is set to 1, then commands are printed on stderr "
11453 "before they are executed in a format which is very similar to the one used "
11454 "by guestfish. In other words, you can run a program with this enabled, and "
11455 "you will get out a script which you can feed to guestfish to perform the "
11456 "same set of actions."
11460 #: ../src/guestfs-actions.pod:4286 ../fish/guestfish-actions.pod:3314
11462 "If you want to trace C API calls into libguestfs (and other libraries) then "
11463 "possibly a better way is to use the external ltrace(1) command."
11467 #: ../src/guestfs-actions.pod:4290 ../fish/guestfish-actions.pod:3318
11469 "Command traces are disabled unless the environment variable "
11470 "C<LIBGUESTFS_TRACE> is defined and set to C<1>."
11474 #: ../src/guestfs-actions.pod:4295
11475 msgid "guestfs_set_verbose"
11479 #: ../src/guestfs-actions.pod:4297
11482 " int guestfs_set_verbose (guestfs_h *g,\n"
11483 "\t\tint verbose);\n"
11488 #: ../src/guestfs-actions.pod:4300 ../fish/guestfish-actions.pod:3325
11489 msgid "If C<verbose> is true, this turns on verbose messages (to C<stderr>)."
11493 #: ../src/guestfs-actions.pod:4302 ../fish/guestfish-actions.pod:3327
11495 "Verbose messages are disabled unless the environment variable "
11496 "C<LIBGUESTFS_DEBUG> is defined and set to C<1>."
11500 #: ../src/guestfs-actions.pod:4307
11501 msgid "guestfs_setcon"
11505 #: ../src/guestfs-actions.pod:4309
11508 " int guestfs_setcon (guestfs_h *g,\n"
11509 "\t\tconst char *context);\n"
11514 #: ../src/guestfs-actions.pod:4312 ../fish/guestfish-actions.pod:3334
11516 "This sets the SELinux security context of the daemon to the string "
11521 #: ../src/guestfs-actions.pod:4315 ../fish/guestfish-actions.pod:3337
11522 msgid "See the documentation about SELINUX in L<guestfs(3)>."
11526 #: ../src/guestfs-actions.pod:4319
11527 msgid "guestfs_setxattr"
11531 #: ../src/guestfs-actions.pod:4321
11534 " int guestfs_setxattr (guestfs_h *g,\n"
11535 "\t\tconst char *xattr,\n"
11536 "\t\tconst char *val,\n"
11537 "\t\tint vallen,\n"
11538 "\t\tconst char *path);\n"
11543 #: ../src/guestfs-actions.pod:4327 ../fish/guestfish-actions.pod:3343
11545 "This call sets the extended attribute named C<xattr> of the file C<path> to "
11546 "the value C<val> (of length C<vallen>). The value is arbitrary 8 bit data."
11550 #: ../src/guestfs-actions.pod:4331
11551 msgid "See also: C<guestfs_lsetxattr>, L<attr(5)>."
11555 #: ../src/guestfs-actions.pod:4335
11556 msgid "guestfs_sfdisk"
11560 #: ../src/guestfs-actions.pod:4337
11563 " int guestfs_sfdisk (guestfs_h *g,\n"
11564 "\t\tconst char *device,\n"
11567 "\t\tint sectors,\n"
11568 "\t\tchar *const *lines);\n"
11573 #: ../src/guestfs-actions.pod:4344 ../fish/guestfish-actions.pod:3353
11575 "This is a direct interface to the L<sfdisk(8)> program for creating "
11576 "partitions on block devices."
11580 #: ../src/guestfs-actions.pod:4347 ../fish/guestfish-actions.pod:3356
11581 msgid "C<device> should be a block device, for example C</dev/sda>."
11585 #: ../src/guestfs-actions.pod:4349 ../fish/guestfish-actions.pod:3358
11587 "C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads and "
11588 "sectors on the device, which are passed directly to sfdisk as the I<-C>, I<-"
11589 "H> and I<-S> parameters. If you pass C<0> for any of these, then the "
11590 "corresponding parameter is omitted. Usually for 'large' disks, you can just "
11591 "pass C<0> for these, but for small (floppy-sized) disks, sfdisk (or rather, "
11592 "the kernel) cannot work out the right geometry and you will need to tell it."
11596 #: ../src/guestfs-actions.pod:4357 ../fish/guestfish-actions.pod:3366
11598 "C<lines> is a list of lines that we feed to C<sfdisk>. For more information "
11599 "refer to the L<sfdisk(8)> manpage."
11603 #: ../src/guestfs-actions.pod:4360 ../fish/guestfish-actions.pod:3369
11605 "To create a single partition occupying the whole disk, you would pass "
11606 "C<lines> as a single element list, when the single element being the string "
11611 #: ../src/guestfs-actions.pod:4364
11613 "See also: C<guestfs_sfdisk_l>, C<guestfs_sfdisk_N>, C<guestfs_part_init>"
11617 #: ../src/guestfs-actions.pod:4372
11618 msgid "guestfs_sfdiskM"
11622 #: ../src/guestfs-actions.pod:4374
11625 " int guestfs_sfdiskM (guestfs_h *g,\n"
11626 "\t\tconst char *device,\n"
11627 "\t\tchar *const *lines);\n"
11632 #: ../src/guestfs-actions.pod:4378
11634 "This is a simplified interface to the C<guestfs_sfdisk> command, where "
11635 "partition sizes are specified in megabytes only (rounded to the nearest "
11636 "cylinder) and you don't need to specify the cyls, heads and sectors "
11637 "parameters which were rarely if ever used anyway."
11641 #: ../src/guestfs-actions.pod:4384
11643 "See also: C<guestfs_sfdisk>, the L<sfdisk(8)> manpage and "
11644 "C<guestfs_part_disk>"
11648 #: ../src/guestfs-actions.pod:4392
11649 msgid "guestfs_sfdisk_N"
11653 #: ../src/guestfs-actions.pod:4394
11656 " int guestfs_sfdisk_N (guestfs_h *g,\n"
11657 "\t\tconst char *device,\n"
11658 "\t\tint partnum,\n"
11661 "\t\tint sectors,\n"
11662 "\t\tconst char *line);\n"
11667 #: ../src/guestfs-actions.pod:4402 ../fish/guestfish-actions.pod:3399
11669 "This runs L<sfdisk(8)> option to modify just the single partition C<n> "
11670 "(note: C<n> counts from 1)."
11674 #: ../src/guestfs-actions.pod:4405
11676 "For other parameters, see C<guestfs_sfdisk>. You should usually pass C<0> "
11677 "for the cyls/heads/sectors parameters."
11681 #: ../src/guestfs-actions.pod:4408
11682 msgid "See also: C<guestfs_part_add>"
11686 #: ../src/guestfs-actions.pod:4415
11687 msgid "guestfs_sfdisk_disk_geometry"
11691 #: ../src/guestfs-actions.pod:4417
11694 " char *guestfs_sfdisk_disk_geometry (guestfs_h *g,\n"
11695 "\t\tconst char *device);\n"
11700 #: ../src/guestfs-actions.pod:4420
11702 "This displays the disk geometry of C<device> read from the partition table. "
11703 "Especially in the case where the underlying block device has been resized, "
11704 "this can be different from the kernel's idea of the geometry (see "
11705 "C<guestfs_sfdisk_kernel_geometry>)."
11709 #: ../src/guestfs-actions.pod:4425 ../src/guestfs-actions.pod:4438
11710 #: ../fish/guestfish-actions.pod:3419 ../fish/guestfish-actions.pod:3428
11711 msgid "The result is in human-readable format, and not designed to be parsed."
11715 #: ../src/guestfs-actions.pod:4431
11716 msgid "guestfs_sfdisk_kernel_geometry"
11720 #: ../src/guestfs-actions.pod:4433
11723 " char *guestfs_sfdisk_kernel_geometry (guestfs_h *g,\n"
11724 "\t\tconst char *device);\n"
11729 #: ../src/guestfs-actions.pod:4436 ../fish/guestfish-actions.pod:3426
11730 msgid "This displays the kernel's idea of the geometry of C<device>."
11734 #: ../src/guestfs-actions.pod:4444
11735 msgid "guestfs_sfdisk_l"
11739 #: ../src/guestfs-actions.pod:4446
11742 " char *guestfs_sfdisk_l (guestfs_h *g,\n"
11743 "\t\tconst char *device);\n"
11748 #: ../src/guestfs-actions.pod:4449 ../fish/guestfish-actions.pod:3435
11750 "This displays the partition table on C<device>, in the human-readable output "
11751 "of the L<sfdisk(8)> command. It is not intended to be parsed."
11755 #: ../src/guestfs-actions.pod:4453
11756 msgid "See also: C<guestfs_part_list>"
11760 #: ../src/guestfs-actions.pod:4458
11765 #: ../src/guestfs-actions.pod:4460
11768 " char *guestfs_sh (guestfs_h *g,\n"
11769 "\t\tconst char *command);\n"
11774 #: ../src/guestfs-actions.pod:4463 ../fish/guestfish-actions.pod:3445
11776 "This call runs a command from the guest filesystem via the guest's C</bin/"
11781 #: ../src/guestfs-actions.pod:4466
11782 msgid "This is like C<guestfs_command>, but passes the command to:"
11786 #: ../src/guestfs-actions.pod:4468 ../fish/guestfish-actions.pod:3450
11789 " /bin/sh -c \"command\"\n"
11794 #: ../src/guestfs-actions.pod:4470 ../fish/guestfish-actions.pod:3452
11796 "Depending on the guest's shell, this usually results in wildcards being "
11797 "expanded, shell expressions being interpolated and so on."
11801 #: ../src/guestfs-actions.pod:4474
11802 msgid "All the provisos about C<guestfs_command> apply to this call."
11806 #: ../src/guestfs-actions.pod:4479
11807 msgid "guestfs_sh_lines"
11811 #: ../src/guestfs-actions.pod:4481
11814 " char **guestfs_sh_lines (guestfs_h *g,\n"
11815 "\t\tconst char *command);\n"
11820 #: ../src/guestfs-actions.pod:4484
11822 "This is the same as C<guestfs_sh>, but splits the result into a list of "
11827 #: ../src/guestfs-actions.pod:4487
11828 msgid "See also: C<guestfs_command_lines>"
11832 #: ../src/guestfs-actions.pod:4493
11833 msgid "guestfs_sleep"
11837 #: ../src/guestfs-actions.pod:4495
11840 " int guestfs_sleep (guestfs_h *g,\n"
11846 #: ../src/guestfs-actions.pod:4498 ../fish/guestfish-actions.pod:3471
11847 msgid "Sleep for C<secs> seconds."
11851 #: ../src/guestfs-actions.pod:4502 ../src/guestfs-structs.pod:109
11852 msgid "guestfs_stat"
11856 #: ../src/guestfs-actions.pod:4504
11859 " struct guestfs_stat *guestfs_stat (guestfs_h *g,\n"
11860 "\t\tconst char *path);\n"
11865 #: ../src/guestfs-actions.pod:4509 ../fish/guestfish-actions.pod:3479
11866 msgid "This is the same as the C<stat(2)> system call."
11870 #: ../src/guestfs-actions.pod:4515 ../src/guestfs-structs.pod:135
11871 msgid "guestfs_statvfs"
11875 #: ../src/guestfs-actions.pod:4517
11878 " struct guestfs_statvfs *guestfs_statvfs (guestfs_h *g,\n"
11879 "\t\tconst char *path);\n"
11884 #: ../src/guestfs-actions.pod:4520 ../fish/guestfish-actions.pod:3485
11886 "Returns file system statistics for any mounted file system. C<path> should "
11887 "be a file or directory in the mounted file system (typically it is the mount "
11888 "point itself, but it doesn't need to be)."
11892 #: ../src/guestfs-actions.pod:4524 ../fish/guestfish-actions.pod:3489
11893 msgid "This is the same as the C<statvfs(2)> system call."
11897 #: ../src/guestfs-actions.pod:4526
11899 "This function returns a C<struct guestfs_statvfs *>, or NULL if there was an "
11900 "error. I<The caller must call C<guestfs_free_statvfs> after use>."
11904 #: ../src/guestfs-actions.pod:4530
11905 msgid "guestfs_strings"
11909 #: ../src/guestfs-actions.pod:4532
11912 " char **guestfs_strings (guestfs_h *g,\n"
11913 "\t\tconst char *path);\n"
11918 #: ../src/guestfs-actions.pod:4535 ../fish/guestfish-actions.pod:3495
11920 "This runs the L<strings(1)> command on a file and returns the list of "
11921 "printable strings found."
11925 #: ../src/guestfs-actions.pod:4545
11926 msgid "guestfs_strings_e"
11930 #: ../src/guestfs-actions.pod:4547
11933 " char **guestfs_strings_e (guestfs_h *g,\n"
11934 "\t\tconst char *encoding,\n"
11935 "\t\tconst char *path);\n"
11940 #: ../src/guestfs-actions.pod:4551
11942 "This is like the C<guestfs_strings> command, but allows you to specify the "
11943 "encoding of strings that are looked for in the source file C<path>."
11947 #: ../src/guestfs-actions.pod:4555 ../fish/guestfish-actions.pod:3509
11948 msgid "Allowed encodings are:"
11952 #: ../src/guestfs-actions.pod:4559 ../fish/guestfish-actions.pod:3513
11957 #: ../src/guestfs-actions.pod:4561
11959 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
11960 "ISO-8859-X (this is what C<guestfs_strings> uses)."
11964 #: ../src/guestfs-actions.pod:4564 ../fish/guestfish-actions.pod:3518
11969 #: ../src/guestfs-actions.pod:4566 ../fish/guestfish-actions.pod:3520
11970 msgid "Single 8-bit-byte characters."
11974 #: ../src/guestfs-actions.pod:4568 ../fish/guestfish-actions.pod:3522
11979 #: ../src/guestfs-actions.pod:4570 ../fish/guestfish-actions.pod:3524
11980 msgid "16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE."
11984 #: ../src/guestfs-actions.pod:4573 ../fish/guestfish-actions.pod:3527
11985 msgid "l (lower case letter L)"
11989 #: ../src/guestfs-actions.pod:4575 ../fish/guestfish-actions.pod:3529
11991 "16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for "
11992 "examining binaries in Windows guests."
11996 #: ../src/guestfs-actions.pod:4578 ../fish/guestfish-actions.pod:3532
12001 #: ../src/guestfs-actions.pod:4580 ../fish/guestfish-actions.pod:3534
12002 msgid "32-bit big endian such as UCS-4BE."
12006 #: ../src/guestfs-actions.pod:4582 ../fish/guestfish-actions.pod:3536
12011 #: ../src/guestfs-actions.pod:4584 ../fish/guestfish-actions.pod:3538
12012 msgid "32-bit little endian such as UCS-4LE."
12016 #: ../src/guestfs-actions.pod:4588 ../fish/guestfish-actions.pod:3542
12017 msgid "The returned strings are transcoded to UTF-8."
12021 #: ../src/guestfs-actions.pod:4597
12022 msgid "guestfs_swapoff_device"
12026 #: ../src/guestfs-actions.pod:4599
12029 " int guestfs_swapoff_device (guestfs_h *g,\n"
12030 "\t\tconst char *device);\n"
12035 #: ../src/guestfs-actions.pod:4602
12037 "This command disables the libguestfs appliance swap device or partition "
12038 "named C<device>. See C<guestfs_swapon_device>."
12042 #: ../src/guestfs-actions.pod:4608
12043 msgid "guestfs_swapoff_file"
12047 #: ../src/guestfs-actions.pod:4610
12050 " int guestfs_swapoff_file (guestfs_h *g,\n"
12051 "\t\tconst char *file);\n"
12056 #: ../src/guestfs-actions.pod:4613 ../fish/guestfish-actions.pod:3559
12057 msgid "This command disables the libguestfs appliance swap on file."
12061 #: ../src/guestfs-actions.pod:4617
12062 msgid "guestfs_swapoff_label"
12066 #: ../src/guestfs-actions.pod:4619
12069 " int guestfs_swapoff_label (guestfs_h *g,\n"
12070 "\t\tconst char *label);\n"
12075 #: ../src/guestfs-actions.pod:4622 ../fish/guestfish-actions.pod:3565
12077 "This command disables the libguestfs appliance swap on labeled swap "
12082 #: ../src/guestfs-actions.pod:4627
12083 msgid "guestfs_swapoff_uuid"
12087 #: ../src/guestfs-actions.pod:4629
12090 " int guestfs_swapoff_uuid (guestfs_h *g,\n"
12091 "\t\tconst char *uuid);\n"
12096 #: ../src/guestfs-actions.pod:4632 ../fish/guestfish-actions.pod:3572
12098 "This command disables the libguestfs appliance swap partition with the given "
12103 #: ../src/guestfs-actions.pod:4637
12104 msgid "guestfs_swapon_device"
12108 #: ../src/guestfs-actions.pod:4639
12111 " int guestfs_swapon_device (guestfs_h *g,\n"
12112 "\t\tconst char *device);\n"
12117 #: ../src/guestfs-actions.pod:4642
12119 "This command enables the libguestfs appliance to use the swap device or "
12120 "partition named C<device>. The increased memory is made available for all "
12121 "commands, for example those run using C<guestfs_command> or C<guestfs_sh>."
12125 #: ../src/guestfs-actions.pod:4647 ../fish/guestfish-actions.pod:3584
12127 "Note that you should not swap to existing guest swap partitions unless you "
12128 "know what you are doing. They may contain hibernation information, or other "
12129 "information that the guest doesn't want you to trash. You also risk leaking "
12130 "information about the host to the guest this way. Instead, attach a new "
12131 "host device to the guest and swap on that."
12135 #: ../src/guestfs-actions.pod:4656
12136 msgid "guestfs_swapon_file"
12140 #: ../src/guestfs-actions.pod:4658
12143 " int guestfs_swapon_file (guestfs_h *g,\n"
12144 "\t\tconst char *file);\n"
12149 #: ../src/guestfs-actions.pod:4661
12151 "This command enables swap to a file. See C<guestfs_swapon_device> for other "
12156 #: ../src/guestfs-actions.pod:4666
12157 msgid "guestfs_swapon_label"
12161 #: ../src/guestfs-actions.pod:4668
12164 " int guestfs_swapon_label (guestfs_h *g,\n"
12165 "\t\tconst char *label);\n"
12170 #: ../src/guestfs-actions.pod:4671
12172 "This command enables swap to a labeled swap partition. See "
12173 "C<guestfs_swapon_device> for other notes."
12177 #: ../src/guestfs-actions.pod:4676
12178 msgid "guestfs_swapon_uuid"
12182 #: ../src/guestfs-actions.pod:4678
12185 " int guestfs_swapon_uuid (guestfs_h *g,\n"
12186 "\t\tconst char *uuid);\n"
12191 #: ../src/guestfs-actions.pod:4681
12193 "This command enables swap to a swap partition with the given UUID. See "
12194 "C<guestfs_swapon_device> for other notes."
12198 #: ../src/guestfs-actions.pod:4686
12199 msgid "guestfs_sync"
12203 #: ../src/guestfs-actions.pod:4688
12206 " int guestfs_sync (guestfs_h *g);\n"
12211 #: ../src/guestfs-actions.pod:4690 ../fish/guestfish-actions.pod:3616
12213 "This syncs the disk, so that any writes are flushed through to the "
12214 "underlying disk image."
12218 #: ../src/guestfs-actions.pod:4693 ../fish/guestfish-actions.pod:3619
12220 "You should always call this if you have modified a disk image, before "
12221 "closing the handle."
12225 #: ../src/guestfs-actions.pod:4698
12226 msgid "guestfs_tail"
12230 #: ../src/guestfs-actions.pod:4700
12233 " char **guestfs_tail (guestfs_h *g,\n"
12234 "\t\tconst char *path);\n"
12239 #: ../src/guestfs-actions.pod:4703 ../fish/guestfish-actions.pod:3626
12241 "This command returns up to the last 10 lines of a file as a list of strings."
12245 #: ../src/guestfs-actions.pod:4713
12246 msgid "guestfs_tail_n"
12250 #: ../src/guestfs-actions.pod:4715
12253 " char **guestfs_tail_n (guestfs_h *g,\n"
12254 "\t\tint nrlines,\n"
12255 "\t\tconst char *path);\n"
12260 #: ../src/guestfs-actions.pod:4719 ../fish/guestfish-actions.pod:3636
12262 "If the parameter C<nrlines> is a positive number, this returns the last "
12263 "C<nrlines> lines of the file C<path>."
12267 #: ../src/guestfs-actions.pod:4722 ../fish/guestfish-actions.pod:3639
12269 "If the parameter C<nrlines> is a negative number, this returns lines from "
12270 "the file C<path>, starting with the C<-nrlines>th line."
12274 #: ../src/guestfs-actions.pod:4734
12275 msgid "guestfs_tar_in"
12279 #: ../src/guestfs-actions.pod:4736
12282 " int guestfs_tar_in (guestfs_h *g,\n"
12283 "\t\tconst char *tarfile,\n"
12284 "\t\tconst char *directory);\n"
12289 #: ../src/guestfs-actions.pod:4740 ../fish/guestfish-actions.pod:3651
12291 "This command uploads and unpacks local file C<tarfile> (an I<uncompressed> "
12292 "tar file) into C<directory>."
12296 #: ../src/guestfs-actions.pod:4743
12298 "To upload a compressed tarball, use C<guestfs_tgz_in> or C<guestfs_txz_in>."
12302 #: ../src/guestfs-actions.pod:4748
12303 msgid "guestfs_tar_out"
12307 #: ../src/guestfs-actions.pod:4750
12310 " int guestfs_tar_out (guestfs_h *g,\n"
12311 "\t\tconst char *directory,\n"
12312 "\t\tconst char *tarfile);\n"
12317 #: ../src/guestfs-actions.pod:4754 ../fish/guestfish-actions.pod:3663
12319 "This command packs the contents of C<directory> and downloads it to local "
12324 #: ../src/guestfs-actions.pod:4757
12326 "To download a compressed tarball, use C<guestfs_tgz_out> or "
12327 "C<guestfs_txz_out>."
12331 #: ../src/guestfs-actions.pod:4762
12332 msgid "guestfs_tgz_in"
12336 #: ../src/guestfs-actions.pod:4764
12339 " int guestfs_tgz_in (guestfs_h *g,\n"
12340 "\t\tconst char *tarball,\n"
12341 "\t\tconst char *directory);\n"
12346 #: ../src/guestfs-actions.pod:4768 ../fish/guestfish-actions.pod:3675
12348 "This command uploads and unpacks local file C<tarball> (a I<gzip compressed> "
12349 "tar file) into C<directory>."
12353 #: ../src/guestfs-actions.pod:4771
12354 msgid "To upload an uncompressed tarball, use C<guestfs_tar_in>."
12358 #: ../src/guestfs-actions.pod:4775
12359 msgid "guestfs_tgz_out"
12363 #: ../src/guestfs-actions.pod:4777
12366 " int guestfs_tgz_out (guestfs_h *g,\n"
12367 "\t\tconst char *directory,\n"
12368 "\t\tconst char *tarball);\n"
12373 #: ../src/guestfs-actions.pod:4781 ../fish/guestfish-actions.pod:3686
12375 "This command packs the contents of C<directory> and downloads it to local "
12380 #: ../src/guestfs-actions.pod:4784
12381 msgid "To download an uncompressed tarball, use C<guestfs_tar_out>."
12385 #: ../src/guestfs-actions.pod:4788
12386 msgid "guestfs_touch"
12390 #: ../src/guestfs-actions.pod:4790
12393 " int guestfs_touch (guestfs_h *g,\n"
12394 "\t\tconst char *path);\n"
12399 #: ../src/guestfs-actions.pod:4793 ../fish/guestfish-actions.pod:3697
12401 "Touch acts like the L<touch(1)> command. It can be used to update the "
12402 "timestamps on a file, or, if the file does not exist, to create a new zero-"
12407 #: ../src/guestfs-actions.pod:4797 ../fish/guestfish-actions.pod:3701
12409 "This command only works on regular files, and will fail on other file types "
12410 "such as directories, symbolic links, block special etc."
12414 #: ../src/guestfs-actions.pod:4802
12415 msgid "guestfs_truncate"
12419 #: ../src/guestfs-actions.pod:4804
12422 " int guestfs_truncate (guestfs_h *g,\n"
12423 "\t\tconst char *path);\n"
12428 #: ../src/guestfs-actions.pod:4807 ../fish/guestfish-actions.pod:3708
12430 "This command truncates C<path> to a zero-length file. The file must exist "
12435 #: ../src/guestfs-actions.pod:4812
12436 msgid "guestfs_truncate_size"
12440 #: ../src/guestfs-actions.pod:4814
12443 " int guestfs_truncate_size (guestfs_h *g,\n"
12444 "\t\tconst char *path,\n"
12445 "\t\tint64_t size);\n"
12450 #: ../src/guestfs-actions.pod:4818 ../fish/guestfish-actions.pod:3715
12452 "This command truncates C<path> to size C<size> bytes. The file must exist "
12457 #: ../src/guestfs-actions.pod:4821
12459 "If the current file size is less than C<size> then the file is extended to "
12460 "the required size with zero bytes. This creates a sparse file (ie. disk "
12461 "blocks are not allocated for the file until you write to it). To create a "
12462 "non-sparse file of zeroes, use C<guestfs_fallocate64> instead."
12466 #: ../src/guestfs-actions.pod:4829
12467 msgid "guestfs_tune2fs_l"
12471 #: ../src/guestfs-actions.pod:4831
12474 " char **guestfs_tune2fs_l (guestfs_h *g,\n"
12475 "\t\tconst char *device);\n"
12480 #: ../src/guestfs-actions.pod:4834 ../fish/guestfish-actions.pod:3728
12482 "This returns the contents of the ext2, ext3 or ext4 filesystem superblock on "
12487 #: ../src/guestfs-actions.pod:4837 ../fish/guestfish-actions.pod:3731
12489 "It is the same as running C<tune2fs -l device>. See L<tune2fs(8)> manpage "
12490 "for more details. The list of fields returned isn't clearly defined, and "
12491 "depends on both the version of C<tune2fs> that libguestfs was built against, "
12492 "and the filesystem itself."
12496 #: ../src/guestfs-actions.pod:4848
12497 msgid "guestfs_txz_in"
12501 #: ../src/guestfs-actions.pod:4850
12504 " int guestfs_txz_in (guestfs_h *g,\n"
12505 "\t\tconst char *tarball,\n"
12506 "\t\tconst char *directory);\n"
12511 #: ../src/guestfs-actions.pod:4854 ../fish/guestfish-actions.pod:3740
12513 "This command uploads and unpacks local file C<tarball> (an I<xz compressed> "
12514 "tar file) into C<directory>."
12518 #: ../src/guestfs-actions.pod:4859
12519 msgid "guestfs_txz_out"
12523 #: ../src/guestfs-actions.pod:4861
12526 " int guestfs_txz_out (guestfs_h *g,\n"
12527 "\t\tconst char *directory,\n"
12528 "\t\tconst char *tarball);\n"
12533 #: ../src/guestfs-actions.pod:4865 ../fish/guestfish-actions.pod:3749
12535 "This command packs the contents of C<directory> and downloads it to local "
12536 "file C<tarball> (as an xz compressed tar archive)."
12540 #: ../src/guestfs-actions.pod:4870
12541 msgid "guestfs_umask"
12545 #: ../src/guestfs-actions.pod:4872
12548 " int guestfs_umask (guestfs_h *g,\n"
12554 #: ../src/guestfs-actions.pod:4875 ../fish/guestfish-actions.pod:3758
12556 "This function sets the mask used for creating new files and device nodes to "
12561 #: ../src/guestfs-actions.pod:4878 ../fish/guestfish-actions.pod:3761
12563 "Typical umask values would be C<022> which creates new files with "
12564 "permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and C<002> which creates "
12565 "new files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\"."
12569 #: ../src/guestfs-actions.pod:4883 ../fish/guestfish-actions.pod:3766
12571 "The default umask is C<022>. This is important because it means that "
12572 "directories and device nodes will be created with C<0644> or C<0755> mode "
12573 "even if you specify C<0777>."
12577 #: ../src/guestfs-actions.pod:4887
12579 "See also C<guestfs_get_umask>, L<umask(2)>, C<guestfs_mknod>, "
12580 "C<guestfs_mkdir>."
12584 #: ../src/guestfs-actions.pod:4890 ../fish/guestfish-actions.pod:3773
12585 msgid "This call returns the previous umask."
12589 #: ../src/guestfs-actions.pod:4894
12590 msgid "guestfs_umount"
12594 #: ../src/guestfs-actions.pod:4896
12597 " int guestfs_umount (guestfs_h *g,\n"
12598 "\t\tconst char *pathordevice);\n"
12603 #: ../src/guestfs-actions.pod:4899 ../fish/guestfish-actions.pod:3779
12605 "This unmounts the given filesystem. The filesystem may be specified either "
12606 "by its mountpoint (path) or the device which contains the filesystem."
12610 #: ../src/guestfs-actions.pod:4905
12611 msgid "guestfs_umount_all"
12615 #: ../src/guestfs-actions.pod:4907
12618 " int guestfs_umount_all (guestfs_h *g);\n"
12623 #: ../src/guestfs-actions.pod:4909 ../fish/guestfish-actions.pod:3787
12624 msgid "This unmounts all mounted filesystems."
12628 #: ../src/guestfs-actions.pod:4911 ../fish/guestfish-actions.pod:3789
12629 msgid "Some internal mounts are not unmounted by this call."
12633 #: ../src/guestfs-actions.pod:4915
12634 msgid "guestfs_upload"
12638 #: ../src/guestfs-actions.pod:4917
12641 " int guestfs_upload (guestfs_h *g,\n"
12642 "\t\tconst char *filename,\n"
12643 "\t\tconst char *remotefilename);\n"
12648 #: ../src/guestfs-actions.pod:4921 ../fish/guestfish-actions.pod:3795
12649 msgid "Upload local file C<filename> to C<remotefilename> on the filesystem."
12653 #: ../src/guestfs-actions.pod:4926
12654 msgid "See also C<guestfs_download>."
12658 #: ../src/guestfs-actions.pod:4930
12659 msgid "guestfs_utimens"
12663 #: ../src/guestfs-actions.pod:4932
12666 " int guestfs_utimens (guestfs_h *g,\n"
12667 "\t\tconst char *path,\n"
12668 "\t\tint64_t atsecs,\n"
12669 "\t\tint64_t atnsecs,\n"
12670 "\t\tint64_t mtsecs,\n"
12671 "\t\tint64_t mtnsecs);\n"
12676 #: ../src/guestfs-actions.pod:4939 ../fish/guestfish-actions.pod:3808
12677 msgid "This command sets the timestamps of a file with nanosecond precision."
12681 #: ../src/guestfs-actions.pod:4942 ../fish/guestfish-actions.pod:3811
12683 "C<atsecs, atnsecs> are the last access time (atime) in secs and nanoseconds "
12688 #: ../src/guestfs-actions.pod:4945 ../fish/guestfish-actions.pod:3814
12690 "C<mtsecs, mtnsecs> are the last modification time (mtime) in secs and "
12691 "nanoseconds from the epoch."
12695 #: ../src/guestfs-actions.pod:4948 ../fish/guestfish-actions.pod:3817
12697 "If the C<*nsecs> field contains the special value C<-1> then the "
12698 "corresponding timestamp is set to the current time. (The C<*secs> field is "
12699 "ignored in this case)."
12703 #: ../src/guestfs-actions.pod:4952 ../fish/guestfish-actions.pod:3821
12705 "If the C<*nsecs> field contains the special value C<-2> then the "
12706 "corresponding timestamp is left unchanged. (The C<*secs> field is ignored "
12711 #: ../src/guestfs-actions.pod:4958 ../src/guestfs-structs.pod:175
12712 msgid "guestfs_version"
12716 #: ../src/guestfs-actions.pod:4960
12719 " struct guestfs_version *guestfs_version (guestfs_h *g);\n"
12724 #: ../src/guestfs-actions.pod:4962 ../fish/guestfish-actions.pod:3829
12726 "Return the libguestfs version number that the program is linked against."
12730 #: ../src/guestfs-actions.pod:4965 ../fish/guestfish-actions.pod:3832
12732 "Note that because of dynamic linking this is not necessarily the version of "
12733 "libguestfs that you compiled against. You can compile the program, and then "
12734 "at runtime dynamically link against a completely different C<libguestfs.so> "
12739 #: ../src/guestfs-actions.pod:4970 ../fish/guestfish-actions.pod:3837
12741 "This call was added in version C<1.0.58>. In previous versions of "
12742 "libguestfs there was no way to get the version number. From C code you can "
12743 "use dynamic linker functions to find out if this symbol exists (if it "
12744 "doesn't, then it's an earlier version)."
12748 #: ../src/guestfs-actions.pod:4976 ../fish/guestfish-actions.pod:3843
12750 "The call returns a structure with four elements. The first three (C<major>, "
12751 "C<minor> and C<release>) are numbers and correspond to the usual version "
12752 "triplet. The fourth element (C<extra>) is a string and is normally empty, "
12753 "but may be used for distro-specific information."
12757 #: ../src/guestfs-actions.pod:4982 ../fish/guestfish-actions.pod:3849
12759 "To construct the original version string: C<$major.$minor.$release$extra>"
12763 #: ../src/guestfs-actions.pod:4985 ../fish/guestfish-actions.pod:3852
12764 msgid "See also: L<guestfs(3)/LIBGUESTFS VERSION NUMBERS>."
12768 #: ../src/guestfs-actions.pod:4987
12770 "I<Note:> Don't use this call to test for availability of features. In "
12771 "enterprise distributions we backport features from later versions into "
12772 "earlier versions, making this an unreliable way to test for features. Use "
12773 "C<guestfs_available> instead."
12777 #: ../src/guestfs-actions.pod:4993
12779 "This function returns a C<struct guestfs_version *>, or NULL if there was an "
12780 "error. I<The caller must call C<guestfs_free_version> after use>."
12784 #: ../src/guestfs-actions.pod:4997
12785 msgid "guestfs_vfs_label"
12789 #: ../src/guestfs-actions.pod:4999
12792 " char *guestfs_vfs_label (guestfs_h *g,\n"
12793 "\t\tconst char *device);\n"
12798 #: ../src/guestfs-actions.pod:5002 ../fish/guestfish-actions.pod:3864
12799 msgid "This returns the filesystem label of the filesystem on C<device>."
12803 #: ../src/guestfs-actions.pod:5005 ../fish/guestfish-actions.pod:3867
12804 msgid "If the filesystem is unlabeled, this returns the empty string."
12808 #: ../src/guestfs-actions.pod:5007
12809 msgid "To find a filesystem from the label, use C<guestfs_findfs_label>."
12813 #: ../src/guestfs-actions.pod:5012
12814 msgid "guestfs_vfs_type"
12818 #: ../src/guestfs-actions.pod:5014
12821 " char *guestfs_vfs_type (guestfs_h *g,\n"
12822 "\t\tconst char *device);\n"
12827 #: ../src/guestfs-actions.pod:5017 ../fish/guestfish-actions.pod:3875
12829 "This command gets the filesystem type corresponding to the filesystem on "
12834 #: ../src/guestfs-actions.pod:5020 ../fish/guestfish-actions.pod:3878
12836 "For most filesystems, the result is the name of the Linux VFS module which "
12837 "would be used to mount this filesystem if you mounted it without specifying "
12838 "the filesystem type. For example a string such as C<ext3> or C<ntfs>."
12842 #: ../src/guestfs-actions.pod:5028
12843 msgid "guestfs_vfs_uuid"
12847 #: ../src/guestfs-actions.pod:5030
12850 " char *guestfs_vfs_uuid (guestfs_h *g,\n"
12851 "\t\tconst char *device);\n"
12856 #: ../src/guestfs-actions.pod:5033 ../fish/guestfish-actions.pod:3887
12857 msgid "This returns the filesystem UUID of the filesystem on C<device>."
12861 #: ../src/guestfs-actions.pod:5036 ../fish/guestfish-actions.pod:3890
12862 msgid "If the filesystem does not have a UUID, this returns the empty string."
12866 #: ../src/guestfs-actions.pod:5038
12867 msgid "To find a filesystem from the UUID, use C<guestfs_findfs_uuid>."
12871 #: ../src/guestfs-actions.pod:5043
12872 msgid "guestfs_vg_activate"
12876 #: ../src/guestfs-actions.pod:5045
12879 " int guestfs_vg_activate (guestfs_h *g,\n"
12880 "\t\tint activate,\n"
12881 "\t\tchar *const *volgroups);\n"
12886 #: ../src/guestfs-actions.pod:5049 ../fish/guestfish-actions.pod:3898
12888 "This command activates or (if C<activate> is false) deactivates all logical "
12889 "volumes in the listed volume groups C<volgroups>. If activated, then they "
12890 "are made known to the kernel, ie. they appear as C</dev/mapper> devices. If "
12891 "deactivated, then those devices disappear."
12895 #: ../src/guestfs-actions.pod:5055 ../fish/guestfish-actions.pod:3904
12896 msgid "This command is the same as running C<vgchange -a y|n volgroups...>"
12900 #: ../src/guestfs-actions.pod:5057 ../fish/guestfish-actions.pod:3906
12902 "Note that if C<volgroups> is an empty list then B<all> volume groups are "
12903 "activated or deactivated."
12907 #: ../src/guestfs-actions.pod:5062
12908 msgid "guestfs_vg_activate_all"
12912 #: ../src/guestfs-actions.pod:5064
12915 " int guestfs_vg_activate_all (guestfs_h *g,\n"
12916 "\t\tint activate);\n"
12921 #: ../src/guestfs-actions.pod:5067 ../fish/guestfish-actions.pod:3913
12923 "This command activates or (if C<activate> is false) deactivates all logical "
12924 "volumes in all volume groups. If activated, then they are made known to the "
12925 "kernel, ie. they appear as C</dev/mapper> devices. If deactivated, then "
12926 "those devices disappear."
12930 #: ../src/guestfs-actions.pod:5073 ../fish/guestfish-actions.pod:3919
12931 msgid "This command is the same as running C<vgchange -a y|n>"
12935 #: ../src/guestfs-actions.pod:5077
12936 msgid "guestfs_vgcreate"
12940 #: ../src/guestfs-actions.pod:5079
12943 " int guestfs_vgcreate (guestfs_h *g,\n"
12944 "\t\tconst char *volgroup,\n"
12945 "\t\tchar *const *physvols);\n"
12950 #: ../src/guestfs-actions.pod:5083 ../fish/guestfish-actions.pod:3925
12952 "This creates an LVM volume group called C<volgroup> from the non-empty list "
12953 "of physical volumes C<physvols>."
12957 #: ../src/guestfs-actions.pod:5088
12958 msgid "guestfs_vglvuuids"
12962 #: ../src/guestfs-actions.pod:5090
12965 " char **guestfs_vglvuuids (guestfs_h *g,\n"
12966 "\t\tconst char *vgname);\n"
12971 #: ../src/guestfs-actions.pod:5093 ../fish/guestfish-actions.pod:3932
12973 "Given a VG called C<vgname>, this returns the UUIDs of all the logical "
12974 "volumes created in this volume group."
12978 #: ../src/guestfs-actions.pod:5096
12980 "You can use this along with C<guestfs_lvs> and C<guestfs_lvuuid> calls to "
12981 "associate logical volumes and volume groups."
12985 #: ../src/guestfs-actions.pod:5099
12986 msgid "See also C<guestfs_vgpvuuids>."
12990 #: ../src/guestfs-actions.pod:5105
12991 msgid "guestfs_vgpvuuids"
12995 #: ../src/guestfs-actions.pod:5107
12998 " char **guestfs_vgpvuuids (guestfs_h *g,\n"
12999 "\t\tconst char *vgname);\n"
13004 #: ../src/guestfs-actions.pod:5110 ../fish/guestfish-actions.pod:3944
13006 "Given a VG called C<vgname>, this returns the UUIDs of all the physical "
13007 "volumes that this volume group resides on."
13011 #: ../src/guestfs-actions.pod:5113
13013 "You can use this along with C<guestfs_pvs> and C<guestfs_pvuuid> calls to "
13014 "associate physical volumes and volume groups."
13018 #: ../src/guestfs-actions.pod:5116
13019 msgid "See also C<guestfs_vglvuuids>."
13023 #: ../src/guestfs-actions.pod:5122
13024 msgid "guestfs_vgremove"
13028 #: ../src/guestfs-actions.pod:5124
13031 " int guestfs_vgremove (guestfs_h *g,\n"
13032 "\t\tconst char *vgname);\n"
13037 #: ../src/guestfs-actions.pod:5127 ../fish/guestfish-actions.pod:3956
13038 msgid "Remove an LVM volume group C<vgname>, (for example C<VG>)."
13042 #: ../src/guestfs-actions.pod:5129 ../fish/guestfish-actions.pod:3958
13044 "This also forcibly removes all logical volumes in the volume group (if any)."
13048 #: ../src/guestfs-actions.pod:5134
13049 msgid "guestfs_vgrename"
13053 #: ../src/guestfs-actions.pod:5136
13056 " int guestfs_vgrename (guestfs_h *g,\n"
13057 "\t\tconst char *volgroup,\n"
13058 "\t\tconst char *newvolgroup);\n"
13063 #: ../src/guestfs-actions.pod:5140 ../fish/guestfish-actions.pod:3965
13064 msgid "Rename a volume group C<volgroup> with the new name C<newvolgroup>."
13068 #: ../src/guestfs-actions.pod:5144
13069 msgid "guestfs_vgs"
13073 #: ../src/guestfs-actions.pod:5146
13076 " char **guestfs_vgs (guestfs_h *g);\n"
13081 #: ../src/guestfs-actions.pod:5148 ../fish/guestfish-actions.pod:3971
13083 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
13088 #: ../src/guestfs-actions.pod:5151 ../fish/guestfish-actions.pod:3974
13090 "This returns a list of just the volume group names that were detected (eg. "
13095 #: ../src/guestfs-actions.pod:5154
13096 msgid "See also C<guestfs_vgs_full>."
13100 #: ../src/guestfs-actions.pod:5160
13101 msgid "guestfs_vgs_full"
13105 #: ../src/guestfs-actions.pod:5162
13108 " struct guestfs_lvm_vg_list *guestfs_vgs_full (guestfs_h *g);\n"
13113 #: ../src/guestfs-actions.pod:5164 ../fish/guestfish-actions.pod:3983
13115 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
13116 "> command. The \"full\" version includes all fields."
13120 #: ../src/guestfs-actions.pod:5167
13122 "This function returns a C<struct guestfs_lvm_vg_list *> (see E<lt>guestfs-"
13123 "structs.hE<gt>), or NULL if there was an error. I<The caller must call "
13124 "C<guestfs_free_lvm_vg_list> after use>."
13128 #: ../src/guestfs-actions.pod:5172
13129 msgid "guestfs_vgscan"
13133 #: ../src/guestfs-actions.pod:5174
13136 " int guestfs_vgscan (guestfs_h *g);\n"
13141 #: ../src/guestfs-actions.pod:5176 ../fish/guestfish-actions.pod:3990
13143 "This rescans all block devices and rebuilds the list of LVM physical "
13144 "volumes, volume groups and logical volumes."
13148 #: ../src/guestfs-actions.pod:5181
13149 msgid "guestfs_vguuid"
13153 #: ../src/guestfs-actions.pod:5183
13156 " char *guestfs_vguuid (guestfs_h *g,\n"
13157 "\t\tconst char *vgname);\n"
13162 #: ../src/guestfs-actions.pod:5186 ../fish/guestfish-actions.pod:3997
13163 msgid "This command returns the UUID of the LVM VG named C<vgname>."
13167 #: ../src/guestfs-actions.pod:5191
13168 msgid "guestfs_wait_ready"
13172 #: ../src/guestfs-actions.pod:5193
13175 " int guestfs_wait_ready (guestfs_h *g);\n"
13180 #: ../src/guestfs-actions.pod:5195
13181 msgid "This function is a no op."
13185 #: ../src/guestfs-actions.pod:5197
13187 "In versions of the API E<lt> 1.0.71 you had to call this function just after "
13188 "calling C<guestfs_launch> to wait for the launch to complete. However this "
13189 "is no longer necessary because C<guestfs_launch> now does the waiting."
13193 #: ../src/guestfs-actions.pod:5202
13195 "If you see any calls to this function in code then you can just remove them, "
13196 "unless you want to retain compatibility with older versions of the API."
13200 #: ../src/guestfs-actions.pod:5208
13201 msgid "guestfs_wc_c"
13205 #: ../src/guestfs-actions.pod:5210
13208 " int guestfs_wc_c (guestfs_h *g,\n"
13209 "\t\tconst char *path);\n"
13214 #: ../src/guestfs-actions.pod:5213 ../fish/guestfish-actions.pod:4003
13216 "This command counts the characters in a file, using the C<wc -c> external "
13221 #: ../src/guestfs-actions.pod:5218
13222 msgid "guestfs_wc_l"
13226 #: ../src/guestfs-actions.pod:5220
13229 " int guestfs_wc_l (guestfs_h *g,\n"
13230 "\t\tconst char *path);\n"
13235 #: ../src/guestfs-actions.pod:5223 ../fish/guestfish-actions.pod:4010
13237 "This command counts the lines in a file, using the C<wc -l> external command."
13241 #: ../src/guestfs-actions.pod:5228
13242 msgid "guestfs_wc_w"
13246 #: ../src/guestfs-actions.pod:5230
13249 " int guestfs_wc_w (guestfs_h *g,\n"
13250 "\t\tconst char *path);\n"
13255 #: ../src/guestfs-actions.pod:5233 ../fish/guestfish-actions.pod:4017
13257 "This command counts the words in a file, using the C<wc -w> external command."
13261 #: ../src/guestfs-actions.pod:5238
13262 msgid "guestfs_write"
13266 #: ../src/guestfs-actions.pod:5240
13269 " int guestfs_write (guestfs_h *g,\n"
13270 "\t\tconst char *path,\n"
13271 "\t\tconst char *content,\n"
13272 "\t\tsize_t content_size);\n"
13277 #: ../src/guestfs-actions.pod:5245 ../fish/guestfish-actions.pod:4024
13279 "This call creates a file called C<path>. The content of the file is the "
13280 "string C<content> (which can contain any 8 bit data)."
13284 #: ../src/guestfs-actions.pod:5253
13285 msgid "guestfs_write_file"
13289 #: ../src/guestfs-actions.pod:5255
13292 " int guestfs_write_file (guestfs_h *g,\n"
13293 "\t\tconst char *path,\n"
13294 "\t\tconst char *content,\n"
13300 #: ../src/guestfs-actions.pod:5260 ../fish/guestfish-actions.pod:4034
13302 "This call creates a file called C<path>. The contents of the file is the "
13303 "string C<content> (which can contain any 8 bit data), with length C<size>."
13307 #: ../src/guestfs-actions.pod:5264 ../fish/guestfish-actions.pod:4038
13309 "As a special case, if C<size> is C<0> then the length is calculated using "
13310 "C<strlen> (so in this case the content cannot contain embedded ASCII NULs)."
13314 #: ../src/guestfs-actions.pod:5268 ../fish/guestfish-actions.pod:4042
13316 "I<NB.> Owing to a bug, writing content containing ASCII NUL characters does "
13317 "I<not> work, even if the length is specified."
13321 #: ../src/guestfs-actions.pod:5276 ../fish/guestfish-actions.pod:4048
13323 "This function is deprecated. In new code, use the C<write> call instead."
13327 #: ../src/guestfs-actions.pod:5283
13328 msgid "guestfs_zegrep"
13332 #: ../src/guestfs-actions.pod:5285
13335 " char **guestfs_zegrep (guestfs_h *g,\n"
13336 "\t\tconst char *regex,\n"
13337 "\t\tconst char *path);\n"
13342 #: ../src/guestfs-actions.pod:5289 ../fish/guestfish-actions.pod:4059
13344 "This calls the external C<zegrep> program and returns the matching lines."
13348 #: ../src/guestfs-actions.pod:5299
13349 msgid "guestfs_zegrepi"
13353 #: ../src/guestfs-actions.pod:5301
13356 " char **guestfs_zegrepi (guestfs_h *g,\n"
13357 "\t\tconst char *regex,\n"
13358 "\t\tconst char *path);\n"
13363 #: ../src/guestfs-actions.pod:5305 ../fish/guestfish-actions.pod:4069
13365 "This calls the external C<zegrep -i> program and returns the matching lines."
13369 #: ../src/guestfs-actions.pod:5315
13370 msgid "guestfs_zero"
13374 #: ../src/guestfs-actions.pod:5317
13377 " int guestfs_zero (guestfs_h *g,\n"
13378 "\t\tconst char *device);\n"
13383 #: ../src/guestfs-actions.pod:5320 ../fish/guestfish-actions.pod:4079
13384 msgid "This command writes zeroes over the first few blocks of C<device>."
13388 #: ../src/guestfs-actions.pod:5322 ../fish/guestfish-actions.pod:4081
13390 "How many blocks are zeroed isn't specified (but it's I<not> enough to "
13391 "securely wipe the device). It should be sufficient to remove any partition "
13392 "tables, filesystem superblocks and so on."
13396 #: ../src/guestfs-actions.pod:5326
13397 msgid "See also: C<guestfs_zero_device>, C<guestfs_scrub_device>."
13401 #: ../src/guestfs-actions.pod:5335
13402 msgid "guestfs_zero_device"
13406 #: ../src/guestfs-actions.pod:5337
13409 " int guestfs_zero_device (guestfs_h *g,\n"
13410 "\t\tconst char *device);\n"
13415 #: ../src/guestfs-actions.pod:5340
13417 "This command writes zeroes over the entire C<device>. Compare with "
13418 "C<guestfs_zero> which just zeroes the first few blocks of a device."
13422 #: ../src/guestfs-actions.pod:5354
13423 msgid "guestfs_zerofree"
13427 #: ../src/guestfs-actions.pod:5356
13430 " int guestfs_zerofree (guestfs_h *g,\n"
13431 "\t\tconst char *device);\n"
13436 #: ../src/guestfs-actions.pod:5359 ../fish/guestfish-actions.pod:4102
13438 "This runs the I<zerofree> program on C<device>. This program claims to zero "
13439 "unused inodes and disk blocks on an ext2/3 filesystem, thus making it "
13440 "possible to compress the filesystem more effectively."
13444 #: ../src/guestfs-actions.pod:5364 ../fish/guestfish-actions.pod:4107
13445 msgid "You should B<not> run this program if the filesystem is mounted."
13449 #: ../src/guestfs-actions.pod:5367 ../fish/guestfish-actions.pod:4110
13451 "It is possible that using this program can damage the filesystem or data on "
13456 #: ../src/guestfs-actions.pod:5372
13457 msgid "guestfs_zfgrep"
13461 #: ../src/guestfs-actions.pod:5374
13464 " char **guestfs_zfgrep (guestfs_h *g,\n"
13465 "\t\tconst char *pattern,\n"
13466 "\t\tconst char *path);\n"
13471 #: ../src/guestfs-actions.pod:5378 ../fish/guestfish-actions.pod:4117
13473 "This calls the external C<zfgrep> program and returns the matching lines."
13477 #: ../src/guestfs-actions.pod:5388
13478 msgid "guestfs_zfgrepi"
13482 #: ../src/guestfs-actions.pod:5390
13485 " char **guestfs_zfgrepi (guestfs_h *g,\n"
13486 "\t\tconst char *pattern,\n"
13487 "\t\tconst char *path);\n"
13492 #: ../src/guestfs-actions.pod:5394 ../fish/guestfish-actions.pod:4127
13494 "This calls the external C<zfgrep -i> program and returns the matching lines."
13498 #: ../src/guestfs-actions.pod:5404
13499 msgid "guestfs_zfile"
13503 #: ../src/guestfs-actions.pod:5406
13506 " char *guestfs_zfile (guestfs_h *g,\n"
13507 "\t\tconst char *meth,\n"
13508 "\t\tconst char *path);\n"
13513 #: ../src/guestfs-actions.pod:5410 ../fish/guestfish-actions.pod:4137
13515 "This command runs C<file> after first decompressing C<path> using C<method>."
13519 #: ../src/guestfs-actions.pod:5413 ../fish/guestfish-actions.pod:4140
13520 msgid "C<method> must be one of C<gzip>, C<compress> or C<bzip2>."
13524 #: ../src/guestfs-actions.pod:5415
13526 "Since 1.0.63, use C<guestfs_file> instead which can now process compressed "
13531 #: ../src/guestfs-actions.pod:5421 ../fish/guestfish-actions.pod:4145
13533 "This function is deprecated. In new code, use the C<file> call instead."
13537 #: ../src/guestfs-actions.pod:5428
13538 msgid "guestfs_zgrep"
13542 #: ../src/guestfs-actions.pod:5430
13545 " char **guestfs_zgrep (guestfs_h *g,\n"
13546 "\t\tconst char *regex,\n"
13547 "\t\tconst char *path);\n"
13552 #: ../src/guestfs-actions.pod:5434 ../fish/guestfish-actions.pod:4156
13554 "This calls the external C<zgrep> program and returns the matching lines."
13558 #: ../src/guestfs-actions.pod:5444
13559 msgid "guestfs_zgrepi"
13563 #: ../src/guestfs-actions.pod:5446
13566 " char **guestfs_zgrepi (guestfs_h *g,\n"
13567 "\t\tconst char *regex,\n"
13568 "\t\tconst char *path);\n"
13573 #: ../src/guestfs-actions.pod:5450 ../fish/guestfish-actions.pod:4166
13575 "This calls the external C<zgrep -i> program and returns the matching lines."
13579 #: ../src/guestfs-availability.pod:3
13584 #: ../src/guestfs-availability.pod:5
13586 "The following functions: L</guestfs_aug_clear> L</guestfs_aug_close> L</"
13587 "guestfs_aug_defnode> L</guestfs_aug_defvar> L</guestfs_aug_get> L</"
13588 "guestfs_aug_init> L</guestfs_aug_insert> L</guestfs_aug_load> L</"
13589 "guestfs_aug_ls> L</guestfs_aug_match> L</guestfs_aug_mv> L</guestfs_aug_rm> "
13590 "L</guestfs_aug_save> L</guestfs_aug_set>"
13594 #: ../src/guestfs-availability.pod:21
13599 #: ../src/guestfs-availability.pod:23
13601 "The following functions: L</guestfs_inotify_add_watch> L</"
13602 "guestfs_inotify_close> L</guestfs_inotify_files> L</guestfs_inotify_init> L</"
13603 "guestfs_inotify_read> L</guestfs_inotify_rm_watch>"
13607 #: ../src/guestfs-availability.pod:31
13608 msgid "B<linuxfsuuid>"
13612 #: ../src/guestfs-availability.pod:33
13614 "The following functions: L</guestfs_mke2fs_JU> L</guestfs_mke2journal_U> L</"
13615 "guestfs_mkswap_U> L</guestfs_swapoff_uuid> L</guestfs_swapon_uuid>"
13619 #: ../src/guestfs-availability.pod:40
13620 msgid "B<linuxmodules>"
13624 #: ../src/guestfs-availability.pod:42
13625 msgid "The following functions: L</guestfs_modprobe>"
13629 #: ../src/guestfs-availability.pod:45
13630 msgid "B<linuxxattrs>"
13634 #: ../src/guestfs-availability.pod:47
13636 "The following functions: L</guestfs_getxattrs> L</guestfs_lgetxattrs> L</"
13637 "guestfs_lremovexattr> L</guestfs_lsetxattr> L</guestfs_lxattrlist> L</"
13638 "guestfs_removexattr> L</guestfs_setxattr>"
13642 #: ../src/guestfs-availability.pod:56
13647 #: ../src/guestfs-availability.pod:58
13649 "The following functions: L</guestfs_luks_add_key> L</guestfs_luks_close> L</"
13650 "guestfs_luks_format> L</guestfs_luks_format_cipher> L</"
13651 "guestfs_luks_kill_slot> L</guestfs_luks_open> L</guestfs_luks_open_ro>"
13655 #: ../src/guestfs-availability.pod:67
13660 #: ../src/guestfs-availability.pod:69
13662 "The following functions: L</guestfs_is_lv> L</guestfs_lvcreate> L</"
13663 "guestfs_lvm_remove_all> L</guestfs_lvm_set_filter> L</guestfs_lvremove> L</"
13664 "guestfs_lvresize> L</guestfs_lvresize_free> L</guestfs_lvs> L</"
13665 "guestfs_lvs_full> L</guestfs_pvcreate> L</guestfs_pvremove> L</"
13666 "guestfs_pvresize> L</guestfs_pvresize_size> L</guestfs_pvs> L</"
13667 "guestfs_pvs_full> L</guestfs_vg_activate> L</guestfs_vg_activate_all> L</"
13668 "guestfs_vgcreate> L</guestfs_vgremove> L</guestfs_vgs> L</guestfs_vgs_full>"
13672 #: ../src/guestfs-availability.pod:92
13677 #: ../src/guestfs-availability.pod:94
13679 "The following functions: L</guestfs_mkfifo> L</guestfs_mknod> L</"
13680 "guestfs_mknod_b> L</guestfs_mknod_c>"
13684 #: ../src/guestfs-availability.pod:100
13689 #: ../src/guestfs-availability.pod:102
13690 msgid "The following functions: L</guestfs_ntfs_3g_probe>"
13694 #: ../src/guestfs-availability.pod:105
13695 msgid "B<ntfsprogs>"
13699 #: ../src/guestfs-availability.pod:107
13701 "The following functions: L</guestfs_ntfsresize> L</guestfs_ntfsresize_size>"
13705 #: ../src/guestfs-availability.pod:111
13706 msgid "B<realpath>"
13710 #: ../src/guestfs-availability.pod:113
13711 msgid "The following functions: L</guestfs_realpath>"
13715 #: ../src/guestfs-availability.pod:116
13720 #: ../src/guestfs-availability.pod:118
13722 "The following functions: L</guestfs_scrub_device> L</guestfs_scrub_file> L</"
13723 "guestfs_scrub_freespace>"
13727 #: ../src/guestfs-availability.pod:123
13732 #: ../src/guestfs-availability.pod:125
13733 msgid "The following functions: L</guestfs_getcon> L</guestfs_setcon>"
13737 #: ../src/guestfs-availability.pod:129
13742 #: ../src/guestfs-availability.pod:131
13743 msgid "The following functions: L</guestfs_txz_in> L</guestfs_txz_out>"
13747 #: ../src/guestfs-availability.pod:135
13748 msgid "B<zerofree>"
13752 #: ../src/guestfs-availability.pod:137
13753 msgid "The following functions: L</guestfs_zerofree>"
13757 #: ../src/guestfs-structs.pod:1
13758 msgid "guestfs_int_bool"
13762 #: ../src/guestfs-structs.pod:3
13765 " struct guestfs_int_bool {\n"
13773 #: ../src/guestfs-structs.pod:8
13776 " struct guestfs_int_bool_list {\n"
13777 " uint32_t len; /* Number of elements in list. */\n"
13778 " struct guestfs_int_bool *val; /* Elements. */\n"
13784 #: ../src/guestfs-structs.pod:13
13787 " void guestfs_free_int_bool (struct guestfs_free_int_bool *);\n"
13788 " void guestfs_free_int_bool_list (struct guestfs_free_int_bool_list *);\n"
13793 #: ../src/guestfs-structs.pod:16
13794 msgid "guestfs_lvm_pv"
13798 #: ../src/guestfs-structs.pod:18
13801 " struct guestfs_lvm_pv {\n"
13802 " char *pv_name;\n"
13803 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
13804 " char pv_uuid[32];\n"
13806 " uint64_t pv_size;\n"
13807 " uint64_t dev_size;\n"
13808 " uint64_t pv_free;\n"
13809 " uint64_t pv_used;\n"
13810 " char *pv_attr;\n"
13811 " int64_t pv_pe_count;\n"
13812 " int64_t pv_pe_alloc_count;\n"
13813 " char *pv_tags;\n"
13814 " uint64_t pe_start;\n"
13815 " int64_t pv_mda_count;\n"
13816 " uint64_t pv_mda_free;\n"
13822 #: ../src/guestfs-structs.pod:36
13825 " struct guestfs_lvm_pv_list {\n"
13826 " uint32_t len; /* Number of elements in list. */\n"
13827 " struct guestfs_lvm_pv *val; /* Elements. */\n"
13833 #: ../src/guestfs-structs.pod:41
13836 " void guestfs_free_lvm_pv (struct guestfs_free_lvm_pv *);\n"
13837 " void guestfs_free_lvm_pv_list (struct guestfs_free_lvm_pv_list *);\n"
13842 #: ../src/guestfs-structs.pod:44
13843 msgid "guestfs_lvm_vg"
13847 #: ../src/guestfs-structs.pod:46
13850 " struct guestfs_lvm_vg {\n"
13851 " char *vg_name;\n"
13852 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
13853 " char vg_uuid[32];\n"
13855 " char *vg_attr;\n"
13856 " uint64_t vg_size;\n"
13857 " uint64_t vg_free;\n"
13858 " char *vg_sysid;\n"
13859 " uint64_t vg_extent_size;\n"
13860 " int64_t vg_extent_count;\n"
13861 " int64_t vg_free_count;\n"
13862 " int64_t max_lv;\n"
13863 " int64_t max_pv;\n"
13864 " int64_t pv_count;\n"
13865 " int64_t lv_count;\n"
13866 " int64_t snap_count;\n"
13867 " int64_t vg_seqno;\n"
13868 " char *vg_tags;\n"
13869 " int64_t vg_mda_count;\n"
13870 " uint64_t vg_mda_free;\n"
13876 #: ../src/guestfs-structs.pod:69
13879 " struct guestfs_lvm_vg_list {\n"
13880 " uint32_t len; /* Number of elements in list. */\n"
13881 " struct guestfs_lvm_vg *val; /* Elements. */\n"
13887 #: ../src/guestfs-structs.pod:74
13890 " void guestfs_free_lvm_vg (struct guestfs_free_lvm_vg *);\n"
13891 " void guestfs_free_lvm_vg_list (struct guestfs_free_lvm_vg_list *);\n"
13896 #: ../src/guestfs-structs.pod:77
13897 msgid "guestfs_lvm_lv"
13901 #: ../src/guestfs-structs.pod:79
13904 " struct guestfs_lvm_lv {\n"
13905 " char *lv_name;\n"
13906 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
13907 " char lv_uuid[32];\n"
13908 " char *lv_attr;\n"
13909 " int64_t lv_major;\n"
13910 " int64_t lv_minor;\n"
13911 " int64_t lv_kernel_major;\n"
13912 " int64_t lv_kernel_minor;\n"
13913 " uint64_t lv_size;\n"
13914 " int64_t seg_count;\n"
13916 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
13917 " float snap_percent;\n"
13918 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
13919 " float copy_percent;\n"
13920 " char *move_pv;\n"
13921 " char *lv_tags;\n"
13922 " char *mirror_log;\n"
13923 " char *modules;\n"
13929 #: ../src/guestfs-structs.pod:101
13932 " struct guestfs_lvm_lv_list {\n"
13933 " uint32_t len; /* Number of elements in list. */\n"
13934 " struct guestfs_lvm_lv *val; /* Elements. */\n"
13940 #: ../src/guestfs-structs.pod:106
13943 " void guestfs_free_lvm_lv (struct guestfs_free_lvm_lv *);\n"
13944 " void guestfs_free_lvm_lv_list (struct guestfs_free_lvm_lv_list *);\n"
13949 #: ../src/guestfs-structs.pod:111
13952 " struct guestfs_stat {\n"
13956 " int64_t nlink;\n"
13961 " int64_t blksize;\n"
13962 " int64_t blocks;\n"
13963 " int64_t atime;\n"
13964 " int64_t mtime;\n"
13965 " int64_t ctime;\n"
13971 #: ../src/guestfs-structs.pod:127
13974 " struct guestfs_stat_list {\n"
13975 " uint32_t len; /* Number of elements in list. */\n"
13976 " struct guestfs_stat *val; /* Elements. */\n"
13982 #: ../src/guestfs-structs.pod:132
13985 " void guestfs_free_stat (struct guestfs_free_stat *);\n"
13986 " void guestfs_free_stat_list (struct guestfs_free_stat_list *);\n"
13991 #: ../src/guestfs-structs.pod:137
13994 " struct guestfs_statvfs {\n"
13995 " int64_t bsize;\n"
13996 " int64_t frsize;\n"
13997 " int64_t blocks;\n"
13998 " int64_t bfree;\n"
13999 " int64_t bavail;\n"
14000 " int64_t files;\n"
14001 " int64_t ffree;\n"
14002 " int64_t favail;\n"
14005 " int64_t namemax;\n"
14011 #: ../src/guestfs-structs.pod:151
14014 " struct guestfs_statvfs_list {\n"
14015 " uint32_t len; /* Number of elements in list. */\n"
14016 " struct guestfs_statvfs *val; /* Elements. */\n"
14022 #: ../src/guestfs-structs.pod:156
14025 " void guestfs_free_statvfs (struct guestfs_free_statvfs *);\n"
14026 " void guestfs_free_statvfs_list (struct guestfs_free_statvfs_list *);\n"
14031 #: ../src/guestfs-structs.pod:159
14032 msgid "guestfs_dirent"
14036 #: ../src/guestfs-structs.pod:161
14039 " struct guestfs_dirent {\n"
14048 #: ../src/guestfs-structs.pod:167
14051 " struct guestfs_dirent_list {\n"
14052 " uint32_t len; /* Number of elements in list. */\n"
14053 " struct guestfs_dirent *val; /* Elements. */\n"
14059 #: ../src/guestfs-structs.pod:172
14062 " void guestfs_free_dirent (struct guestfs_free_dirent *);\n"
14063 " void guestfs_free_dirent_list (struct guestfs_free_dirent_list *);\n"
14068 #: ../src/guestfs-structs.pod:177
14071 " struct guestfs_version {\n"
14072 " int64_t major;\n"
14073 " int64_t minor;\n"
14074 " int64_t release;\n"
14081 #: ../src/guestfs-structs.pod:184
14084 " struct guestfs_version_list {\n"
14085 " uint32_t len; /* Number of elements in list. */\n"
14086 " struct guestfs_version *val; /* Elements. */\n"
14092 #: ../src/guestfs-structs.pod:189
14095 " void guestfs_free_version (struct guestfs_free_version *);\n"
14096 " void guestfs_free_version_list (struct guestfs_free_version_list *);\n"
14101 #: ../src/guestfs-structs.pod:192
14102 msgid "guestfs_xattr"
14106 #: ../src/guestfs-structs.pod:194
14109 " struct guestfs_xattr {\n"
14110 " char *attrname;\n"
14111 " /* The next two fields describe a byte array. */\n"
14112 " uint32_t attrval_len;\n"
14113 " char *attrval;\n"
14119 #: ../src/guestfs-structs.pod:201
14122 " struct guestfs_xattr_list {\n"
14123 " uint32_t len; /* Number of elements in list. */\n"
14124 " struct guestfs_xattr *val; /* Elements. */\n"
14130 #: ../src/guestfs-structs.pod:206
14133 " void guestfs_free_xattr (struct guestfs_free_xattr *);\n"
14134 " void guestfs_free_xattr_list (struct guestfs_free_xattr_list *);\n"
14139 #: ../src/guestfs-structs.pod:209
14140 msgid "guestfs_inotify_event"
14144 #: ../src/guestfs-structs.pod:211
14147 " struct guestfs_inotify_event {\n"
14148 " int64_t in_wd;\n"
14149 " uint32_t in_mask;\n"
14150 " uint32_t in_cookie;\n"
14151 " char *in_name;\n"
14157 #: ../src/guestfs-structs.pod:218
14160 " struct guestfs_inotify_event_list {\n"
14161 " uint32_t len; /* Number of elements in list. */\n"
14162 " struct guestfs_inotify_event *val; /* Elements. */\n"
14168 #: ../src/guestfs-structs.pod:223
14171 " void guestfs_free_inotify_event (struct guestfs_free_inotify_event *);\n"
14172 " void guestfs_free_inotify_event_list (struct guestfs_free_inotify_event_list *);\n"
14177 #: ../src/guestfs-structs.pod:226
14178 msgid "guestfs_partition"
14182 #: ../src/guestfs-structs.pod:228
14185 " struct guestfs_partition {\n"
14186 " int32_t part_num;\n"
14187 " uint64_t part_start;\n"
14188 " uint64_t part_end;\n"
14189 " uint64_t part_size;\n"
14195 #: ../src/guestfs-structs.pod:235
14198 " struct guestfs_partition_list {\n"
14199 " uint32_t len; /* Number of elements in list. */\n"
14200 " struct guestfs_partition *val; /* Elements. */\n"
14206 #: ../src/guestfs-structs.pod:240
14209 " void guestfs_free_partition (struct guestfs_free_partition *);\n"
14210 " void guestfs_free_partition_list (struct guestfs_free_partition_list *);\n"
14215 #: ../fish/guestfish.pod:5
14216 msgid "guestfish - the libguestfs Filesystem Interactive SHell"
14220 #: ../fish/guestfish.pod:9
14223 " guestfish [--options] [commands]\n"
14228 #: ../fish/guestfish.pod:11
14236 #: ../fish/guestfish.pod:13
14239 " guestfish -a disk.img\n"
14244 #: ../fish/guestfish.pod:15
14247 " guestfish -a disk.img -m dev[:mountpoint]\n"
14252 #: ../fish/guestfish.pod:17
14255 " guestfish -d libvirt-domain\n"
14260 #: ../fish/guestfish.pod:19
14263 " guestfish -a disk.img -i\n"
14268 #: ../fish/guestfish.pod:21
14271 " guestfish -d libvirt-domain -i\n"
14276 #: ../fish/guestfish.pod:23 ../fuse/guestmount.pod:11 ../tools/virt-edit.pl:45
14277 #: ../tools/virt-rescue.pl:41 ../tools/virt-tar.pl:60
14278 #: ../tools/virt-win-reg.pl:52
14283 #: ../fish/guestfish.pod:25
14285 "Using guestfish in read/write mode on live virtual machines can be "
14286 "dangerous, potentially causing disk corruption. Use the I<--ro> (read-only) "
14287 "option to use guestfish safely if the disk image or virtual machine might be "
14292 #: ../fish/guestfish.pod:30 ../fish/guestfish.pod:729
14293 #: ../fuse/guestmount.pod:35 ../tools/virt-cat.pl:51 ../tools/virt-edit.pl:59
14294 #: ../tools/virt-resize.pl:66 ../tools/virt-tar.pl:46
14299 #: ../fish/guestfish.pod:32
14300 msgid "As an interactive shell"
14304 #: ../fish/guestfish.pod:34
14312 #: ../fish/guestfish.pod:36
14315 " Welcome to guestfish, the libguestfs filesystem interactive shell for\n"
14316 " editing virtual machine filesystems.\n"
14321 #: ../fish/guestfish.pod:39
14324 " Type: 'help' for a list of commands\n"
14325 " 'man' to read the manual\n"
14326 " 'quit' to quit the shell\n"
14331 #: ../fish/guestfish.pod:43
14339 #: ../fish/guestfish.pod:45
14340 msgid "From shell scripts"
14344 #: ../fish/guestfish.pod:47
14345 msgid "Create a new C</etc/motd> file in a guest:"
14349 #: ../fish/guestfish.pod:49
14352 " guestfish <<_EOF_\n"
14355 " mount /dev/vg_guest/lv_root /\n"
14356 " write /etc/motd \"Welcome, new users\"\n"
14362 #: ../fish/guestfish.pod:56
14363 msgid "List the LVM logical volumes in a guest:"
14367 #: ../fish/guestfish.pod:58
14370 " guestfish -a disk.img --ro <<_EOF_\n"
14378 #: ../fish/guestfish.pod:63
14379 msgid "On one command line"
14383 #: ../fish/guestfish.pod:65
14384 msgid "Update C</etc/resolv.conf> in a guest:"
14388 #: ../fish/guestfish.pod:67
14392 " add disk.img : run : mount /dev/vg_guest/lv_root / : \\\n"
14393 " write /etc/resolv.conf \"nameserver 1.2.3.4\"\n"
14398 #: ../fish/guestfish.pod:71
14399 msgid "Edit C</boot/grub/grub.conf> interactively:"
14403 #: ../fish/guestfish.pod:73
14406 " guestfish --add disk.img \\\n"
14407 " --mount /dev/vg_guest/lv_root \\\n"
14408 " --mount /dev/sda1:/boot \\\n"
14409 " edit /boot/grub/grub.conf\n"
14414 #: ../fish/guestfish.pod:78
14415 msgid "Mount disks automatically"
14419 #: ../fish/guestfish.pod:80
14421 "Use the I<-i> option to automatically mount the disks from a virtual machine:"
14425 #: ../fish/guestfish.pod:83
14428 " guestfish --ro -a disk.img -i cat /etc/group\n"
14433 #: ../fish/guestfish.pod:85
14436 " guestfish --ro -d libvirt-domain -i cat /etc/group\n"
14441 #: ../fish/guestfish.pod:87
14442 msgid "As a script interpreter"
14446 #: ../fish/guestfish.pod:89
14447 msgid "Create a 100MB disk containing an ext2-formatted partition:"
14451 #: ../fish/guestfish.pod:91
14454 " #!/usr/bin/guestfish -f\n"
14455 " sparse test1.img 100M\n"
14457 " part-disk /dev/sda mbr\n"
14458 " mkfs ext2 /dev/sda1\n"
14463 #: ../fish/guestfish.pod:97
14464 msgid "Start with a prepared disk"
14468 #: ../fish/guestfish.pod:99
14470 "An alternate way to create a 100MB disk called C<test1.img> containing a "
14471 "single ext2-formatted partition:"
14475 #: ../fish/guestfish.pod:102
14478 " guestfish -N fs\n"
14483 #: ../fish/guestfish.pod:104
14484 msgid "To list what is available do:"
14488 #: ../fish/guestfish.pod:106 ../fish/guestfish.pod:720
14491 " guestfish -N list | less\n"
14496 #: ../fish/guestfish.pod:108
14497 msgid "Remote control"
14501 #: ../fish/guestfish.pod:110
14504 " eval `guestfish --listen --ro`\n"
14505 " guestfish --remote add disk.img\n"
14506 " guestfish --remote run\n"
14507 " guestfish --remote lvs\n"
14512 #: ../fish/guestfish.pod:117
14514 "Guestfish is a shell and command-line tool for examining and modifying "
14515 "virtual machine filesystems. It uses libguestfs and exposes all of the "
14516 "functionality of the guestfs API, see L<guestfs(3)>."
14520 #: ../fish/guestfish.pod:121
14522 "Guestfish gives you structured access to the libguestfs API, from shell "
14523 "scripts or the command line or interactively. If you want to rescue a "
14524 "broken virtual machine image, you should look at the L<virt-rescue(1)> "
14529 #: ../fish/guestfish.pod:126 ../test-tool/libguestfs-test-tool.pod:37
14530 #: ../fuse/guestmount.pod:70 ../inspector/virt-inspector.pl:75
14531 #: ../tools/virt-cat.pl:80 ../tools/virt-df.pl:71 ../tools/virt-edit.pl:73
14532 #: ../tools/virt-list-filesystems.pl:50 ../tools/virt-list-partitions.pl:51
14533 #: ../tools/virt-ls.pl:79 ../tools/virt-make-fs.pl:153
14534 #: ../tools/virt-rescue.pl:103 ../tools/virt-resize.pl:233
14535 #: ../tools/virt-tar.pl:99 ../tools/virt-win-reg.pl:172
14540 #: ../fish/guestfish.pod:130 ../fuse/guestmount.pod:94
14541 #: ../inspector/virt-inspector.pl:83 ../tools/virt-cat.pl:88
14542 #: ../tools/virt-df.pl:79 ../tools/virt-edit.pl:81
14543 #: ../tools/virt-list-filesystems.pl:58 ../tools/virt-list-partitions.pl:59
14544 #: ../tools/virt-ls.pl:87 ../tools/virt-make-fs.pl:161
14545 #: ../tools/virt-rescue.pl:111 ../tools/virt-resize.pl:241
14546 #: ../tools/virt-tar.pl:107 ../tools/virt-win-reg.pl:180
14551 #: ../fish/guestfish.pod:132
14552 msgid "Displays general help on options."
14556 #: ../fish/guestfish.pod:134
14557 msgid "B<-h> | B<--cmd-help>"
14561 #: ../fish/guestfish.pod:136
14562 msgid "Lists all available guestfish commands."
14566 #: ../fish/guestfish.pod:138
14567 msgid "B<-h cmd> | B<--cmd-help cmd>"
14571 #: ../fish/guestfish.pod:140
14572 msgid "Displays detailed help on a single command C<cmd>."
14576 #: ../fish/guestfish.pod:142 ../fuse/guestmount.pod:74
14577 msgid "B<-a image> | B<--add image>"
14581 #: ../fish/guestfish.pod:144
14582 msgid "Add a block device or virtual machine image to the shell."
14586 #: ../fish/guestfish.pod:146
14587 msgid "B<-c URI> | B<--connect URI>"
14591 #: ../fish/guestfish.pod:148
14593 "When used in conjunction with the I<-d> option, this specifies the libvirt "
14594 "URI to use. The default is to use the default libvirt connection."
14598 #: ../fish/guestfish.pod:152
14599 msgid "B<-d libvirt-domain> | B<--domain libvirt-domain>"
14603 #: ../fish/guestfish.pod:154
14605 "Add disks from the named libvirt domain. If the I<--ro> option is also "
14606 "used, then any libvirt domain can be used. However in write mode, only "
14607 "libvirt domains which are shut down can be named here."
14611 #: ../fish/guestfish.pod:158
14612 msgid "B<-D> | B<--no-dest-paths>"
14616 #: ../fish/guestfish.pod:160
14618 "Don't tab-complete paths on the guest filesystem. It is useful to be able "
14619 "to hit the tab key to complete paths on the guest filesystem, but this "
14620 "causes extra \"hidden\" guestfs calls to be made, so this option is here to "
14621 "allow this feature to be disabled."
14625 #: ../fish/guestfish.pod:165
14626 msgid "B<-f file> | B<--file file>"
14630 #: ../fish/guestfish.pod:167
14631 msgid "Read commands from C<file>. To write pure guestfish scripts, use:"
14635 #: ../fish/guestfish.pod:170
14638 " #!/usr/bin/guestfish -f\n"
14643 #: ../fish/guestfish.pod:172
14644 msgid "B<-i> | B<--inspector>"
14648 #: ../fish/guestfish.pod:174
14650 "Using L<virt-inspector(1)> code, inspect the disks looking for an operating "
14651 "system and mount filesystems as they would be mounted on the real virtual "
14656 #: ../fish/guestfish.pod:178
14657 msgid "Typical usage is either:"
14661 #: ../fish/guestfish.pod:180
14664 " guestfish -d myguest -i\n"
14669 #: ../fish/guestfish.pod:182
14670 msgid "(for an inactive libvirt domain called I<myguest>), or:"
14674 #: ../fish/guestfish.pod:184
14677 " guestfish --ro -d myguest -i\n"
14682 #: ../fish/guestfish.pod:186
14683 msgid "(for active domains, readonly), or specify the block device directly:"
14687 #: ../fish/guestfish.pod:188
14690 " guestfish -a /dev/Guests/MyGuest -i\n"
14695 #: ../fish/guestfish.pod:190
14697 "Note that the command line syntax changed slightly over older versions of "
14698 "guestfish. You can still use the old syntax:"
14702 #: ../fish/guestfish.pod:193
14705 " guestfish [--ro] -i disk.img\n"
14710 #: ../fish/guestfish.pod:195
14713 " guestfish [--ro] -i libvirt-domain\n"
14718 #: ../fish/guestfish.pod:197
14719 msgid "B<--keys-from-stdin>"
14723 #: ../fish/guestfish.pod:199
14725 "Read key or passphrase parameters from stdin. The default is to try to read "
14726 "passphrases from the user by opening C</dev/tty>."
14730 #: ../fish/guestfish.pod:202
14731 msgid "B<--listen>"
14735 #: ../fish/guestfish.pod:204
14737 "Fork into the background and listen for remote commands. See section L</"
14738 "REMOTE CONTROL GUESTFISH OVER A SOCKET> below."
14742 #: ../fish/guestfish.pod:207
14743 msgid "B<-m dev[:mountpoint]> | B<--mount dev[:mountpoint]>"
14747 #: ../fish/guestfish.pod:209
14748 msgid "Mount the named partition or logical volume on the given mountpoint."
14752 #: ../fish/guestfish.pod:211
14753 msgid "If the mountpoint is omitted, it defaults to C</>."
14757 #: ../fish/guestfish.pod:213
14758 msgid "You have to mount something on C</> before most commands will work."
14762 #: ../fish/guestfish.pod:215
14764 "If any I<-m> or I<--mount> options are given, the guest is automatically "
14769 #: ../fish/guestfish.pod:218
14771 "If you don't know what filesystems a disk image contains, you can either run "
14772 "guestfish without this option, then list the partitions and LVs available "
14773 "(see L</list-partitions> and L</lvs> commands), or you can use the L<virt-"
14774 "list-filesystems(1)> program."
14778 #: ../fish/guestfish.pod:223 ../fuse/guestmount.pod:106
14779 msgid "B<-n> | B<--no-sync>"
14783 #: ../fish/guestfish.pod:225
14785 "Disable autosync. This is enabled by default. See the discussion of "
14786 "autosync in the L<guestfs(3)> manpage."
14790 #: ../fish/guestfish.pod:228
14791 msgid "B<-N type> | B<--new type> | B<-N list>"
14795 #: ../fish/guestfish.pod:230
14797 "Prepare a fresh disk image formatted as \"type\". This is an alternative to "
14798 "the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a "
14799 "preformatted disk with a filesystem and adds it. See L</PREPARED DISK "
14804 #: ../fish/guestfish.pod:235
14805 msgid "B<--progress-bars>"
14809 #: ../fish/guestfish.pod:237
14810 msgid "Enable progress bars, even when guestfish is used non-interactively."
14814 #: ../fish/guestfish.pod:239
14816 "Progress bars are enabled by default when guestfish is used as an "
14817 "interactive shell."
14821 #: ../fish/guestfish.pod:242
14822 msgid "B<--no-progress-bars>"
14826 #: ../fish/guestfish.pod:244
14827 msgid "Disable progress bars."
14831 #: ../fish/guestfish.pod:246
14832 msgid "B<--remote[=pid]>"
14836 #: ../fish/guestfish.pod:248
14838 "Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section L</REMOTE "
14839 "CONTROL GUESTFISH OVER A SOCKET> below."
14843 #: ../fish/guestfish.pod:251 ../fuse/guestmount.pod:148
14844 msgid "B<-r> | B<--ro>"
14848 #: ../fish/guestfish.pod:253
14850 "This changes the I<-a> and I<-m> options so that disks are added and mounts "
14851 "are done read-only (see L<guestfs(3)/guestfs_mount_ro>)."
14855 #: ../fish/guestfish.pod:256 ../tools/virt-rescue.pl:162
14857 "The option must always be used if the disk image or virtual machine might be "
14858 "running, and is generally recommended in cases where you don't need write "
14859 "access to the disk."
14863 #: ../fish/guestfish.pod:260
14865 "Note that prepared disk images created with I<-N> are not affected by the "
14870 #: ../fish/guestfish.pod:263 ../fuse/guestmount.pod:158
14871 #: ../tools/virt-rescue.pl:170
14872 msgid "B<--selinux>"
14876 #: ../fish/guestfish.pod:265
14877 msgid "Enable SELinux support for the guest. See L<guestfs(3)/SELINUX>."
14881 #: ../fish/guestfish.pod:267 ../fuse/guestmount.pod:168
14882 msgid "B<-v> | B<--verbose>"
14886 #: ../fish/guestfish.pod:269
14888 "Enable very verbose messages. This is particularly useful if you find a bug."
14892 #: ../fish/guestfish.pod:272 ../fuse/guestmount.pod:172
14893 msgid "B<-V> | B<--version>"
14897 #: ../fish/guestfish.pod:274
14898 msgid "Display the guestfish / libguestfs version number and exit."
14902 #: ../fish/guestfish.pod:276
14907 #: ../fish/guestfish.pod:278
14908 msgid "Echo each command before executing it."
14912 #: ../fish/guestfish.pod:282
14913 msgid "COMMANDS ON COMMAND LINE"
14917 #: ../fish/guestfish.pod:284
14919 "Any additional (non-option) arguments are treated as commands to execute."
14923 #: ../fish/guestfish.pod:287
14925 "Commands to execute should be separated by a colon (C<:>), where the colon "
14926 "is a separate parameter. Thus:"
14930 #: ../fish/guestfish.pod:290
14933 " guestfish cmd [args...] : cmd [args...] : cmd [args...] ...\n"
14938 #: ../fish/guestfish.pod:292
14940 "If there are no additional arguments, then we enter a shell, either an "
14941 "interactive shell with a prompt (if the input is a terminal) or a non-"
14942 "interactive shell."
14946 #: ../fish/guestfish.pod:296
14948 "In either command line mode or non-interactive shell, the first command that "
14949 "gives an error causes the whole shell to exit. In interactive mode (with a "
14950 "prompt) if a command fails, you can continue to enter commands."
14954 #: ../fish/guestfish.pod:301
14955 msgid "USING launch (OR run)"
14959 #: ../fish/guestfish.pod:303
14961 "As with L<guestfs(3)>, you must first configure your guest by adding disks, "
14962 "then launch it, then mount any disks you need, and finally issue actions/"
14963 "commands. So the general order of the day is:"
14967 #: ../fish/guestfish.pod:311
14968 msgid "add or -a/--add"
14972 #: ../fish/guestfish.pod:315
14973 msgid "launch (aka run)"
14977 #: ../fish/guestfish.pod:319
14978 msgid "mount or -m/--mount"
14982 #: ../fish/guestfish.pod:323
14983 msgid "any other commands"
14987 #: ../fish/guestfish.pod:327
14989 "C<run> is a synonym for C<launch>. You must C<launch> (or C<run>) your "
14990 "guest before mounting or performing any other commands."
14994 #: ../fish/guestfish.pod:330
14996 "The only exception is that if the I<-m> or I<--mount> option was given, the "
14997 "guest is automatically run for you (simply because guestfish can't mount the "
14998 "disks you asked for without doing this)."
15002 #: ../fish/guestfish.pod:334
15007 #: ../fish/guestfish.pod:336
15009 "You can quote ordinary parameters using either single or double quotes. For "
15014 #: ../fish/guestfish.pod:339
15017 " add \"file with a space.img\"\n"
15022 #: ../fish/guestfish.pod:341
15025 " rm '/file name'\n"
15030 #: ../fish/guestfish.pod:343
15038 #: ../fish/guestfish.pod:345
15040 "A few commands require a list of strings to be passed. For these, use a "
15041 "whitespace-separated list, enclosed in quotes. Strings containing "
15042 "whitespace to be passed through must be enclosed in single quotes. A "
15043 "literal single quote must be escaped with a backslash."
15047 #: ../fish/guestfish.pod:350
15050 " vgcreate VG \"/dev/sda1 /dev/sdb1\"\n"
15051 " command \"/bin/echo 'foo bar'\"\n"
15052 " command \"/bin/echo \\'foo\\'\"\n"
15057 #: ../fish/guestfish.pod:354
15062 #: ../fish/guestfish.pod:356
15064 "This section applies to all commands which can take integers as parameters."
15068 #: ../fish/guestfish.pod:359
15069 msgid "SIZE SUFFIX"
15073 #: ../fish/guestfish.pod:361
15075 "When the command takes a parameter measured in bytes, you can use one of the "
15076 "following suffixes to specify kilobytes, megabytes and larger sizes:"
15080 #: ../fish/guestfish.pod:367
15081 msgid "B<k> or B<K> or B<KiB>"
15085 #: ../fish/guestfish.pod:369
15086 msgid "The size in kilobytes (multiplied by 1024)."
15090 #: ../fish/guestfish.pod:371
15095 #: ../fish/guestfish.pod:373
15096 msgid "The size in SI 1000 byte units."
15100 #: ../fish/guestfish.pod:375
15101 msgid "B<M> or B<MiB>"
15105 #: ../fish/guestfish.pod:377
15106 msgid "The size in megabytes (multiplied by 1048576)."
15110 #: ../fish/guestfish.pod:379
15115 #: ../fish/guestfish.pod:381
15116 msgid "The size in SI 1000000 byte units."
15120 #: ../fish/guestfish.pod:383
15121 msgid "B<G> or B<GiB>"
15125 #: ../fish/guestfish.pod:385
15126 msgid "The size in gigabytes (multiplied by 2**30)."
15130 #: ../fish/guestfish.pod:387
15135 #: ../fish/guestfish.pod:389
15136 msgid "The size in SI 10**9 byte units."
15140 #: ../fish/guestfish.pod:391
15141 msgid "B<T> or B<TiB>"
15145 #: ../fish/guestfish.pod:393
15146 msgid "The size in terabytes (multiplied by 2**40)."
15150 #: ../fish/guestfish.pod:395
15155 #: ../fish/guestfish.pod:397
15156 msgid "The size in SI 10**12 byte units."
15160 #: ../fish/guestfish.pod:399
15161 msgid "B<P> or B<PiB>"
15165 #: ../fish/guestfish.pod:401
15166 msgid "The size in petabytes (multiplied by 2**50)."
15170 #: ../fish/guestfish.pod:403
15175 #: ../fish/guestfish.pod:405
15176 msgid "The size in SI 10**15 byte units."
15180 #: ../fish/guestfish.pod:407
15181 msgid "B<E> or B<EiB>"
15185 #: ../fish/guestfish.pod:409
15186 msgid "The size in exabytes (multiplied by 2**60)."
15190 #: ../fish/guestfish.pod:411
15195 #: ../fish/guestfish.pod:413
15196 msgid "The size in SI 10**18 byte units."
15200 #: ../fish/guestfish.pod:415
15201 msgid "B<Z> or B<ZiB>"
15205 #: ../fish/guestfish.pod:417
15206 msgid "The size in zettabytes (multiplied by 2**70)."
15210 #: ../fish/guestfish.pod:419
15215 #: ../fish/guestfish.pod:421
15216 msgid "The size in SI 10**21 byte units."
15220 #: ../fish/guestfish.pod:423
15221 msgid "B<Y> or B<YiB>"
15225 #: ../fish/guestfish.pod:425
15226 msgid "The size in yottabytes (multiplied by 2**80)."
15230 #: ../fish/guestfish.pod:427
15235 #: ../fish/guestfish.pod:429
15236 msgid "The size in SI 10**24 byte units."
15240 #: ../fish/guestfish.pod:433
15241 msgid "For example:"
15245 #: ../fish/guestfish.pod:435
15248 " truncate-size /file 1G\n"
15253 #: ../fish/guestfish.pod:437
15254 msgid "would truncate the file to 1 gigabyte."
15258 #: ../fish/guestfish.pod:439
15260 "Be careful because a few commands take sizes in kilobytes or megabytes (eg. "
15261 "the parameter to L</memsize> is specified in megabytes already). Adding a "
15262 "suffix will probably not do what you expect."
15266 #: ../fish/guestfish.pod:443
15267 msgid "OCTAL AND HEXADECIMAL NUMBERS"
15271 #: ../fish/guestfish.pod:445
15273 "For specifying the radix (base) use the C convention: C<0> to prefix an "
15274 "octal number or C<0x> to prefix a hexadecimal number. For example:"
15278 #: ../fish/guestfish.pod:448
15281 " 1234 decimal number 1234\n"
15282 " 02322 octal number, equivalent to decimal 1234\n"
15283 " 0x4d2 hexadecimal number, equivalent to decimal 1234\n"
15288 #: ../fish/guestfish.pod:452
15290 "When using the C<chmod> command, you almost always want to specify an octal "
15291 "number for the mode, and you must prefix it with C<0> (unlike the Unix "
15292 "L<chmod(1)> program):"
15296 #: ../fish/guestfish.pod:456
15299 " chmod 0777 /public # OK\n"
15300 " chmod 777 /public # WRONG! This is mode 777 decimal = 01411 octal.\n"
15305 #: ../fish/guestfish.pod:459
15307 "Commands that return numbers usually print them in decimal, but some "
15308 "commands print numbers in other radices (eg. C<umask> prints the mode in "
15309 "octal, preceeded by C<0>)."
15313 #: ../fish/guestfish.pod:463
15314 msgid "WILDCARDS AND GLOBBING"
15318 #: ../fish/guestfish.pod:465
15320 "Neither guestfish nor the underlying guestfs API performs wildcard expansion "
15321 "(globbing) by default. So for example the following will not do what you "
15326 #: ../fish/guestfish.pod:469
15334 #: ../fish/guestfish.pod:471
15336 "Assuming you don't have a directory literally called C</home/*> then the "
15337 "above command will return an error."
15341 #: ../fish/guestfish.pod:474
15342 msgid "To perform wildcard expansion, use the C<glob> command."
15346 #: ../fish/guestfish.pod:476
15349 " glob rm-rf /home/*\n"
15354 #: ../fish/guestfish.pod:478
15356 "runs C<rm-rf> on each path that matches (ie. potentially running the command "
15357 "many times), equivalent to:"
15361 #: ../fish/guestfish.pod:481
15364 " rm-rf /home/jim\n"
15365 " rm-rf /home/joe\n"
15366 " rm-rf /home/mary\n"
15371 #: ../fish/guestfish.pod:485
15372 msgid "C<glob> only works on simple guest paths and not on device names."
15376 #: ../fish/guestfish.pod:487
15378 "If you have several parameters, each containing a wildcard, then glob will "
15379 "perform a cartesian product."
15383 #: ../fish/guestfish.pod:490
15388 #: ../fish/guestfish.pod:492
15390 "Any line which starts with a I<#> character is treated as a comment and "
15391 "ignored. The I<#> can optionally be preceeded by whitespace, but B<not> by "
15392 "a command. For example:"
15396 #: ../fish/guestfish.pod:496
15399 " # this is a comment\n"
15400 " # this is a comment\n"
15401 " foo # NOT a comment\n"
15406 #: ../fish/guestfish.pod:500
15407 msgid "Blank lines are also ignored."
15411 #: ../fish/guestfish.pod:502
15412 msgid "RUNNING COMMANDS LOCALLY"
15416 #: ../fish/guestfish.pod:504
15418 "Any line which starts with a I<!> character is treated as a command sent to "
15419 "the local shell (C</bin/sh> or whatever L<system(3)> uses). For example:"
15423 #: ../fish/guestfish.pod:508
15427 " tgz-out /remote local/remote-data.tar.gz\n"
15432 #: ../fish/guestfish.pod:511
15434 "will create a directory C<local> on the host, and then export the contents "
15435 "of C</remote> on the mounted filesystem to C<local/remote-data.tar.gz>. "
15436 "(See C<tgz-out>)."
15440 #: ../fish/guestfish.pod:515
15442 "To change the local directory, use the C<lcd> command. C<!cd> will have no "
15443 "effect, due to the way that subprocesses work in Unix."
15447 #: ../fish/guestfish.pod:518
15452 #: ../fish/guestfish.pod:520
15454 "Use C<command E<lt>spaceE<gt> | command> to pipe the output of the first "
15455 "command (a guestfish command) to the second command (any host command). For "
15460 #: ../fish/guestfish.pod:524
15463 " cat /etc/passwd | awk -F: '$3 == 0 { print }'\n"
15468 #: ../fish/guestfish.pod:526
15470 "(where C<cat> is the guestfish cat command, but C<awk> is the host awk "
15471 "program). The above command would list all accounts in the guest filesystem "
15472 "which have UID 0, ie. root accounts including backdoors. Other examples:"
15476 #: ../fish/guestfish.pod:531
15479 " hexdump /bin/ls | head\n"
15480 " list-devices | tail -1\n"
15481 " tgz-out / - | tar ztf -\n"
15486 #: ../fish/guestfish.pod:535
15488 "The space before the pipe symbol is required, any space after the pipe "
15489 "symbol is optional. Everything after the pipe symbol is just passed "
15490 "straight to the host shell, so it can contain redirections, globs and "
15491 "anything else that makes sense on the host side."
15495 #: ../fish/guestfish.pod:540
15497 "To use a literal argument which begins with a pipe symbol, you have to quote "
15502 #: ../fish/guestfish.pod:543
15510 #: ../fish/guestfish.pod:545
15511 msgid "HOME DIRECTORIES"
15515 #: ../fish/guestfish.pod:547
15517 "If a parameter starts with the character C<~> then the tilde may be expanded "
15518 "as a home directory path (either C<~> for the current user's home directory, "
15519 "or C<~user> for another user)."
15523 #: ../fish/guestfish.pod:551
15525 "Note that home directory expansion happens for users known I<on the host>, "
15526 "not in the guest filesystem."
15530 #: ../fish/guestfish.pod:554
15532 "To use a literal argument which begins with a tilde, you have to quote it, "
15537 #: ../fish/guestfish.pod:557
15545 #: ../fish/guestfish.pod:561
15547 "Libguestfs has some support for Linux guests encrypted according to the "
15548 "Linux Unified Key Setup (LUKS) standard, which includes nearly all whole "
15549 "disk encryption systems used by modern Linux guests. Currently only LVM-on-"
15550 "LUKS is supported."
15554 #: ../fish/guestfish.pod:566
15555 msgid "Identify encrypted block devices and partitions using L</vfs-type>:"
15559 #: ../fish/guestfish.pod:568
15562 " ><fs> vfs-type /dev/sda2\n"
15568 #: ../fish/guestfish.pod:571
15570 "Then open those devices using L</luks-open>. This creates a device-mapper "
15571 "device called C</dev/mapper/luksdev>."
15575 #: ../fish/guestfish.pod:574
15578 " ><fs> luks-open /dev/sda2 luksdev\n"
15579 " Enter key or passphrase (\"key\"): <enter the passphrase>\n"
15584 #: ../fish/guestfish.pod:577
15586 "Finally you have to tell LVM to scan for volume groups on the newly created "
15591 #: ../fish/guestfish.pod:580
15595 " ><fs> vg-activate-all true\n"
15600 #: ../fish/guestfish.pod:583
15601 msgid "The logical volume(s) can now be mounted in the usual way."
15605 #: ../fish/guestfish.pod:585
15607 "Before closing a LUKS device you must unmount any logical volumes on it and "
15608 "deactivate the volume groups by calling C<vg-activate false VG> on each "
15609 "one. Then you can close the mapper device:"
15613 #: ../fish/guestfish.pod:589
15616 " ><fs> vg-activate false /dev/VG\n"
15617 " ><fs> luks-close /dev/mapper/luksdev\n"
15622 #: ../fish/guestfish.pod:592
15623 msgid "WINDOWS PATHS"
15627 #: ../fish/guestfish.pod:594
15629 "If a path is prefixed with C<win:> then you can use Windows-style paths "
15630 "(with some limitations). The following commands are equivalent:"
15634 #: ../fish/guestfish.pod:597
15637 " file /WINDOWS/system32/config/system.LOG\n"
15642 #: ../fish/guestfish.pod:599
15645 " file win:/windows/system32/config/system.log\n"
15650 #: ../fish/guestfish.pod:601
15653 " file win:\\windows\\system32\\config\\system.log\n"
15658 #: ../fish/guestfish.pod:603
15661 " file WIN:C:\\Windows\\SYSTEM32\\conFIG\\SYSTEM.LOG\n"
15666 #: ../fish/guestfish.pod:605
15668 "This syntax implicitly calls C<case-sensitive-path> (q.v.) so it also "
15669 "handles case insensitivity like Windows would. This only works in argument "
15670 "positions that expect a path."
15674 #: ../fish/guestfish.pod:609
15675 msgid "UPLOADING AND DOWNLOADING FILES"
15679 #: ../fish/guestfish.pod:611
15681 "For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and "
15682 "others which upload from or download to a local file, you can use the "
15683 "special filename C<-> to mean \"from stdin\" or \"to stdout\". For example:"
15687 #: ../fish/guestfish.pod:615
15695 #: ../fish/guestfish.pod:617
15697 "reads stdin and creates from that a file C</foo> in the disk image, and:"
15701 #: ../fish/guestfish.pod:620
15704 " tar-out /etc - | tar tf -\n"
15709 #: ../fish/guestfish.pod:622
15711 "writes the tarball to stdout and then pipes that into the external \"tar\" "
15712 "command (see L</PIPES>)."
15716 #: ../fish/guestfish.pod:625
15718 "When using C<-> to read from stdin, the input is read up to the end of "
15719 "stdin. You can also use a special \"heredoc\"-like syntax to read up to "
15720 "some arbitrary end marker:"
15724 #: ../fish/guestfish.pod:629
15727 " upload -<<END /foo\n"
15736 #: ../fish/guestfish.pod:635
15738 "Any string of characters can be used instead of C<END>. The end marker must "
15739 "appear on a line of its own, without any preceeding or following characters "
15740 "(not even spaces)."
15744 #: ../fish/guestfish.pod:639
15746 "Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to "
15747 "upload local files (so-called \"FileIn\" parameters in the generator)."
15751 #: ../fish/guestfish.pod:642
15752 msgid "EXIT ON ERROR BEHAVIOUR"
15756 #: ../fish/guestfish.pod:644
15758 "By default, guestfish will ignore any errors when in interactive mode (ie. "
15759 "taking commands from a human over a tty), and will exit on the first error "
15760 "in non-interactive mode (scripts, commands given on the command line)."
15764 #: ../fish/guestfish.pod:649
15766 "If you prefix a command with a I<-> character, then that command will not "
15767 "cause guestfish to exit, even if that (one) command returns an error."
15771 #: ../fish/guestfish.pod:653
15772 msgid "REMOTE CONTROL GUESTFISH OVER A SOCKET"
15776 #: ../fish/guestfish.pod:655
15778 "Guestfish can be remote-controlled over a socket. This is useful "
15779 "particularly in shell scripts where you want to make several different "
15780 "changes to a filesystem, but you don't want the overhead of starting up a "
15781 "guestfish process each time."
15785 #: ../fish/guestfish.pod:660
15786 msgid "Start a guestfish server process using:"
15790 #: ../fish/guestfish.pod:662
15793 " eval `guestfish --listen`\n"
15798 #: ../fish/guestfish.pod:664
15799 msgid "and then send it commands by doing:"
15803 #: ../fish/guestfish.pod:666
15806 " guestfish --remote cmd [...]\n"
15811 #: ../fish/guestfish.pod:668
15812 msgid "To cause the server to exit, send it the exit command:"
15816 #: ../fish/guestfish.pod:670
15819 " guestfish --remote exit\n"
15824 #: ../fish/guestfish.pod:672
15826 "Note that the server will normally exit if there is an error in a command. "
15827 "You can change this in the usual way. See section L</EXIT ON ERROR "
15832 #: ../fish/guestfish.pod:676
15833 msgid "CONTROLLING MULTIPLE GUESTFISH PROCESSES"
15837 #: ../fish/guestfish.pod:678
15839 "The C<eval> statement sets the environment variable C<$GUESTFISH_PID>, which "
15840 "is how the I<--remote> option knows where to send the commands. You can "
15841 "have several guestfish listener processes running using:"
15845 #: ../fish/guestfish.pod:682
15848 " eval `guestfish --listen`\n"
15849 " pid1=$GUESTFISH_PID\n"
15850 " eval `guestfish --listen`\n"
15851 " pid2=$GUESTFISH_PID\n"
15853 " guestfish --remote=$pid1 cmd\n"
15854 " guestfish --remote=$pid2 cmd\n"
15859 #: ../fish/guestfish.pod:690
15860 msgid "REMOTE CONTROL DETAILS"
15864 #: ../fish/guestfish.pod:692
15866 "Remote control happens over a Unix domain socket called C</tmp/.guestfish-"
15867 "$UID/socket-$PID>, where C<$UID> is the effective user ID of the process, "
15868 "and C<$PID> is the process ID of the server."
15872 #: ../fish/guestfish.pod:696
15873 msgid "Guestfish client and server versions must match exactly."
15877 #: ../fish/guestfish.pod:698
15878 msgid "PREPARED DISK IMAGES"
15882 #: ../fish/guestfish.pod:700
15884 "Use the I<-N type> or I<--new type> parameter to select one of a set of "
15885 "preformatted disk images that guestfish can make for you to save typing. "
15886 "This is particularly useful for testing purposes. This option is used "
15887 "instead of the I<-a> option, and like I<-a> can appear multiple times (and "
15888 "can be mixed with I<-a>)."
15892 #: ../fish/guestfish.pod:706
15894 "The new disk is called C<test1.img> for the first I<-N>, C<test2.img> for "
15895 "the second and so on. Existing files in the current directory are "
15900 #: ../fish/guestfish.pod:710
15902 "The type briefly describes how the disk should be sized, partitioned, how "
15903 "filesystem(s) should be created, and how content should be added. "
15904 "Optionally the type can be followed by extra parameters, separated by C<:> "
15905 "(colon) characters. For example, I<-N fs> creates a default 100MB, sparsely-"
15906 "allocated disk, containing a single partition, with the partition formatted "
15907 "as ext2. I<-N fs:ext4:1G> is the same, but for an ext4 filesystem on a 1GB "
15912 #: ../fish/guestfish.pod:718
15913 msgid "To list the available types and any extra parameters they take, run:"
15917 #: ../fish/guestfish.pod:722
15919 "Note that the prepared filesystem is not mounted. You would usually have to "
15920 "use the C<mount /dev/sda1 /> command or add the I<-m /dev/sda1> option."
15924 #: ../fish/guestfish.pod:726
15926 "If any I<-N> or I<--new> options are given, the guest is automatically "
15931 #: ../fish/guestfish.pod:731
15932 msgid "Create a 100MB disk with an ext4-formatted partition:"
15936 #: ../fish/guestfish.pod:733
15939 " guestfish -N fs:ext4\n"
15944 #: ../fish/guestfish.pod:735
15945 msgid "Create a 32MB disk with a VFAT-formatted partition, and mount it:"
15949 #: ../fish/guestfish.pod:737
15952 " guestfish -N fs:vfat:32M -m /dev/sda1\n"
15957 #: ../fish/guestfish.pod:739
15958 msgid "Create a blank 200MB disk:"
15962 #: ../fish/guestfish.pod:741
15965 " guestfish -N disk:200M\n"
15970 #: ../fish/guestfish.pod:743
15971 msgid "PROGRESS BARS"
15975 #: ../fish/guestfish.pod:745
15977 "Some (not all) long-running commands send progress notification messages as "
15978 "they are running. Guestfish turns these messages into progress bars."
15982 #: ../fish/guestfish.pod:749
15984 "When a command that supports progress bars takes longer than two seconds to "
15985 "run, and if progress bars are enabled, then you will see one appearing below "
15990 #: ../fish/guestfish.pod:753
15993 " ><fs> copy-size /large-file /another-file 2048M\n"
15994 " / 10% [#####-----------------------------------------] 00:30\n"
15999 #: ../fish/guestfish.pod:756
16001 "The spinner on the left hand side moves round once for every progress "
16002 "notification received from the backend. This is a (reasonably) golden "
16003 "assurance that the command is \"doing something\" even if the progress bar "
16004 "is not moving, because the command is able to send the progress "
16005 "notifications. When the bar reaches 100% and the command finishes, the "
16006 "spinner disappears."
16010 #: ../fish/guestfish.pod:763
16012 "Progress bars are enabled by default when guestfish is used interactively. "
16013 "You can enable them even for non-interactive modes using I<--progress-bars>, "
16014 "and you can disable them completely using I<--no-progress-bars>."
16018 #: ../fish/guestfish.pod:768
16019 msgid "GUESTFISH COMMANDS"
16023 #: ../fish/guestfish.pod:770
16025 "The commands in this section are guestfish convenience commands, in other "
16026 "words, they are not part of the L<guestfs(3)> API."
16030 #: ../fish/guestfish.pod:773
16031 msgid "alloc | allocate"
16035 #: ../fish/guestfish.pod:775
16038 " alloc filename size\n"
16043 #: ../fish/guestfish.pod:777
16045 "This creates an empty (zeroed) file of the given size, and then adds so it "
16046 "can be further examined."
16050 #: ../fish/guestfish.pod:780 ../fish/guestfish.pod:875
16051 msgid "For more advanced image creation, see L<qemu-img(1)> utility."
16055 #: ../fish/guestfish.pod:782 ../fish/guestfish.pod:877
16056 msgid "Size can be specified using standard suffixes, eg. C<1M>."
16060 #: ../fish/guestfish.pod:784
16065 #: ../fish/guestfish.pod:786
16068 " echo [params ...]\n"
16073 #: ../fish/guestfish.pod:788
16074 msgid "This echos the parameters to the terminal."
16078 #: ../fish/guestfish.pod:790
16079 msgid "edit | vi | emacs"
16083 #: ../fish/guestfish.pod:792
16091 #: ../fish/guestfish.pod:794
16093 "This is used to edit a file. It downloads the file, edits it locally using "
16094 "your editor, then uploads the result."
16098 #: ../fish/guestfish.pod:797
16100 "The editor is C<$EDITOR>. However if you use the alternate commands C<vi> "
16101 "or C<emacs> you will get those corresponding editors."
16105 #: ../fish/guestfish.pod:801 ../fish/guestfish.pod:847
16107 "NOTE: This will not work reliably for large files (> 2 MB) or binary files "
16108 "containing \\0 bytes."
16112 #: ../fish/guestfish.pod:804
16117 #: ../fish/guestfish.pod:806
16120 " glob command args...\n"
16125 #: ../fish/guestfish.pod:808
16127 "Expand wildcards in any paths in the args list, and run C<command> "
16128 "repeatedly on each matching path."
16132 #: ../fish/guestfish.pod:811
16133 msgid "See section WILDCARDS AND GLOBBING."
16137 #: ../fish/guestfish.pod:813
16142 #: ../fish/guestfish.pod:815
16151 #: ../fish/guestfish.pod:818
16153 "Without any parameter, this lists all commands. With a C<cmd> parameter, "
16154 "this displays detailed help for a command."
16158 #: ../fish/guestfish.pod:821
16163 #: ../fish/guestfish.pod:823
16171 #: ../fish/guestfish.pod:825
16173 "Change the local directory, ie. the current directory of guestfish itself."
16177 #: ../fish/guestfish.pod:828
16178 msgid "Note that C<!cd> won't do what you might expect."
16182 #: ../fish/guestfish.pod:830
16183 msgid "man | manual"
16187 #: ../fish/guestfish.pod:832
16195 #: ../fish/guestfish.pod:834
16196 msgid "Opens the manual page for guestfish."
16200 #: ../fish/guestfish.pod:836
16201 msgid "more | less"
16205 #: ../fish/guestfish.pod:838
16213 #: ../fish/guestfish.pod:840
16221 #: ../fish/guestfish.pod:842
16222 msgid "This is used to view a file."
16226 #: ../fish/guestfish.pod:844
16228 "The default viewer is C<$PAGER>. However if you use the alternate command "
16229 "C<less> you will get the C<less> command specifically."
16233 #: ../fish/guestfish.pod:850
16234 msgid "quit | exit"
16238 #: ../fish/guestfish.pod:852
16239 msgid "This exits guestfish. You can also use C<^D> key."
16243 #: ../fish/guestfish.pod:854
16248 #: ../fish/guestfish.pod:856
16256 #: ../fish/guestfish.pod:858
16258 "Close and reopen the libguestfs handle. It is not necessary to use this "
16259 "normally, because the handle is closed properly when guestfish exits. "
16260 "However this is occasionally useful for testing."
16264 #: ../fish/guestfish.pod:862
16269 #: ../fish/guestfish.pod:864
16272 " sparse filename size\n"
16277 #: ../fish/guestfish.pod:866
16279 "This creates an empty sparse file of the given size, and then adds so it can "
16280 "be further examined."
16284 #: ../fish/guestfish.pod:869
16286 "In all respects it works the same as the C<alloc> command, except that the "
16287 "image file is allocated sparsely, which means that disk blocks are not "
16288 "assigned to the file until they are needed. Sparse disk files only use "
16289 "space when written to, but they are slower and there is a danger you could "
16290 "run out of real disk space during a write operation."
16294 #: ../fish/guestfish.pod:879
16299 #: ../fish/guestfish.pod:881
16307 #: ../fish/guestfish.pod:883
16309 "This command returns a list of the optional groups known to the daemon, and "
16310 "indicates which ones are supported by this build of the libguestfs appliance."
16314 #: ../fish/guestfish.pod:887
16315 msgid "See also L<guestfs(3)/AVAILABILITY>."
16319 #: ../fish/guestfish.pod:889
16324 #: ../fish/guestfish.pod:891
16327 " time command args...\n"
16332 #: ../fish/guestfish.pod:893
16334 "Run the command as usual, but print the elapsed time afterwards. This can "
16335 "be useful for benchmarking operations."
16339 #: ../fish/guestfish.pod:896
16344 #: ../fish/guestfish.pod:900 ../test-tool/libguestfs-test-tool.pod:83
16349 #: ../fish/guestfish.pod:902
16351 "guestfish returns 0 if the commands completed without error, or 1 if there "
16356 #: ../fish/guestfish.pod:909
16361 #: ../fish/guestfish.pod:911
16363 "The C<edit> command uses C<$EDITOR> as the editor. If not set, it uses "
16368 #: ../fish/guestfish.pod:914
16369 msgid "GUESTFISH_PID"
16373 #: ../fish/guestfish.pod:916
16375 "Used with the I<--remote> option to specify the remote guestfish process to "
16376 "control. See section L</REMOTE CONTROL GUESTFISH OVER A SOCKET>."
16380 #: ../fish/guestfish.pod:920
16385 #: ../fish/guestfish.pod:922
16387 "If compiled with GNU readline support, various files in the home directory "
16388 "can be used. See L</FILES>."
16392 #: ../fish/guestfish.pod:931
16394 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
16395 "effect as using the B<-v> option."
16399 #: ../fish/guestfish.pod:943
16401 "Set the path that guestfish uses to search for kernel and initrd.img. See "
16402 "the discussion of paths in L<guestfs(3)>."
16406 #: ../fish/guestfish.pod:954
16407 msgid "Set C<LIBGUESTFS_TRACE=1> to enable command traces."
16411 #: ../fish/guestfish.pod:956
16416 #: ../fish/guestfish.pod:958
16418 "The C<more> command uses C<$PAGER> as the pager. If not set, it uses "
16423 #: ../fish/guestfish.pod:973 ../test-tool/libguestfs-test-tool.pod:88
16428 #: ../fish/guestfish.pod:977
16429 msgid "$HOME/.guestfish"
16433 #: ../fish/guestfish.pod:979
16435 "If compiled with GNU readline support, then the command history is saved in "
16440 #: ../fish/guestfish.pod:982
16441 msgid "$HOME/.inputrc"
16445 #: ../fish/guestfish.pod:984
16446 msgid "/etc/inputrc"
16450 #: ../fish/guestfish.pod:986
16452 "If compiled with GNU readline support, then these files can be used to "
16453 "configure readline. For further information, please see L<readline(3)/"
16454 "INITIALIZATION FILE>."
16458 #: ../fish/guestfish.pod:990
16459 msgid "To write rules which only apply to guestfish, use:"
16463 #: ../fish/guestfish.pod:992
16473 #: ../fish/guestfish.pod:996
16475 "Variables that you can set in inputrc that change the behaviour of guestfish "
16476 "in useful ways include:"
16480 #: ../fish/guestfish.pod:1001
16481 msgid "completion-ignore-case (default: on)"
16485 #: ../fish/guestfish.pod:1003
16487 "By default, guestfish will ignore case when tab-completing paths on the "
16492 #: ../fish/guestfish.pod:1006
16495 " set completion-ignore-case off\n"
16500 #: ../fish/guestfish.pod:1008
16501 msgid "to make guestfish case sensitive."
16505 #: ../fish/guestfish.pod:1012
16510 #: ../fish/guestfish.pod:1014
16511 msgid "test2.img (etc)"
16515 #: ../fish/guestfish.pod:1016
16517 "When using the C<-N> or C<--new> option, the prepared disk or filesystem "
16518 "will be created in the file C<test1.img> in the current directory. The "
16519 "second use of C<-N> will use C<test2.img> and so on. Any existing file with "
16520 "the same name will be overwritten."
16524 #: ../fish/guestfish.pod:1025
16526 "L<guestfs(3)>, L<http://libguestfs.org/>, L<virt-cat(1)>, L<virt-df(1)>, "
16527 "L<virt-edit(1)>, L<virt-list-filesystems(1)>, L<virt-list-partitions(1)>, "
16528 "L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-resize(1)>, "
16529 "L<virt-tar(1)>, L<virt-win-reg(1)>."
16533 #: ../fish/guestfish.pod:1048 ../test-tool/libguestfs-test-tool.pod:124
16534 #: ../fuse/guestmount.pod:198 ../inspector/virt-inspector.pl:865
16535 #: ../tools/virt-cat.pl:181 ../tools/virt-df.pl:499 ../tools/virt-edit.pl:345
16536 #: ../tools/virt-list-filesystems.pl:211 ../tools/virt-list-partitions.pl:248
16537 #: ../tools/virt-ls.pl:229 ../tools/virt-make-fs.pl:560
16538 #: ../tools/virt-rescue.pl:249 ../tools/virt-resize.pl:1415
16539 #: ../tools/virt-tar.pl:276 ../tools/virt-win-reg.pl:495
16541 "This program is free software; you can redistribute it and/or modify it "
16542 "under the terms of the GNU General Public License as published by the Free "
16543 "Software Foundation; either version 2 of the License, or (at your option) "
16544 "any later version."
16548 #: ../fish/guestfish.pod:1053 ../test-tool/libguestfs-test-tool.pod:129
16549 #: ../fuse/guestmount.pod:203 ../inspector/virt-inspector.pl:870
16550 #: ../tools/virt-cat.pl:186 ../tools/virt-df.pl:504 ../tools/virt-edit.pl:350
16551 #: ../tools/virt-list-filesystems.pl:216 ../tools/virt-list-partitions.pl:253
16552 #: ../tools/virt-ls.pl:234 ../tools/virt-make-fs.pl:565
16553 #: ../tools/virt-rescue.pl:254 ../tools/virt-resize.pl:1420
16554 #: ../tools/virt-tar.pl:281 ../tools/virt-win-reg.pl:500
16556 "This program is distributed in the hope that it will be useful, but WITHOUT "
16557 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
16558 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for "
16563 #: ../fish/guestfish.pod:1058 ../test-tool/libguestfs-test-tool.pod:134
16564 #: ../fuse/guestmount.pod:208 ../inspector/virt-inspector.pl:875
16565 #: ../tools/virt-cat.pl:191 ../tools/virt-df.pl:509 ../tools/virt-edit.pl:355
16566 #: ../tools/virt-list-filesystems.pl:221 ../tools/virt-list-partitions.pl:258
16567 #: ../tools/virt-ls.pl:239 ../tools/virt-make-fs.pl:570
16568 #: ../tools/virt-rescue.pl:259 ../tools/virt-resize.pl:1425
16569 #: ../tools/virt-tar.pl:286 ../tools/virt-win-reg.pl:505
16571 "You should have received a copy of the GNU General Public License along with "
16572 "this program; if not, write to the Free Software Foundation, Inc., 675 Mass "
16573 "Ave, Cambridge, MA 02139, USA."
16577 #: ../fish/guestfish-actions.pod:1
16578 msgid "add-cdrom | cdrom"
16582 #: ../fish/guestfish-actions.pod:3
16585 " add-cdrom filename\n"
16590 #: ../fish/guestfish-actions.pod:15
16592 "This call checks for the existence of C<filename>. This stops you from "
16593 "specifying other types of drive which are supported by qemu such as C<nbd:> "
16594 "and C<http:> URLs. To specify those, use the general C<config> call instead."
16598 #: ../fish/guestfish-actions.pod:22
16600 "If you just want to add an ISO file (often you use this as an efficient way "
16601 "to transfer large files into the guest), then you should probably use C<add-"
16602 "drive-ro> instead."
16606 #: ../fish/guestfish-actions.pod:28
16607 msgid "add-drive | add"
16611 #: ../fish/guestfish-actions.pod:30
16614 " add-drive filename\n"
16619 #: ../fish/guestfish-actions.pod:49 ../fish/guestfish-actions.pod:75
16621 "C<if=...> is set at compile time by the configuration option C<./configure --"
16622 "with-drive-if=...>. In the rare case where you might need to change this at "
16623 "run time, use C<add-drive-with-if> or C<add-drive-ro-with-if>."
16627 #: ../fish/guestfish-actions.pod:54 ../fish/guestfish-actions.pod:80
16629 "Note that this call checks for the existence of C<filename>. This stops you "
16630 "from specifying other types of drive which are supported by qemu such as "
16631 "C<nbd:> and C<http:> URLs. To specify those, use the general C<config> call "
16636 #: ../fish/guestfish-actions.pod:59
16637 msgid "add-drive-ro | add-ro"
16641 #: ../fish/guestfish-actions.pod:61
16644 " add-drive-ro filename\n"
16649 #: ../fish/guestfish-actions.pod:85
16650 msgid "add-drive-ro-with-if"
16654 #: ../fish/guestfish-actions.pod:87
16657 " add-drive-ro-with-if filename iface\n"
16662 #: ../fish/guestfish-actions.pod:89
16664 "This is the same as C<add-drive-ro> but it allows you to specify the QEMU "
16665 "interface emulation to use at run time."
16669 #: ../fish/guestfish-actions.pod:92
16670 msgid "add-drive-with-if"
16674 #: ../fish/guestfish-actions.pod:94
16677 " add-drive-with-if filename iface\n"
16682 #: ../fish/guestfish-actions.pod:96
16684 "This is the same as C<add-drive> but it allows you to specify the QEMU "
16685 "interface emulation to use at run time."
16689 #: ../fish/guestfish-actions.pod:99
16694 #: ../fish/guestfish-actions.pod:101
16697 " aug-clear augpath\n"
16702 #: ../fish/guestfish-actions.pod:106
16707 #: ../fish/guestfish-actions.pod:108
16715 #: ../fish/guestfish-actions.pod:110
16717 "Close the current Augeas handle and free up any resources used by it. After "
16718 "calling this, you have to call C<aug-init> again before you can use any "
16719 "other Augeas functions."
16723 #: ../fish/guestfish-actions.pod:115
16724 msgid "aug-defnode"
16728 #: ../fish/guestfish-actions.pod:117
16731 " aug-defnode name expr val\n"
16736 #: ../fish/guestfish-actions.pod:122
16738 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
16739 "calling C<aug-set> C<expr>, C<value>. C<name> will be the nodeset "
16740 "containing that single node."
16744 #: ../fish/guestfish-actions.pod:130
16749 #: ../fish/guestfish-actions.pod:132
16752 " aug-defvar name expr\n"
16757 #: ../fish/guestfish-actions.pod:141
16762 #: ../fish/guestfish-actions.pod:143
16765 " aug-get augpath\n"
16770 #: ../fish/guestfish-actions.pod:148
16775 #: ../fish/guestfish-actions.pod:150
16778 " aug-init root flags\n"
16783 #: ../fish/guestfish-actions.pod:156
16784 msgid "You must call this before using any other C<aug-*> commands."
16788 #: ../fish/guestfish-actions.pod:191
16789 msgid "Do not load the tree in C<aug-init>."
16793 #: ../fish/guestfish-actions.pod:195
16794 msgid "To close the handle, you can call C<aug-close>."
16798 #: ../fish/guestfish-actions.pod:199
16803 #: ../fish/guestfish-actions.pod:201
16806 " aug-insert augpath label true|false\n"
16811 #: ../fish/guestfish-actions.pod:211
16816 #: ../fish/guestfish-actions.pod:213
16824 #: ../fish/guestfish-actions.pod:220
16829 #: ../fish/guestfish-actions.pod:222
16832 " aug-ls augpath\n"
16837 #: ../fish/guestfish-actions.pod:224
16839 "This is just a shortcut for listing C<aug-match> C<path/*> and sorting the "
16840 "resulting nodes into alphabetical order."
16844 #: ../fish/guestfish-actions.pod:227
16849 #: ../fish/guestfish-actions.pod:229
16852 " aug-match augpath\n"
16857 #: ../fish/guestfish-actions.pod:235
16862 #: ../fish/guestfish-actions.pod:237
16865 " aug-mv src dest\n"
16870 #: ../fish/guestfish-actions.pod:242
16875 #: ../fish/guestfish-actions.pod:244
16878 " aug-rm augpath\n"
16883 #: ../fish/guestfish-actions.pod:250
16888 #: ../fish/guestfish-actions.pod:252
16896 #: ../fish/guestfish-actions.pod:256
16898 "The flags which were passed to C<aug-init> affect exactly how files are "
16903 #: ../fish/guestfish-actions.pod:259
16908 #: ../fish/guestfish-actions.pod:261
16911 " aug-set augpath val\n"
16916 #: ../fish/guestfish-actions.pod:265
16918 "In the Augeas API, it is possible to clear a node by setting the value to "
16919 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
16920 "this call. Instead you must use the C<aug-clear> call."
16924 #: ../fish/guestfish-actions.pod:270
16929 #: ../fish/guestfish-actions.pod:272
16932 " available 'groups ...'\n"
16937 #: ../fish/guestfish-actions.pod:278
16939 "The libguestfs groups, and the functions that those groups correspond to, "
16940 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
16941 "runtime by calling C<available-all-groups>."
16945 #: ../fish/guestfish-actions.pod:302
16946 msgid "You must call C<launch> before calling this function."
16950 #: ../fish/guestfish-actions.pod:324
16952 "This call was added in version C<1.0.80>. In previous versions of "
16953 "libguestfs all you could do would be to speculatively execute a command to "
16954 "find out if the daemon implemented it. See also C<version>."
16958 #: ../fish/guestfish-actions.pod:331
16959 msgid "available-all-groups"
16963 #: ../fish/guestfish-actions.pod:333
16966 " available-all-groups\n"
16971 #: ../fish/guestfish-actions.pod:335
16973 "This command returns a list of all optional groups that this daemon knows "
16974 "about. Note this returns both supported and unsupported groups. To find "
16975 "out which ones the daemon can actually support you have to call C<available> "
16976 "on each member of the returned list."
16980 #: ../fish/guestfish-actions.pod:341
16981 msgid "See also C<available> and L<guestfs(3)/AVAILABILITY>."
16985 #: ../fish/guestfish-actions.pod:343
16990 #: ../fish/guestfish-actions.pod:345
16993 " base64-in (base64file|-) filename\n"
16998 #: ../fish/guestfish-actions.pod:350 ../fish/guestfish-actions.pod:359
16999 #: ../fish/guestfish-actions.pod:583 ../fish/guestfish-actions.pod:730
17000 #: ../fish/guestfish-actions.pod:777 ../fish/guestfish-actions.pod:1154
17001 #: ../fish/guestfish-actions.pod:3657 ../fish/guestfish-actions.pod:3669
17002 #: ../fish/guestfish-actions.pod:3680 ../fish/guestfish-actions.pod:3691
17003 #: ../fish/guestfish-actions.pod:3743 ../fish/guestfish-actions.pod:3752
17004 #: ../fish/guestfish-actions.pod:3802
17005 msgid "Use C<-> instead of a filename to read/write from stdin/stdout."
17009 #: ../fish/guestfish-actions.pod:352
17014 #: ../fish/guestfish-actions.pod:354
17017 " base64-out filename (base64file|-)\n"
17022 #: ../fish/guestfish-actions.pod:361
17023 msgid "blockdev-flushbufs"
17027 #: ../fish/guestfish-actions.pod:363
17030 " blockdev-flushbufs device\n"
17035 #: ../fish/guestfish-actions.pod:370
17036 msgid "blockdev-getbsz"
17040 #: ../fish/guestfish-actions.pod:372
17043 " blockdev-getbsz device\n"
17048 #: ../fish/guestfish-actions.pod:381
17049 msgid "blockdev-getro"
17053 #: ../fish/guestfish-actions.pod:383
17056 " blockdev-getro device\n"
17061 #: ../fish/guestfish-actions.pod:390
17062 msgid "blockdev-getsize64"
17066 #: ../fish/guestfish-actions.pod:392
17069 " blockdev-getsize64 device\n"
17074 #: ../fish/guestfish-actions.pod:396
17075 msgid "See also C<blockdev-getsz>."
17079 #: ../fish/guestfish-actions.pod:400
17080 msgid "blockdev-getss"
17084 #: ../fish/guestfish-actions.pod:402
17087 " blockdev-getss device\n"
17092 #: ../fish/guestfish-actions.pod:407
17094 "(Note, this is not the size in sectors, use C<blockdev-getsz> for that)."
17098 #: ../fish/guestfish-actions.pod:412
17099 msgid "blockdev-getsz"
17103 #: ../fish/guestfish-actions.pod:414
17106 " blockdev-getsz device\n"
17111 #: ../fish/guestfish-actions.pod:419
17113 "See also C<blockdev-getss> for the real sector size of the device, and "
17114 "C<blockdev-getsize64> for the more useful I<size in bytes>."
17118 #: ../fish/guestfish-actions.pod:425
17119 msgid "blockdev-rereadpt"
17123 #: ../fish/guestfish-actions.pod:427
17126 " blockdev-rereadpt device\n"
17131 #: ../fish/guestfish-actions.pod:433
17132 msgid "blockdev-setbsz"
17136 #: ../fish/guestfish-actions.pod:435
17139 " blockdev-setbsz device blocksize\n"
17144 #: ../fish/guestfish-actions.pod:444
17145 msgid "blockdev-setro"
17149 #: ../fish/guestfish-actions.pod:446
17152 " blockdev-setro device\n"
17157 #: ../fish/guestfish-actions.pod:452
17158 msgid "blockdev-setrw"
17162 #: ../fish/guestfish-actions.pod:454
17165 " blockdev-setrw device\n"
17170 #: ../fish/guestfish-actions.pod:460
17171 msgid "case-sensitive-path"
17175 #: ../fish/guestfish-actions.pod:462
17178 " case-sensitive-path path\n"
17183 #: ../fish/guestfish-actions.pod:486
17185 "Thus C<case-sensitive-path> (\"/Windows/System32\") might return C<\"/"
17186 "WINDOWS/system32\"> (the exact return value would depend on details of how "
17187 "the directories were originally created under Windows)."
17191 #: ../fish/guestfish-actions.pod:494
17192 msgid "See also C<realpath>."
17196 #: ../fish/guestfish-actions.pod:496
17201 #: ../fish/guestfish-actions.pod:498
17209 #: ../fish/guestfish-actions.pod:502
17211 "Note that this function cannot correctly handle binary files (specifically, "
17212 "files containing C<\\0> character which is treated as end of string). For "
17213 "those you need to use the C<read-file> or C<download> functions which have a "
17214 "more complex interface."
17218 #: ../fish/guestfish-actions.pod:510
17223 #: ../fish/guestfish-actions.pod:512
17226 " checksum csumtype path\n"
17231 #: ../fish/guestfish-actions.pod:555
17232 msgid "To get the checksum for a device, use C<checksum-device>."
17236 #: ../fish/guestfish-actions.pod:557
17237 msgid "To get the checksums for many files, use C<checksums-out>."
17241 #: ../fish/guestfish-actions.pod:559
17242 msgid "checksum-device"
17246 #: ../fish/guestfish-actions.pod:561
17249 " checksum-device csumtype device\n"
17254 #: ../fish/guestfish-actions.pod:563
17256 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
17257 "device named C<device>. For the types of checksums supported see the "
17258 "C<checksum> command."
17262 #: ../fish/guestfish-actions.pod:567
17263 msgid "checksums-out"
17267 #: ../fish/guestfish-actions.pod:569
17270 " checksums-out csumtype directory (sumsfile|-)\n"
17275 #: ../fish/guestfish-actions.pod:585
17280 #: ../fish/guestfish-actions.pod:587
17283 " chmod mode path\n"
17288 #: ../fish/guestfish-actions.pod:598
17293 #: ../fish/guestfish-actions.pod:600
17296 " chown owner group path\n"
17301 #: ../fish/guestfish-actions.pod:608
17306 #: ../fish/guestfish-actions.pod:610
17309 " command 'arguments ...'\n"
17314 #: ../fish/guestfish-actions.pod:617
17316 "The single parameter is an argv-style list of arguments. The first element "
17317 "is the name of the program to run. Subsequent elements are parameters. The "
17318 "list must be non-empty (ie. must contain a program name). Note that the "
17319 "command runs directly, and is I<not> invoked via the shell (see C<sh>)."
17323 #: ../fish/guestfish-actions.pod:645
17324 msgid "command-lines"
17328 #: ../fish/guestfish-actions.pod:647
17331 " command-lines 'arguments ...'\n"
17336 #: ../fish/guestfish-actions.pod:649
17338 "This is the same as C<command>, but splits the result into a list of lines."
17342 #: ../fish/guestfish-actions.pod:652
17343 msgid "See also: C<sh-lines>"
17347 #: ../fish/guestfish-actions.pod:657
17352 #: ../fish/guestfish-actions.pod:659
17355 " config qemuparam qemuvalue\n"
17360 #: ../fish/guestfish-actions.pod:670
17365 #: ../fish/guestfish-actions.pod:672
17368 " copy-size src dest size\n"
17373 #: ../fish/guestfish-actions.pod:680
17378 #: ../fish/guestfish-actions.pod:682
17386 #: ../fish/guestfish-actions.pod:687
17391 #: ../fish/guestfish-actions.pod:689
17399 #: ../fish/guestfish-actions.pod:694
17404 #: ../fish/guestfish-actions.pod:696
17412 #: ../fish/guestfish-actions.pod:703
17414 "If the destination is a device, it must be as large or larger than the "
17415 "source file or device, otherwise the copy will fail. This command cannot do "
17416 "partial copies (see C<copy-size>)."
17420 #: ../fish/guestfish-actions.pod:707
17425 #: ../fish/guestfish-actions.pod:709
17428 " debug subcmd 'extraargs ...'\n"
17433 #: ../fish/guestfish-actions.pod:711
17435 "The C<debug> command exposes some internals of C<guestfsd> (the guestfs "
17436 "daemon) that runs inside the qemu subprocess."
17440 #: ../fish/guestfish-actions.pod:719
17441 msgid "debug-upload"
17445 #: ../fish/guestfish-actions.pod:721
17448 " debug-upload (filename|-) tmpname mode\n"
17453 #: ../fish/guestfish-actions.pod:723
17454 msgid "The C<debug-upload> command uploads a file to the libguestfs appliance."
17458 #: ../fish/guestfish-actions.pod:732
17463 #: ../fish/guestfish-actions.pod:734
17471 #: ../fish/guestfish-actions.pod:742
17476 #: ../fish/guestfish-actions.pod:744
17484 #: ../fish/guestfish-actions.pod:753
17489 #: ../fish/guestfish-actions.pod:755
17497 #: ../fish/guestfish-actions.pod:761
17499 "Another way to get the same information is to enable verbose messages with "
17500 "C<set-verbose> or by setting the environment variable C<LIBGUESTFS_DEBUG=1> "
17501 "before running the program."
17505 #: ../fish/guestfish-actions.pod:766
17510 #: ../fish/guestfish-actions.pod:768
17513 " download remotefilename (filename|-)\n"
17518 #: ../fish/guestfish-actions.pod:775
17519 msgid "See also C<upload>, C<cat>."
17523 #: ../fish/guestfish-actions.pod:779
17524 msgid "drop-caches"
17528 #: ../fish/guestfish-actions.pod:781
17531 " drop-caches whattodrop\n"
17536 #: ../fish/guestfish-actions.pod:793
17541 #: ../fish/guestfish-actions.pod:795
17549 #: ../fish/guestfish-actions.pod:807
17554 #: ../fish/guestfish-actions.pod:809
17557 " e2fsck-f device\n"
17562 #: ../fish/guestfish-actions.pod:815
17564 "This command is only needed because of C<resize2fs> (q.v.). Normally you "
17565 "should use C<fsck>."
17569 #: ../fish/guestfish-actions.pod:818
17570 msgid "echo-daemon"
17574 #: ../fish/guestfish-actions.pod:820
17577 " echo-daemon 'words ...'\n"
17582 #: ../fish/guestfish-actions.pod:827
17583 msgid "See also C<ping-daemon>."
17587 #: ../fish/guestfish-actions.pod:829
17592 #: ../fish/guestfish-actions.pod:831
17595 " egrep regex path\n"
17600 #: ../fish/guestfish-actions.pod:839
17605 #: ../fish/guestfish-actions.pod:841
17608 " egrepi regex path\n"
17613 #: ../fish/guestfish-actions.pod:849
17618 #: ../fish/guestfish-actions.pod:851
17621 " equal file1 file2\n"
17626 #: ../fish/guestfish-actions.pod:858
17631 #: ../fish/guestfish-actions.pod:860
17639 #: ../fish/guestfish-actions.pod:865
17640 msgid "See also C<is-file>, C<is-dir>, C<stat>."
17644 #: ../fish/guestfish-actions.pod:867
17649 #: ../fish/guestfish-actions.pod:869
17652 " fallocate path len\n"
17657 #: ../fish/guestfish-actions.pod:886
17658 msgid "fallocate64"
17662 #: ../fish/guestfish-actions.pod:888
17665 " fallocate64 path len\n"
17670 #: ../fish/guestfish-actions.pod:894
17672 "Note that this call allocates disk blocks for the file. To create a sparse "
17673 "file use C<truncate-size> instead."
17677 #: ../fish/guestfish-actions.pod:897
17679 "The deprecated call C<fallocate> does the same, but owing to an oversight it "
17680 "only allowed 30 bit lengths to be specified, effectively limiting the "
17681 "maximum size of files created through that call to 1GB."
17685 #: ../fish/guestfish-actions.pod:906
17690 #: ../fish/guestfish-actions.pod:908
17693 " fgrep pattern path\n"
17698 #: ../fish/guestfish-actions.pod:916
17703 #: ../fish/guestfish-actions.pod:918
17706 " fgrepi pattern path\n"
17711 #: ../fish/guestfish-actions.pod:926
17716 #: ../fish/guestfish-actions.pod:928
17724 #: ../fish/guestfish-actions.pod:940
17726 "This command can also be used on C</dev/> devices (and partitions, LV "
17727 "names). You can for example use this to determine if a device contains a "
17728 "filesystem, although it's usually better to use C<vfs-type>."
17732 #: ../fish/guestfish-actions.pod:950
17733 msgid "file-architecture"
17737 #: ../fish/guestfish-actions.pod:952
17740 " file-architecture filename\n"
17745 #: ../fish/guestfish-actions.pod:1055
17750 #: ../fish/guestfish-actions.pod:1057
17758 #: ../fish/guestfish-actions.pod:1061
17760 "To get other stats about a file, use C<stat>, C<lstat>, C<is-dir>, C<is-"
17761 "file> etc. To get the size of block devices, use C<blockdev-getsize64>."
17765 #: ../fish/guestfish-actions.pod:1065
17770 #: ../fish/guestfish-actions.pod:1067
17773 " fill c len path\n"
17778 #: ../fish/guestfish-actions.pod:1073
17780 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
17781 "C<truncate-size>. To create a file with a pattern of repeating bytes use "
17786 #: ../fish/guestfish-actions.pod:1078
17787 msgid "fill-pattern"
17791 #: ../fish/guestfish-actions.pod:1080
17794 " fill-pattern pattern len path\n"
17799 #: ../fish/guestfish-actions.pod:1082
17801 "This function is like C<fill> except that it creates a new file of length "
17802 "C<len> containing the repeating pattern of bytes in C<pattern>. The pattern "
17803 "is truncated if necessary to ensure the length of the file is exactly C<len> "
17808 #: ../fish/guestfish-actions.pod:1087
17813 #: ../fish/guestfish-actions.pod:1089
17816 " find directory\n"
17821 #: ../fish/guestfish-actions.pod:1103
17822 msgid "then the returned list from C<find> C</tmp> would be 4 elements:"
17826 #: ../fish/guestfish-actions.pod:1116
17827 msgid "See also C<find0>."
17831 #: ../fish/guestfish-actions.pod:1121
17836 #: ../fish/guestfish-actions.pod:1123
17839 " find0 directory (files|-)\n"
17844 #: ../fish/guestfish-actions.pod:1129
17846 "This command works the same way as C<find> with the following exceptions:"
17850 #: ../fish/guestfish-actions.pod:1156
17851 msgid "findfs-label"
17855 #: ../fish/guestfish-actions.pod:1158
17858 " findfs-label label\n"
17863 #: ../fish/guestfish-actions.pod:1164
17864 msgid "To find the label of a filesystem, use C<vfs-label>."
17868 #: ../fish/guestfish-actions.pod:1166
17869 msgid "findfs-uuid"
17873 #: ../fish/guestfish-actions.pod:1168
17876 " findfs-uuid uuid\n"
17881 #: ../fish/guestfish-actions.pod:1174
17882 msgid "To find the UUID of a filesystem, use C<vfs-uuid>."
17886 #: ../fish/guestfish-actions.pod:1176
17891 #: ../fish/guestfish-actions.pod:1178
17894 " fsck fstype device\n"
17899 #: ../fish/guestfish-actions.pod:1208
17904 #: ../fish/guestfish-actions.pod:1210
17912 #: ../fish/guestfish-actions.pod:1217
17913 msgid "get-autosync"
17917 #: ../fish/guestfish-actions.pod:1219
17925 #: ../fish/guestfish-actions.pod:1223
17930 #: ../fish/guestfish-actions.pod:1225
17938 #: ../fish/guestfish-actions.pod:1229
17939 msgid "get-e2label"
17943 #: ../fish/guestfish-actions.pod:1231
17946 " get-e2label device\n"
17951 #: ../fish/guestfish-actions.pod:1243
17956 #: ../fish/guestfish-actions.pod:1245
17959 " get-e2uuid device\n"
17964 #: ../fish/guestfish-actions.pod:1257
17965 msgid "get-memsize"
17969 #: ../fish/guestfish-actions.pod:1259
17977 #: ../fish/guestfish-actions.pod:1264
17979 "If C<set-memsize> was not called on this handle, and if "
17980 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
17981 "value for memsize."
17985 #: ../fish/guestfish-actions.pod:1271
17986 msgid "get-network"
17990 #: ../fish/guestfish-actions.pod:1273
17998 #: ../fish/guestfish-actions.pod:1277
18003 #: ../fish/guestfish-actions.pod:1279
18011 #: ../fish/guestfish-actions.pod:1286
18012 msgid "get-pid | pid"
18016 #: ../fish/guestfish-actions.pod:1288
18024 #: ../fish/guestfish-actions.pod:1295
18029 #: ../fish/guestfish-actions.pod:1297
18037 #: ../fish/guestfish-actions.pod:1304
18038 msgid "get-recovery-proc"
18042 #: ../fish/guestfish-actions.pod:1306
18045 " get-recovery-proc\n"
18050 #: ../fish/guestfish-actions.pod:1310
18051 msgid "get-selinux"
18055 #: ../fish/guestfish-actions.pod:1312
18063 #: ../fish/guestfish-actions.pod:1314
18065 "This returns the current setting of the selinux flag which is passed to the "
18066 "appliance at boot time. See C<set-selinux>."
18070 #: ../fish/guestfish-actions.pod:1320
18075 #: ../fish/guestfish-actions.pod:1322
18083 #: ../fish/guestfish-actions.pod:1329
18088 #: ../fish/guestfish-actions.pod:1331
18096 #: ../fish/guestfish-actions.pod:1335
18101 #: ../fish/guestfish-actions.pod:1337
18109 #: ../fish/guestfish-actions.pod:1339
18111 "Return the current umask. By default the umask is C<022> unless it has been "
18112 "set by calling C<umask>."
18116 #: ../fish/guestfish-actions.pod:1342
18117 msgid "get-verbose"
18121 #: ../fish/guestfish-actions.pod:1344
18129 #: ../fish/guestfish-actions.pod:1348
18134 #: ../fish/guestfish-actions.pod:1350
18142 #: ../fish/guestfish-actions.pod:1354
18143 msgid "See the documentation about SELINUX in L<guestfs(3)>, and C<setcon>"
18147 #: ../fish/guestfish-actions.pod:1357
18152 #: ../fish/guestfish-actions.pod:1359
18155 " getxattrs path\n"
18160 #: ../fish/guestfish-actions.pod:1367
18161 msgid "See also: C<lgetxattrs>, L<attr(5)>."
18165 #: ../fish/guestfish-actions.pod:1369
18166 msgid "glob-expand"
18170 #: ../fish/guestfish-actions.pod:1371
18173 " glob-expand pattern\n"
18178 #: ../fish/guestfish-actions.pod:1384
18183 #: ../fish/guestfish-actions.pod:1386
18186 " grep regex path\n"
18191 #: ../fish/guestfish-actions.pod:1394
18196 #: ../fish/guestfish-actions.pod:1396
18199 " grepi regex path\n"
18204 #: ../fish/guestfish-actions.pod:1404
18205 msgid "grub-install"
18209 #: ../fish/guestfish-actions.pod:1406
18212 " grub-install root device\n"
18217 #: ../fish/guestfish-actions.pod:1422
18222 #: ../fish/guestfish-actions.pod:1424
18230 #: ../fish/guestfish-actions.pod:1432
18235 #: ../fish/guestfish-actions.pod:1434
18238 " head-n nrlines path\n"
18243 #: ../fish/guestfish-actions.pod:1447
18248 #: ../fish/guestfish-actions.pod:1449
18256 #: ../fish/guestfish-actions.pod:1457
18261 #: ../fish/guestfish-actions.pod:1459
18264 " initrd-cat initrdpath filename\n"
18269 #: ../fish/guestfish-actions.pod:1471
18270 msgid "See also C<initrd-list>."
18274 #: ../fish/guestfish-actions.pod:1476
18275 msgid "initrd-list"
18279 #: ../fish/guestfish-actions.pod:1478
18282 " initrd-list path\n"
18287 #: ../fish/guestfish-actions.pod:1490
18288 msgid "inotify-add-watch"
18292 #: ../fish/guestfish-actions.pod:1492
18295 " inotify-add-watch path mask\n"
18300 #: ../fish/guestfish-actions.pod:1504
18301 msgid "inotify-close"
18305 #: ../fish/guestfish-actions.pod:1506
18313 #: ../fish/guestfish-actions.pod:1512
18314 msgid "inotify-files"
18318 #: ../fish/guestfish-actions.pod:1514
18326 #: ../fish/guestfish-actions.pod:1516
18328 "This function is a helpful wrapper around C<inotify-read> which just returns "
18329 "a list of pathnames of objects that were touched. The returned pathnames "
18330 "are sorted and deduplicated."
18334 #: ../fish/guestfish-actions.pod:1520
18335 msgid "inotify-init"
18339 #: ../fish/guestfish-actions.pod:1522
18342 " inotify-init maxevents\n"
18347 #: ../fish/guestfish-actions.pod:1528
18349 "C<maxevents> is the maximum number of events which will be queued up between "
18350 "calls to C<inotify-read> or C<inotify-files>. If this is passed as C<0>, "
18351 "then the kernel (or previously set) default is used. For Linux 2.6.29 the "
18352 "default was 16384 events. Beyond this limit, the kernel throws away events, "
18353 "but records the fact that it threw them away by setting a flag "
18354 "C<IN_Q_OVERFLOW> in the returned structure list (see C<inotify-read>)."
18358 #: ../fish/guestfish-actions.pod:1538
18360 "Before any events are generated, you have to add some watches to the "
18361 "internal watch list. See: C<inotify-add-watch>, C<inotify-rm-watch> and "
18362 "C<inotify-watch-all>."
18366 #: ../fish/guestfish-actions.pod:1544
18368 "Queued up events should be read periodically by calling C<inotify-read> (or "
18369 "C<inotify-files> which is just a helpful wrapper around C<inotify-read>). "
18370 "If you don't read the events out often enough then you risk the internal "
18371 "queue overflowing."
18375 #: ../fish/guestfish-actions.pod:1551
18377 "The handle should be closed after use by calling C<inotify-close>. This "
18378 "also removes any watches automatically."
18382 #: ../fish/guestfish-actions.pod:1560
18383 msgid "inotify-read"
18387 #: ../fish/guestfish-actions.pod:1562
18395 #: ../fish/guestfish-actions.pod:1575
18396 msgid "inotify-rm-watch"
18400 #: ../fish/guestfish-actions.pod:1577
18403 " inotify-rm-watch wd\n"
18408 #: ../fish/guestfish-actions.pod:1579
18409 msgid "Remove a previously defined inotify watch. See C<inotify-add-watch>."
18413 #: ../fish/guestfish-actions.pod:1582
18414 msgid "inspect-get-arch"
18418 #: ../fish/guestfish-actions.pod:1584
18421 " inspect-get-arch root\n"
18426 #: ../fish/guestfish-actions.pod:1586 ../fish/guestfish-actions.pod:1602
18427 #: ../fish/guestfish-actions.pod:1648 ../fish/guestfish-actions.pod:1666
18428 #: ../fish/guestfish-actions.pod:1687 ../fish/guestfish-actions.pod:1702
18429 #: ../fish/guestfish-actions.pod:1725 ../fish/guestfish-actions.pod:1742
18431 "This function should only be called with a root device string as returned by "
18436 #: ../fish/guestfish-actions.pod:1589
18438 "This returns the architecture of the inspected operating system. The "
18439 "possible return values are listed under C<file-architecture>."
18443 #: ../fish/guestfish-actions.pod:1598
18444 msgid "inspect-get-distro"
18448 #: ../fish/guestfish-actions.pod:1600
18451 " inspect-get-distro root\n"
18456 #: ../fish/guestfish-actions.pod:1644
18457 msgid "inspect-get-filesystems"
18461 #: ../fish/guestfish-actions.pod:1646
18464 " inspect-get-filesystems root\n"
18469 #: ../fish/guestfish-actions.pod:1659
18471 "Please read L<guestfs(3)/INSPECTION> for more details. See also C<inspect-"
18472 "get-mountpoints>."
18476 #: ../fish/guestfish-actions.pod:1662
18477 msgid "inspect-get-major-version"
18481 #: ../fish/guestfish-actions.pod:1664
18484 " inspect-get-major-version root\n"
18489 #: ../fish/guestfish-actions.pod:1683
18490 msgid "inspect-get-minor-version"
18494 #: ../fish/guestfish-actions.pod:1685
18497 " inspect-get-minor-version root\n"
18502 #: ../fish/guestfish-actions.pod:1695
18504 "Please read L<guestfs(3)/INSPECTION> for more details. See also C<inspect-"
18505 "get-major-version>."
18509 #: ../fish/guestfish-actions.pod:1698
18510 msgid "inspect-get-mountpoints"
18514 #: ../fish/guestfish-actions.pod:1700
18517 " inspect-get-mountpoints root\n"
18522 #: ../fish/guestfish-actions.pod:1718
18524 "Please read L<guestfs(3)/INSPECTION> for more details. See also C<inspect-"
18525 "get-filesystems>."
18529 #: ../fish/guestfish-actions.pod:1721
18530 msgid "inspect-get-product-name"
18534 #: ../fish/guestfish-actions.pod:1723
18537 " inspect-get-product-name root\n"
18542 #: ../fish/guestfish-actions.pod:1738
18543 msgid "inspect-get-type"
18547 #: ../fish/guestfish-actions.pod:1740
18550 " inspect-get-type root\n"
18555 #: ../fish/guestfish-actions.pod:1769
18560 #: ../fish/guestfish-actions.pod:1771
18568 #: ../fish/guestfish-actions.pod:1786
18570 "You can pass the root string(s) returned to other C<inspect-get-*> functions "
18571 "in order to query further information about each operating system, such as "
18572 "the name and version."
18576 #: ../fish/guestfish-actions.pod:1791
18578 "This function uses other libguestfs features such as C<mount-ro> and "
18579 "C<umount-all> in order to mount and unmount filesystems and look at the "
18580 "contents. This should be called with no disks currently mounted. The "
18581 "function may also use Augeas, so any existing Augeas handle will be closed."
18585 #: ../fish/guestfish-actions.pod:1803
18590 #: ../fish/guestfish-actions.pod:1805
18598 #: ../fish/guestfish-actions.pod:1812
18603 #: ../fish/guestfish-actions.pod:1814
18611 #: ../fish/guestfish-actions.pod:1821
18616 #: ../fish/guestfish-actions.pod:1823
18624 #: ../fish/guestfish-actions.pod:1829 ../fish/guestfish-actions.pod:1839
18625 msgid "See also C<stat>."
18629 #: ../fish/guestfish-actions.pod:1831
18634 #: ../fish/guestfish-actions.pod:1833
18642 #: ../fish/guestfish-actions.pod:1841
18643 msgid "is-launching"
18647 #: ../fish/guestfish-actions.pod:1843
18655 #: ../fish/guestfish-actions.pod:1850
18660 #: ../fish/guestfish-actions.pod:1852
18668 #: ../fish/guestfish-actions.pod:1857
18673 #: ../fish/guestfish-actions.pod:1859
18681 #: ../fish/guestfish-actions.pod:1866
18682 msgid "kill-subprocess"
18686 #: ../fish/guestfish-actions.pod:1868
18689 " kill-subprocess\n"
18694 #: ../fish/guestfish-actions.pod:1872
18695 msgid "launch | run"
18699 #: ../fish/guestfish-actions.pod:1874
18707 #: ../fish/guestfish-actions.pod:1882
18712 #: ../fish/guestfish-actions.pod:1884
18715 " lchown owner group path\n"
18720 #: ../fish/guestfish-actions.pod:1886
18722 "Change the file owner to C<owner> and group to C<group>. This is like "
18723 "C<chown> but if C<path> is a symlink then the link itself is changed, not "
18728 #: ../fish/guestfish-actions.pod:1894
18733 #: ../fish/guestfish-actions.pod:1896
18736 " lgetxattrs path\n"
18741 #: ../fish/guestfish-actions.pod:1898
18743 "This is the same as C<getxattrs>, but if C<path> is a symbolic link, then it "
18744 "returns the extended attributes of the link itself."
18748 #: ../fish/guestfish-actions.pod:1902
18749 msgid "list-devices"
18753 #: ../fish/guestfish-actions.pod:1904
18761 #: ../fish/guestfish-actions.pod:1910
18762 msgid "list-partitions"
18766 #: ../fish/guestfish-actions.pod:1912
18769 " list-partitions\n"
18774 #: ../fish/guestfish-actions.pod:1918
18776 "This does not return logical volumes. For that you will need to call C<lvs>."
18780 #: ../fish/guestfish-actions.pod:1921
18785 #: ../fish/guestfish-actions.pod:1923
18793 #: ../fish/guestfish-actions.pod:1931
18798 #: ../fish/guestfish-actions.pod:1933
18801 " ln target linkname\n"
18806 #: ../fish/guestfish-actions.pod:1937
18811 #: ../fish/guestfish-actions.pod:1939
18814 " ln-f target linkname\n"
18819 #: ../fish/guestfish-actions.pod:1944
18824 #: ../fish/guestfish-actions.pod:1946
18827 " ln-s target linkname\n"
18832 #: ../fish/guestfish-actions.pod:1950
18837 #: ../fish/guestfish-actions.pod:1952
18840 " ln-sf target linkname\n"
18845 #: ../fish/guestfish-actions.pod:1957
18846 msgid "lremovexattr"
18850 #: ../fish/guestfish-actions.pod:1959
18853 " lremovexattr xattr path\n"
18858 #: ../fish/guestfish-actions.pod:1961
18860 "This is the same as C<removexattr>, but if C<path> is a symbolic link, then "
18861 "it removes an extended attribute of the link itself."
18865 #: ../fish/guestfish-actions.pod:1965
18870 #: ../fish/guestfish-actions.pod:1967
18878 #: ../fish/guestfish-actions.pod:1973
18880 "This command is mostly useful for interactive sessions. Programs should "
18881 "probably use C<readdir> instead."
18885 #: ../fish/guestfish-actions.pod:1976
18890 #: ../fish/guestfish-actions.pod:1978
18893 " lsetxattr xattr val vallen path\n"
18898 #: ../fish/guestfish-actions.pod:1980
18900 "This is the same as C<setxattr>, but if C<path> is a symbolic link, then it "
18901 "sets an extended attribute of the link itself."
18905 #: ../fish/guestfish-actions.pod:1984
18910 #: ../fish/guestfish-actions.pod:1986
18918 #: ../fish/guestfish-actions.pod:1990
18920 "This is the same as C<stat> except that if C<path> is a symbolic link, then "
18921 "the link is stat-ed, not the file it refers to."
18925 #: ../fish/guestfish-actions.pod:1996
18930 #: ../fish/guestfish-actions.pod:1998
18933 " lstatlist path 'names ...'\n"
18938 #: ../fish/guestfish-actions.pod:2000
18940 "This call allows you to perform the C<lstat> operation on multiple files, "
18941 "where all files are in the directory C<path>. C<names> is the list of files "
18942 "from this directory."
18946 #: ../fish/guestfish-actions.pod:2009
18948 "This call is intended for programs that want to efficiently list a directory "
18949 "contents without making many round-trips. See also C<lxattrlist> for a "
18950 "similarly efficient call for getting extended attributes. Very long "
18951 "directory listings might cause the protocol message size to be exceeded, "
18952 "causing this call to fail. The caller must split up such requests into "
18953 "smaller groups of names."
18957 #: ../fish/guestfish-actions.pod:2017
18958 msgid "luks-add-key"
18962 #: ../fish/guestfish-actions.pod:2019
18965 " luks-add-key device keyslot\n"
18970 #: ../fish/guestfish-actions.pod:2026
18972 "Note that if C<keyslot> already contains a key, then this command will "
18973 "fail. You have to use C<luks-kill-slot> first to remove that key."
18977 #: ../fish/guestfish-actions.pod:2030 ../fish/guestfish-actions.pod:2052
18978 #: ../fish/guestfish-actions.pod:2065 ../fish/guestfish-actions.pod:2079
18979 #: ../fish/guestfish-actions.pod:2102 ../fish/guestfish-actions.pod:2112
18981 "This command has one or more key or passphrase parameters. Guestfish will "
18982 "prompt for these separately."
18986 #: ../fish/guestfish-actions.pod:2033
18991 #: ../fish/guestfish-actions.pod:2035
18994 " luks-close device\n"
18999 #: ../fish/guestfish-actions.pod:2037
19001 "This closes a LUKS device that was created earlier by C<luks-open> or C<luks-"
19002 "open-ro>. The C<device> parameter must be the name of the LUKS mapping "
19003 "device (ie. C</dev/mapper/mapname>) and I<not> the name of the underlying "
19008 #: ../fish/guestfish-actions.pod:2043
19009 msgid "luks-format"
19013 #: ../fish/guestfish-actions.pod:2045
19016 " luks-format device keyslot\n"
19021 #: ../fish/guestfish-actions.pod:2058
19022 msgid "luks-format-cipher"
19026 #: ../fish/guestfish-actions.pod:2060
19029 " luks-format-cipher device keyslot cipher\n"
19034 #: ../fish/guestfish-actions.pod:2062
19036 "This command is the same as C<luks-format> but it also allows you to set the "
19041 #: ../fish/guestfish-actions.pod:2071
19042 msgid "luks-kill-slot"
19046 #: ../fish/guestfish-actions.pod:2073
19049 " luks-kill-slot device keyslot\n"
19054 #: ../fish/guestfish-actions.pod:2082
19059 #: ../fish/guestfish-actions.pod:2084
19062 " luks-open device mapname\n"
19067 #: ../fish/guestfish-actions.pod:2098
19069 "If this block device contains LVM volume groups, then calling C<vgscan> "
19070 "followed by C<vg-activate-all> will make them visible."
19074 #: ../fish/guestfish-actions.pod:2105
19075 msgid "luks-open-ro"
19079 #: ../fish/guestfish-actions.pod:2107
19082 " luks-open-ro device mapname\n"
19087 #: ../fish/guestfish-actions.pod:2109
19089 "This is the same as C<luks-open> except that a read-only mapping is created."
19093 #: ../fish/guestfish-actions.pod:2115
19098 #: ../fish/guestfish-actions.pod:2117
19101 " lvcreate logvol volgroup mbytes\n"
19106 #: ../fish/guestfish-actions.pod:2122
19107 msgid "lvm-clear-filter"
19111 #: ../fish/guestfish-actions.pod:2124
19114 " lvm-clear-filter\n"
19119 #: ../fish/guestfish-actions.pod:2126
19121 "This undoes the effect of C<lvm-set-filter>. LVM will be able to see every "
19126 #: ../fish/guestfish-actions.pod:2132
19127 msgid "lvm-remove-all"
19131 #: ../fish/guestfish-actions.pod:2134
19134 " lvm-remove-all\n"
19139 #: ../fish/guestfish-actions.pod:2142
19140 msgid "lvm-set-filter"
19144 #: ../fish/guestfish-actions.pod:2144
19147 " lvm-set-filter 'devices ...'\n"
19152 #: ../fish/guestfish-actions.pod:2169
19157 #: ../fish/guestfish-actions.pod:2171
19160 " lvremove device\n"
19165 #: ../fish/guestfish-actions.pod:2179
19170 #: ../fish/guestfish-actions.pod:2181
19173 " lvrename logvol newlogvol\n"
19178 #: ../fish/guestfish-actions.pod:2185
19183 #: ../fish/guestfish-actions.pod:2187
19186 " lvresize device mbytes\n"
19191 #: ../fish/guestfish-actions.pod:2193
19192 msgid "lvresize-free"
19196 #: ../fish/guestfish-actions.pod:2195
19199 " lvresize-free lv percent\n"
19204 #: ../fish/guestfish-actions.pod:2203
19209 #: ../fish/guestfish-actions.pod:2205
19217 #: ../fish/guestfish-actions.pod:2213
19218 msgid "See also C<lvs-full>."
19222 #: ../fish/guestfish-actions.pod:2215
19227 #: ../fish/guestfish-actions.pod:2217
19235 #: ../fish/guestfish-actions.pod:2222
19240 #: ../fish/guestfish-actions.pod:2224
19248 #: ../fish/guestfish-actions.pod:2228
19253 #: ../fish/guestfish-actions.pod:2230
19256 " lxattrlist path 'names ...'\n"
19261 #: ../fish/guestfish-actions.pod:2246
19263 "This call is intended for programs that want to efficiently list a directory "
19264 "contents without making many round-trips. See also C<lstatlist> for a "
19265 "similarly efficient call for getting standard stats. Very long directory "
19266 "listings might cause the protocol message size to be exceeded, causing this "
19267 "call to fail. The caller must split up such requests into smaller groups of "
19272 #: ../fish/guestfish-actions.pod:2254
19277 #: ../fish/guestfish-actions.pod:2256
19285 #: ../fish/guestfish-actions.pod:2260
19290 #: ../fish/guestfish-actions.pod:2262
19293 " mkdir-mode path mode\n"
19298 #: ../fish/guestfish-actions.pod:2271
19299 msgid "See also C<mkdir>, C<umask>"
19303 #: ../fish/guestfish-actions.pod:2273
19308 #: ../fish/guestfish-actions.pod:2275
19316 #: ../fish/guestfish-actions.pod:2280
19321 #: ../fish/guestfish-actions.pod:2282
19324 " mkdtemp template\n"
19329 #: ../fish/guestfish-actions.pod:2303
19334 #: ../fish/guestfish-actions.pod:2305
19337 " mke2fs-J fstype blocksize device journal\n"
19342 #: ../fish/guestfish-actions.pod:2313
19343 msgid "See also C<mke2journal>."
19347 #: ../fish/guestfish-actions.pod:2315
19352 #: ../fish/guestfish-actions.pod:2317
19355 " mke2fs-JL fstype blocksize device label\n"
19360 #: ../fish/guestfish-actions.pod:2322
19361 msgid "See also C<mke2journal-L>."
19365 #: ../fish/guestfish-actions.pod:2324
19370 #: ../fish/guestfish-actions.pod:2326
19373 " mke2fs-JU fstype blocksize device uuid\n"
19378 #: ../fish/guestfish-actions.pod:2331
19379 msgid "See also C<mke2journal-U>."
19383 #: ../fish/guestfish-actions.pod:2333
19384 msgid "mke2journal"
19388 #: ../fish/guestfish-actions.pod:2335
19391 " mke2journal blocksize device\n"
19396 #: ../fish/guestfish-actions.pod:2342
19397 msgid "mke2journal-L"
19401 #: ../fish/guestfish-actions.pod:2344
19404 " mke2journal-L blocksize label device\n"
19409 #: ../fish/guestfish-actions.pod:2348
19410 msgid "mke2journal-U"
19414 #: ../fish/guestfish-actions.pod:2350
19417 " mke2journal-U blocksize uuid device\n"
19422 #: ../fish/guestfish-actions.pod:2354
19427 #: ../fish/guestfish-actions.pod:2356
19430 " mkfifo mode path\n"
19435 #: ../fish/guestfish-actions.pod:2358
19437 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
19438 "is just a convenient wrapper around C<mknod>."
19442 #: ../fish/guestfish-actions.pod:2364
19447 #: ../fish/guestfish-actions.pod:2366
19450 " mkfs fstype device\n"
19455 #: ../fish/guestfish-actions.pod:2372
19460 #: ../fish/guestfish-actions.pod:2374
19463 " mkfs-b fstype blocksize device\n"
19468 #: ../fish/guestfish-actions.pod:2376
19470 "This call is similar to C<mkfs>, but it allows you to control the block size "
19471 "of the resulting filesystem. Supported block sizes depend on the filesystem "
19472 "type, but typically they are C<1024>, C<2048> or C<4096> only."
19476 #: ../fish/guestfish-actions.pod:2384
19477 msgid "mkmountpoint"
19481 #: ../fish/guestfish-actions.pod:2386
19484 " mkmountpoint exemptpath\n"
19489 #: ../fish/guestfish-actions.pod:2388
19491 "C<mkmountpoint> and C<rmmountpoint> are specialized calls that can be used "
19492 "to create extra mountpoints before mounting the first filesystem."
19496 #: ../fish/guestfish-actions.pod:2412
19501 #: ../fish/guestfish-actions.pod:2414
19504 " mknod mode devmajor devminor path\n"
19509 #: ../fish/guestfish-actions.pod:2424
19511 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
19512 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
19513 "regular file). These constants are available in the standard Linux header "
19514 "files, or you can use C<mknod-b>, C<mknod-c> or C<mkfifo> which are wrappers "
19515 "around this command which bitwise OR in the appropriate constant for you."
19519 #: ../fish/guestfish-actions.pod:2434
19524 #: ../fish/guestfish-actions.pod:2436
19527 " mknod-b mode devmajor devminor path\n"
19532 #: ../fish/guestfish-actions.pod:2438
19534 "This call creates a block device node called C<path> with mode C<mode> and "
19535 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
19536 "wrapper around C<mknod>."
19540 #: ../fish/guestfish-actions.pod:2444
19545 #: ../fish/guestfish-actions.pod:2446
19548 " mknod-c mode devmajor devminor path\n"
19553 #: ../fish/guestfish-actions.pod:2448
19555 "This call creates a char device node called C<path> with mode C<mode> and "
19556 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
19557 "wrapper around C<mknod>."
19561 #: ../fish/guestfish-actions.pod:2454
19566 #: ../fish/guestfish-actions.pod:2456
19574 #: ../fish/guestfish-actions.pod:2460
19579 #: ../fish/guestfish-actions.pod:2462
19582 " mkswap-L label device\n"
19587 #: ../fish/guestfish-actions.pod:2470
19592 #: ../fish/guestfish-actions.pod:2472
19595 " mkswap-U uuid device\n"
19600 #: ../fish/guestfish-actions.pod:2476
19601 msgid "mkswap-file"
19605 #: ../fish/guestfish-actions.pod:2478
19608 " mkswap-file path\n"
19613 #: ../fish/guestfish-actions.pod:2482
19615 "This command just writes a swap file signature to an existing file. To "
19616 "create the file itself, use something like C<fallocate>."
19620 #: ../fish/guestfish-actions.pod:2485
19625 #: ../fish/guestfish-actions.pod:2487
19628 " modprobe modulename\n"
19633 #: ../fish/guestfish-actions.pod:2494
19638 #: ../fish/guestfish-actions.pod:2496
19641 " mount device mountpoint\n"
19646 #: ../fish/guestfish-actions.pod:2512
19648 "B<Important note:> When you use this call, the filesystem options C<sync> "
19649 "and C<noatime> are set implicitly. This was originally done because we "
19650 "thought it would improve reliability, but it turns out that I<-o sync> has a "
19651 "very large negative performance impact and negligible effect on "
19652 "reliability. Therefore we recommend that you avoid using C<mount> in any "
19653 "code that needs performance, and instead use C<mount-options> (use an empty "
19654 "string for the first parameter if you don't want any options)."
19658 #: ../fish/guestfish-actions.pod:2522
19663 #: ../fish/guestfish-actions.pod:2524
19666 " mount-loop file mountpoint\n"
19671 #: ../fish/guestfish-actions.pod:2530
19672 msgid "mount-options"
19676 #: ../fish/guestfish-actions.pod:2532
19679 " mount-options options device mountpoint\n"
19684 #: ../fish/guestfish-actions.pod:2534
19686 "This is the same as the C<mount> command, but it allows you to set the mount "
19687 "options as for the L<mount(8)> I<-o> flag."
19691 #: ../fish/guestfish-actions.pod:2542
19696 #: ../fish/guestfish-actions.pod:2544
19699 " mount-ro device mountpoint\n"
19704 #: ../fish/guestfish-actions.pod:2546
19706 "This is the same as the C<mount> command, but it mounts the filesystem with "
19707 "the read-only (I<-o ro>) flag."
19711 #: ../fish/guestfish-actions.pod:2549
19716 #: ../fish/guestfish-actions.pod:2551
19719 " mount-vfs options vfstype device mountpoint\n"
19724 #: ../fish/guestfish-actions.pod:2553
19726 "This is the same as the C<mount> command, but it allows you to set both the "
19727 "mount options and the vfstype as for the L<mount(8)> I<-o> and I<-t> flags."
19731 #: ../fish/guestfish-actions.pod:2557
19732 msgid "mountpoints"
19736 #: ../fish/guestfish-actions.pod:2559
19744 #: ../fish/guestfish-actions.pod:2561
19746 "This call is similar to C<mounts>. That call returns a list of devices. "
19747 "This one returns a hash table (map) of device name to directory where the "
19748 "device is mounted."
19752 #: ../fish/guestfish-actions.pod:2565
19757 #: ../fish/guestfish-actions.pod:2567
19765 #: ../fish/guestfish-actions.pod:2574
19766 msgid "See also: C<mountpoints>"
19770 #: ../fish/guestfish-actions.pod:2576
19775 #: ../fish/guestfish-actions.pod:2578
19783 #: ../fish/guestfish-actions.pod:2583
19784 msgid "ntfs-3g-probe"
19788 #: ../fish/guestfish-actions.pod:2585
19791 " ntfs-3g-probe true|false device\n"
19796 #: ../fish/guestfish-actions.pod:2599
19801 #: ../fish/guestfish-actions.pod:2601
19804 " ntfsresize device\n"
19809 #: ../fish/guestfish-actions.pod:2607
19810 msgid "ntfsresize-size"
19814 #: ../fish/guestfish-actions.pod:2609
19817 " ntfsresize-size device size\n"
19822 #: ../fish/guestfish-actions.pod:2611
19824 "This command is the same as C<ntfsresize> except that it allows you to "
19825 "specify the new size (in bytes) explicitly."
19829 #: ../fish/guestfish-actions.pod:2614
19834 #: ../fish/guestfish-actions.pod:2616
19837 " part-add device prlogex startsect endsect\n"
19842 #: ../fish/guestfish-actions.pod:2618
19844 "This command adds a partition to C<device>. If there is no partition table "
19845 "on the device, call C<part-init> first."
19849 #: ../fish/guestfish-actions.pod:2630
19851 "Creating a partition which covers the whole disk is not so easy. Use C<part-"
19852 "disk> to do that."
19856 #: ../fish/guestfish-actions.pod:2633
19861 #: ../fish/guestfish-actions.pod:2635
19864 " part-del device partnum\n"
19869 #: ../fish/guestfish-actions.pod:2643
19874 #: ../fish/guestfish-actions.pod:2645
19877 " part-disk device parttype\n"
19882 #: ../fish/guestfish-actions.pod:2647
19884 "This command is simply a combination of C<part-init> followed by C<part-add> "
19885 "to create a single primary partition covering the whole disk."
19889 #: ../fish/guestfish-actions.pod:2651
19891 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
19892 "possible values are described in C<part-init>."
19896 #: ../fish/guestfish-actions.pod:2657
19897 msgid "part-get-bootable"
19901 #: ../fish/guestfish-actions.pod:2659
19904 " part-get-bootable device partnum\n"
19909 #: ../fish/guestfish-actions.pod:2664
19910 msgid "See also C<part-set-bootable>."
19914 #: ../fish/guestfish-actions.pod:2666
19915 msgid "part-get-mbr-id"
19919 #: ../fish/guestfish-actions.pod:2668
19922 " part-get-mbr-id device partnum\n"
19927 #: ../fish/guestfish-actions.pod:2673 ../fish/guestfish-actions.pod:2811
19929 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
19930 "undefined results for other partition table types (see C<part-get-parttype>)."
19934 #: ../fish/guestfish-actions.pod:2677
19935 msgid "part-get-parttype"
19939 #: ../fish/guestfish-actions.pod:2679
19942 " part-get-parttype device\n"
19947 #: ../fish/guestfish-actions.pod:2684
19949 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
19950 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
19951 "possible, although unusual. See C<part-init> for a full list."
19955 #: ../fish/guestfish-actions.pod:2689
19960 #: ../fish/guestfish-actions.pod:2691
19963 " part-init device parttype\n"
19968 #: ../fish/guestfish-actions.pod:2697
19970 "Initially there are no partitions. Following this, you should call C<part-"
19971 "add> for each partition required."
19975 #: ../fish/guestfish-actions.pod:2760
19980 #: ../fish/guestfish-actions.pod:2762
19983 " part-list device\n"
19988 #: ../fish/guestfish-actions.pod:2777
19990 "Start of the partition I<in bytes>. To get sectors you have to divide by "
19991 "the device's sector size, see C<blockdev-getss>."
19995 #: ../fish/guestfish-actions.pod:2790
19996 msgid "part-set-bootable"
20000 #: ../fish/guestfish-actions.pod:2792
20003 " part-set-bootable device partnum true|false\n"
20008 #: ../fish/guestfish-actions.pod:2801
20009 msgid "part-set-mbr-id"
20013 #: ../fish/guestfish-actions.pod:2803
20016 " part-set-mbr-id device partnum idbyte\n"
20021 #: ../fish/guestfish-actions.pod:2815
20022 msgid "part-set-name"
20026 #: ../fish/guestfish-actions.pod:2817
20029 " part-set-name device partnum name\n"
20034 #: ../fish/guestfish-actions.pod:2825
20035 msgid "ping-daemon"
20039 #: ../fish/guestfish-actions.pod:2827
20047 #: ../fish/guestfish-actions.pod:2834
20052 #: ../fish/guestfish-actions.pod:2836
20055 " pread path count offset\n"
20060 #: ../fish/guestfish-actions.pod:2844
20061 msgid "See also C<pwrite>."
20065 #: ../fish/guestfish-actions.pod:2849
20070 #: ../fish/guestfish-actions.pod:2851
20073 " pvcreate device\n"
20078 #: ../fish/guestfish-actions.pod:2857
20083 #: ../fish/guestfish-actions.pod:2859
20086 " pvremove device\n"
20091 #: ../fish/guestfish-actions.pod:2868
20096 #: ../fish/guestfish-actions.pod:2870
20099 " pvresize device\n"
20104 #: ../fish/guestfish-actions.pod:2875
20105 msgid "pvresize-size"
20109 #: ../fish/guestfish-actions.pod:2877
20112 " pvresize-size device size\n"
20117 #: ../fish/guestfish-actions.pod:2879
20119 "This command is the same as C<pvresize> except that it allows you to specify "
20120 "the new size (in bytes) explicitly."
20124 #: ../fish/guestfish-actions.pod:2882
20129 #: ../fish/guestfish-actions.pod:2884
20137 #: ../fish/guestfish-actions.pod:2892
20138 msgid "See also C<pvs-full>."
20142 #: ../fish/guestfish-actions.pod:2894
20147 #: ../fish/guestfish-actions.pod:2896
20155 #: ../fish/guestfish-actions.pod:2901
20160 #: ../fish/guestfish-actions.pod:2903
20168 #: ../fish/guestfish-actions.pod:2907
20173 #: ../fish/guestfish-actions.pod:2909
20176 " pwrite path content offset\n"
20181 #: ../fish/guestfish-actions.pod:2920
20182 msgid "See also C<pread>."
20186 #: ../fish/guestfish-actions.pod:2925
20191 #: ../fish/guestfish-actions.pod:2927
20194 " read-file path\n"
20199 #: ../fish/guestfish-actions.pod:2932
20201 "Unlike C<cat>, this function can correctly handle files that contain "
20202 "embedded ASCII NUL characters. However unlike C<download>, this function is "
20203 "limited in the total size of file that can be handled."
20207 #: ../fish/guestfish-actions.pod:2940
20212 #: ../fish/guestfish-actions.pod:2942
20215 " read-lines path\n"
20220 #: ../fish/guestfish-actions.pod:2949
20222 "Note that this function cannot correctly handle binary files (specifically, "
20223 "files containing C<\\0> character which is treated as end of line). For "
20224 "those you need to use the C<read-file> function which has a more complex "
20229 #: ../fish/guestfish-actions.pod:2954
20234 #: ../fish/guestfish-actions.pod:2956
20242 #: ../fish/guestfish-actions.pod:3008
20244 "This function is primarily intended for use by programs. To get a simple "
20245 "list of names, use C<ls>. To get a printable directory for human "
20246 "consumption, use C<ll>."
20250 #: ../fish/guestfish-actions.pod:3012
20255 #: ../fish/guestfish-actions.pod:3014
20263 #: ../fish/guestfish-actions.pod:3018
20264 msgid "readlinklist"
20268 #: ../fish/guestfish-actions.pod:3020
20271 " readlinklist path 'names ...'\n"
20276 #: ../fish/guestfish-actions.pod:3044
20281 #: ../fish/guestfish-actions.pod:3046
20289 #: ../fish/guestfish-actions.pod:3051
20290 msgid "removexattr"
20294 #: ../fish/guestfish-actions.pod:3053
20297 " removexattr xattr path\n"
20302 #: ../fish/guestfish-actions.pod:3058
20303 msgid "See also: C<lremovexattr>, L<attr(5)>."
20307 #: ../fish/guestfish-actions.pod:3060
20312 #: ../fish/guestfish-actions.pod:3062
20315 " resize2fs device\n"
20320 #: ../fish/guestfish-actions.pod:3067
20322 "I<Note:> It is sometimes required that you run C<e2fsck-f> on the C<device> "
20323 "before calling this command. For unknown reasons C<resize2fs> sometimes "
20324 "gives an error about this and sometimes not. In any case, it is always safe "
20325 "to call C<e2fsck-f> before calling this function."
20329 #: ../fish/guestfish-actions.pod:3073
20330 msgid "resize2fs-size"
20334 #: ../fish/guestfish-actions.pod:3075
20337 " resize2fs-size device size\n"
20342 #: ../fish/guestfish-actions.pod:3077
20344 "This command is the same as C<resize2fs> except that it allows you to "
20345 "specify the new size (in bytes) explicitly."
20349 #: ../fish/guestfish-actions.pod:3080
20354 #: ../fish/guestfish-actions.pod:3082
20362 #: ../fish/guestfish-actions.pod:3086
20367 #: ../fish/guestfish-actions.pod:3088
20375 #: ../fish/guestfish-actions.pod:3094
20380 #: ../fish/guestfish-actions.pod:3096
20388 #: ../fish/guestfish-actions.pod:3100
20389 msgid "rmmountpoint"
20393 #: ../fish/guestfish-actions.pod:3102
20396 " rmmountpoint exemptpath\n"
20401 #: ../fish/guestfish-actions.pod:3104
20403 "This calls removes a mountpoint that was previously created with "
20404 "C<mkmountpoint>. See C<mkmountpoint> for full details."
20408 #: ../fish/guestfish-actions.pod:3108
20409 msgid "scrub-device"
20413 #: ../fish/guestfish-actions.pod:3110
20416 " scrub-device device\n"
20421 #: ../fish/guestfish-actions.pod:3121
20426 #: ../fish/guestfish-actions.pod:3123
20429 " scrub-file file\n"
20434 #: ../fish/guestfish-actions.pod:3133
20435 msgid "scrub-freespace"
20439 #: ../fish/guestfish-actions.pod:3135
20442 " scrub-freespace dir\n"
20447 #: ../fish/guestfish-actions.pod:3137
20449 "This command creates the directory C<dir> and then fills it with files until "
20450 "the filesystem is full, and scrubs the files as for C<scrub-file>, and "
20451 "deletes them. The intention is to scrub any free space on the partition "
20452 "containing C<dir>."
20456 #: ../fish/guestfish-actions.pod:3146
20457 msgid "set-append | append"
20461 #: ../fish/guestfish-actions.pod:3148
20464 " set-append append\n"
20469 #: ../fish/guestfish-actions.pod:3159
20470 msgid "set-autosync | autosync"
20474 #: ../fish/guestfish-actions.pod:3161
20477 " set-autosync true|false\n"
20482 #: ../fish/guestfish-actions.pod:3163
20484 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
20485 "effort attempt to run C<umount-all> followed by C<sync> when the handle is "
20486 "closed (also if the program exits without closing handles)."
20490 #: ../fish/guestfish-actions.pod:3171
20491 msgid "set-direct | direct"
20495 #: ../fish/guestfish-actions.pod:3173
20498 " set-direct true|false\n"
20503 #: ../fish/guestfish-actions.pod:3179
20505 "One consequence of this is that log messages aren't caught by the library "
20506 "and handled by C<set-log-message-callback>, but go straight to stdout."
20510 #: ../fish/guestfish-actions.pod:3188
20511 msgid "set-e2label"
20515 #: ../fish/guestfish-actions.pod:3190
20518 " set-e2label device label\n"
20523 #: ../fish/guestfish-actions.pod:3196
20525 "You can use either C<tune2fs-l> or C<get-e2label> to return the existing "
20526 "label on a filesystem."
20530 #: ../fish/guestfish-actions.pod:3199
20535 #: ../fish/guestfish-actions.pod:3201
20538 " set-e2uuid device uuid\n"
20543 #: ../fish/guestfish-actions.pod:3208
20545 "You can use either C<tune2fs-l> or C<get-e2uuid> to return the existing UUID "
20550 #: ../fish/guestfish-actions.pod:3211
20551 msgid "set-memsize | memsize"
20555 #: ../fish/guestfish-actions.pod:3213
20558 " set-memsize memsize\n"
20563 #: ../fish/guestfish-actions.pod:3215
20565 "This sets the memory size in megabytes allocated to the qemu subprocess. "
20566 "This only has any effect if called before C<launch>."
20570 #: ../fish/guestfish-actions.pod:3226
20571 msgid "set-network | network"
20575 #: ../fish/guestfish-actions.pod:3228
20578 " set-network true|false\n"
20583 #: ../fish/guestfish-actions.pod:3236
20585 "You must call this before calling C<launch>, otherwise it has no effect."
20589 #: ../fish/guestfish-actions.pod:3239
20590 msgid "set-path | path"
20594 #: ../fish/guestfish-actions.pod:3241
20597 " set-path searchpath\n"
20602 #: ../fish/guestfish-actions.pod:3250
20603 msgid "set-qemu | qemu"
20607 #: ../fish/guestfish-actions.pod:3252
20615 #: ../fish/guestfish-actions.pod:3272
20616 msgid "set-recovery-proc | recovery-proc"
20620 #: ../fish/guestfish-actions.pod:3274
20623 " set-recovery-proc true|false\n"
20628 #: ../fish/guestfish-actions.pod:3276
20630 "If this is called with the parameter C<false> then C<launch> does not create "
20631 "a recovery process. The purpose of the recovery process is to stop runaway "
20632 "qemu processes in the case where the main program aborts abruptly."
20636 #: ../fish/guestfish-actions.pod:3281
20638 "This only has any effect if called before C<launch>, and the default is true."
20642 #: ../fish/guestfish-actions.pod:3290
20643 msgid "set-selinux | selinux"
20647 #: ../fish/guestfish-actions.pod:3292
20650 " set-selinux true|false\n"
20655 #: ../fish/guestfish-actions.pod:3303
20656 msgid "set-trace | trace"
20660 #: ../fish/guestfish-actions.pod:3305
20663 " set-trace true|false\n"
20668 #: ../fish/guestfish-actions.pod:3321
20669 msgid "set-verbose | verbose"
20673 #: ../fish/guestfish-actions.pod:3323
20676 " set-verbose true|false\n"
20681 #: ../fish/guestfish-actions.pod:3330
20686 #: ../fish/guestfish-actions.pod:3332
20689 " setcon context\n"
20694 #: ../fish/guestfish-actions.pod:3339
20699 #: ../fish/guestfish-actions.pod:3341
20702 " setxattr xattr val vallen path\n"
20707 #: ../fish/guestfish-actions.pod:3347
20708 msgid "See also: C<lsetxattr>, L<attr(5)>."
20712 #: ../fish/guestfish-actions.pod:3349
20717 #: ../fish/guestfish-actions.pod:3351
20720 " sfdisk device cyls heads sectors 'lines ...'\n"
20725 #: ../fish/guestfish-actions.pod:3373
20726 msgid "See also: C<sfdisk-l>, C<sfdisk-N>, C<part-init>"
20730 #: ../fish/guestfish-actions.pod:3379
20735 #: ../fish/guestfish-actions.pod:3381
20738 " sfdiskM device 'lines ...'\n"
20743 #: ../fish/guestfish-actions.pod:3383
20745 "This is a simplified interface to the C<sfdisk> command, where partition "
20746 "sizes are specified in megabytes only (rounded to the nearest cylinder) and "
20747 "you don't need to specify the cyls, heads and sectors parameters which were "
20748 "rarely if ever used anyway."
20752 #: ../fish/guestfish-actions.pod:3389
20753 msgid "See also: C<sfdisk>, the L<sfdisk(8)> manpage and C<part-disk>"
20757 #: ../fish/guestfish-actions.pod:3395
20762 #: ../fish/guestfish-actions.pod:3397
20765 " sfdisk-N device partnum cyls heads sectors line\n"
20770 #: ../fish/guestfish-actions.pod:3402
20772 "For other parameters, see C<sfdisk>. You should usually pass C<0> for the "
20773 "cyls/heads/sectors parameters."
20777 #: ../fish/guestfish-actions.pod:3405
20778 msgid "See also: C<part-add>"
20782 #: ../fish/guestfish-actions.pod:3410
20783 msgid "sfdisk-disk-geometry"
20787 #: ../fish/guestfish-actions.pod:3412
20790 " sfdisk-disk-geometry device\n"
20795 #: ../fish/guestfish-actions.pod:3414
20797 "This displays the disk geometry of C<device> read from the partition table. "
20798 "Especially in the case where the underlying block device has been resized, "
20799 "this can be different from the kernel's idea of the geometry (see C<sfdisk-"
20800 "kernel-geometry>)."
20804 #: ../fish/guestfish-actions.pod:3422
20805 msgid "sfdisk-kernel-geometry"
20809 #: ../fish/guestfish-actions.pod:3424
20812 " sfdisk-kernel-geometry device\n"
20817 #: ../fish/guestfish-actions.pod:3431
20822 #: ../fish/guestfish-actions.pod:3433
20825 " sfdisk-l device\n"
20830 #: ../fish/guestfish-actions.pod:3439
20831 msgid "See also: C<part-list>"
20835 #: ../fish/guestfish-actions.pod:3441
20840 #: ../fish/guestfish-actions.pod:3443
20848 #: ../fish/guestfish-actions.pod:3448
20849 msgid "This is like C<command>, but passes the command to:"
20853 #: ../fish/guestfish-actions.pod:3456
20854 msgid "All the provisos about C<command> apply to this call."
20858 #: ../fish/guestfish-actions.pod:3458
20863 #: ../fish/guestfish-actions.pod:3460
20866 " sh-lines command\n"
20871 #: ../fish/guestfish-actions.pod:3462
20872 msgid "This is the same as C<sh>, but splits the result into a list of lines."
20876 #: ../fish/guestfish-actions.pod:3465
20877 msgid "See also: C<command-lines>"
20881 #: ../fish/guestfish-actions.pod:3467
20886 #: ../fish/guestfish-actions.pod:3469
20894 #: ../fish/guestfish-actions.pod:3473
20899 #: ../fish/guestfish-actions.pod:3475
20907 #: ../fish/guestfish-actions.pod:3481
20912 #: ../fish/guestfish-actions.pod:3483
20920 #: ../fish/guestfish-actions.pod:3491
20925 #: ../fish/guestfish-actions.pod:3493
20933 #: ../fish/guestfish-actions.pod:3501
20938 #: ../fish/guestfish-actions.pod:3503
20941 " strings-e encoding path\n"
20946 #: ../fish/guestfish-actions.pod:3505
20948 "This is like the C<strings> command, but allows you to specify the encoding "
20949 "of strings that are looked for in the source file C<path>."
20953 #: ../fish/guestfish-actions.pod:3515
20955 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
20956 "ISO-8859-X (this is what C<strings> uses)."
20960 #: ../fish/guestfish-actions.pod:3547
20961 msgid "swapoff-device"
20965 #: ../fish/guestfish-actions.pod:3549
20968 " swapoff-device device\n"
20973 #: ../fish/guestfish-actions.pod:3551
20975 "This command disables the libguestfs appliance swap device or partition "
20976 "named C<device>. See C<swapon-device>."
20980 #: ../fish/guestfish-actions.pod:3555
20981 msgid "swapoff-file"
20985 #: ../fish/guestfish-actions.pod:3557
20988 " swapoff-file file\n"
20993 #: ../fish/guestfish-actions.pod:3561
20994 msgid "swapoff-label"
20998 #: ../fish/guestfish-actions.pod:3563
21001 " swapoff-label label\n"
21006 #: ../fish/guestfish-actions.pod:3568
21007 msgid "swapoff-uuid"
21011 #: ../fish/guestfish-actions.pod:3570
21014 " swapoff-uuid uuid\n"
21019 #: ../fish/guestfish-actions.pod:3575
21020 msgid "swapon-device"
21024 #: ../fish/guestfish-actions.pod:3577
21027 " swapon-device device\n"
21032 #: ../fish/guestfish-actions.pod:3579
21034 "This command enables the libguestfs appliance to use the swap device or "
21035 "partition named C<device>. The increased memory is made available for all "
21036 "commands, for example those run using C<command> or C<sh>."
21040 #: ../fish/guestfish-actions.pod:3591
21041 msgid "swapon-file"
21045 #: ../fish/guestfish-actions.pod:3593
21048 " swapon-file file\n"
21053 #: ../fish/guestfish-actions.pod:3595
21055 "This command enables swap to a file. See C<swapon-device> for other notes."
21059 #: ../fish/guestfish-actions.pod:3598
21060 msgid "swapon-label"
21064 #: ../fish/guestfish-actions.pod:3600
21067 " swapon-label label\n"
21072 #: ../fish/guestfish-actions.pod:3602
21074 "This command enables swap to a labeled swap partition. See C<swapon-device> "
21079 #: ../fish/guestfish-actions.pod:3605
21080 msgid "swapon-uuid"
21084 #: ../fish/guestfish-actions.pod:3607
21087 " swapon-uuid uuid\n"
21092 #: ../fish/guestfish-actions.pod:3609
21094 "This command enables swap to a swap partition with the given UUID. See "
21095 "C<swapon-device> for other notes."
21099 #: ../fish/guestfish-actions.pod:3612
21104 #: ../fish/guestfish-actions.pod:3614
21112 #: ../fish/guestfish-actions.pod:3622
21117 #: ../fish/guestfish-actions.pod:3624
21125 #: ../fish/guestfish-actions.pod:3632
21130 #: ../fish/guestfish-actions.pod:3634
21133 " tail-n nrlines path\n"
21138 #: ../fish/guestfish-actions.pod:3647
21143 #: ../fish/guestfish-actions.pod:3649
21146 " tar-in (tarfile|-) directory\n"
21151 #: ../fish/guestfish-actions.pod:3654
21152 msgid "To upload a compressed tarball, use C<tgz-in> or C<txz-in>."
21156 #: ../fish/guestfish-actions.pod:3659
21161 #: ../fish/guestfish-actions.pod:3661
21164 " tar-out directory (tarfile|-)\n"
21169 #: ../fish/guestfish-actions.pod:3666
21170 msgid "To download a compressed tarball, use C<tgz-out> or C<txz-out>."
21174 #: ../fish/guestfish-actions.pod:3671
21179 #: ../fish/guestfish-actions.pod:3673
21182 " tgz-in (tarball|-) directory\n"
21187 #: ../fish/guestfish-actions.pod:3678
21188 msgid "To upload an uncompressed tarball, use C<tar-in>."
21192 #: ../fish/guestfish-actions.pod:3682
21197 #: ../fish/guestfish-actions.pod:3684
21200 " tgz-out directory (tarball|-)\n"
21205 #: ../fish/guestfish-actions.pod:3689
21206 msgid "To download an uncompressed tarball, use C<tar-out>."
21210 #: ../fish/guestfish-actions.pod:3693
21215 #: ../fish/guestfish-actions.pod:3695
21223 #: ../fish/guestfish-actions.pod:3704
21228 #: ../fish/guestfish-actions.pod:3706
21236 #: ../fish/guestfish-actions.pod:3711
21237 msgid "truncate-size"
21241 #: ../fish/guestfish-actions.pod:3713
21244 " truncate-size path size\n"
21249 #: ../fish/guestfish-actions.pod:3718
21251 "If the current file size is less than C<size> then the file is extended to "
21252 "the required size with zero bytes. This creates a sparse file (ie. disk "
21253 "blocks are not allocated for the file until you write to it). To create a "
21254 "non-sparse file of zeroes, use C<fallocate64> instead."
21258 #: ../fish/guestfish-actions.pod:3724
21263 #: ../fish/guestfish-actions.pod:3726
21266 " tune2fs-l device\n"
21271 #: ../fish/guestfish-actions.pod:3736
21276 #: ../fish/guestfish-actions.pod:3738
21279 " txz-in (tarball|-) directory\n"
21284 #: ../fish/guestfish-actions.pod:3745
21289 #: ../fish/guestfish-actions.pod:3747
21292 " txz-out directory (tarball|-)\n"
21297 #: ../fish/guestfish-actions.pod:3754
21302 #: ../fish/guestfish-actions.pod:3756
21310 #: ../fish/guestfish-actions.pod:3770
21311 msgid "See also C<get-umask>, L<umask(2)>, C<mknod>, C<mkdir>."
21315 #: ../fish/guestfish-actions.pod:3775
21316 msgid "umount | unmount"
21320 #: ../fish/guestfish-actions.pod:3777
21323 " umount pathordevice\n"
21328 #: ../fish/guestfish-actions.pod:3783
21329 msgid "umount-all | unmount-all"
21333 #: ../fish/guestfish-actions.pod:3785
21341 #: ../fish/guestfish-actions.pod:3791
21346 #: ../fish/guestfish-actions.pod:3793
21349 " upload (filename|-) remotefilename\n"
21354 #: ../fish/guestfish-actions.pod:3800
21355 msgid "See also C<download>."
21359 #: ../fish/guestfish-actions.pod:3804
21364 #: ../fish/guestfish-actions.pod:3806
21367 " utimens path atsecs atnsecs mtsecs mtnsecs\n"
21372 #: ../fish/guestfish-actions.pod:3825
21377 #: ../fish/guestfish-actions.pod:3827
21385 #: ../fish/guestfish-actions.pod:3854
21387 "I<Note:> Don't use this call to test for availability of features. In "
21388 "enterprise distributions we backport features from later versions into "
21389 "earlier versions, making this an unreliable way to test for features. Use "
21390 "C<available> instead."
21394 #: ../fish/guestfish-actions.pod:3860
21399 #: ../fish/guestfish-actions.pod:3862
21402 " vfs-label device\n"
21407 #: ../fish/guestfish-actions.pod:3869
21408 msgid "To find a filesystem from the label, use C<findfs-label>."
21412 #: ../fish/guestfish-actions.pod:3871
21417 #: ../fish/guestfish-actions.pod:3873
21420 " vfs-type device\n"
21425 #: ../fish/guestfish-actions.pod:3883
21430 #: ../fish/guestfish-actions.pod:3885
21433 " vfs-uuid device\n"
21438 #: ../fish/guestfish-actions.pod:3892
21439 msgid "To find a filesystem from the UUID, use C<findfs-uuid>."
21443 #: ../fish/guestfish-actions.pod:3894
21444 msgid "vg-activate"
21448 #: ../fish/guestfish-actions.pod:3896
21451 " vg-activate true|false 'volgroups ...'\n"
21456 #: ../fish/guestfish-actions.pod:3909
21457 msgid "vg-activate-all"
21461 #: ../fish/guestfish-actions.pod:3911
21464 " vg-activate-all true|false\n"
21469 #: ../fish/guestfish-actions.pod:3921
21474 #: ../fish/guestfish-actions.pod:3923
21477 " vgcreate volgroup 'physvols ...'\n"
21482 #: ../fish/guestfish-actions.pod:3928
21487 #: ../fish/guestfish-actions.pod:3930
21490 " vglvuuids vgname\n"
21495 #: ../fish/guestfish-actions.pod:3935
21497 "You can use this along with C<lvs> and C<lvuuid> calls to associate logical "
21498 "volumes and volume groups."
21502 #: ../fish/guestfish-actions.pod:3938
21503 msgid "See also C<vgpvuuids>."
21507 #: ../fish/guestfish-actions.pod:3940
21512 #: ../fish/guestfish-actions.pod:3942
21515 " vgpvuuids vgname\n"
21520 #: ../fish/guestfish-actions.pod:3947
21522 "You can use this along with C<pvs> and C<pvuuid> calls to associate physical "
21523 "volumes and volume groups."
21527 #: ../fish/guestfish-actions.pod:3950
21528 msgid "See also C<vglvuuids>."
21532 #: ../fish/guestfish-actions.pod:3952
21537 #: ../fish/guestfish-actions.pod:3954
21540 " vgremove vgname\n"
21545 #: ../fish/guestfish-actions.pod:3961
21550 #: ../fish/guestfish-actions.pod:3963
21553 " vgrename volgroup newvolgroup\n"
21558 #: ../fish/guestfish-actions.pod:3967
21563 #: ../fish/guestfish-actions.pod:3969
21571 #: ../fish/guestfish-actions.pod:3977
21572 msgid "See also C<vgs-full>."
21576 #: ../fish/guestfish-actions.pod:3979
21581 #: ../fish/guestfish-actions.pod:3981
21589 #: ../fish/guestfish-actions.pod:3986
21594 #: ../fish/guestfish-actions.pod:3988
21602 #: ../fish/guestfish-actions.pod:3993
21607 #: ../fish/guestfish-actions.pod:3995
21615 #: ../fish/guestfish-actions.pod:3999
21620 #: ../fish/guestfish-actions.pod:4001
21628 #: ../fish/guestfish-actions.pod:4006
21633 #: ../fish/guestfish-actions.pod:4008
21641 #: ../fish/guestfish-actions.pod:4013
21646 #: ../fish/guestfish-actions.pod:4015
21654 #: ../fish/guestfish-actions.pod:4020
21659 #: ../fish/guestfish-actions.pod:4022
21662 " write path content\n"
21667 #: ../fish/guestfish-actions.pod:4030
21672 #: ../fish/guestfish-actions.pod:4032
21675 " write-file path content size\n"
21680 #: ../fish/guestfish-actions.pod:4055
21685 #: ../fish/guestfish-actions.pod:4057
21688 " zegrep regex path\n"
21693 #: ../fish/guestfish-actions.pod:4065
21698 #: ../fish/guestfish-actions.pod:4067
21701 " zegrepi regex path\n"
21706 #: ../fish/guestfish-actions.pod:4075
21711 #: ../fish/guestfish-actions.pod:4077
21719 #: ../fish/guestfish-actions.pod:4085
21720 msgid "See also: C<zero-device>, C<scrub-device>."
21724 #: ../fish/guestfish-actions.pod:4087
21725 msgid "zero-device"
21729 #: ../fish/guestfish-actions.pod:4089
21732 " zero-device device\n"
21737 #: ../fish/guestfish-actions.pod:4091
21739 "This command writes zeroes over the entire C<device>. Compare with C<zero> "
21740 "which just zeroes the first few blocks of a device."
21744 #: ../fish/guestfish-actions.pod:4098
21749 #: ../fish/guestfish-actions.pod:4100
21752 " zerofree device\n"
21757 #: ../fish/guestfish-actions.pod:4113
21762 #: ../fish/guestfish-actions.pod:4115
21765 " zfgrep pattern path\n"
21770 #: ../fish/guestfish-actions.pod:4123
21775 #: ../fish/guestfish-actions.pod:4125
21778 " zfgrepi pattern path\n"
21783 #: ../fish/guestfish-actions.pod:4133
21788 #: ../fish/guestfish-actions.pod:4135
21791 " zfile meth path\n"
21796 #: ../fish/guestfish-actions.pod:4142
21798 "Since 1.0.63, use C<file> instead which can now process compressed files."
21802 #: ../fish/guestfish-actions.pod:4152
21807 #: ../fish/guestfish-actions.pod:4154
21810 " zgrep regex path\n"
21815 #: ../fish/guestfish-actions.pod:4162
21820 #: ../fish/guestfish-actions.pod:4164
21823 " zgrepi regex path\n"
21828 #: ../test-tool/libguestfs-test-tool.pod:5
21829 msgid "libguestfs-test-tool - End user tests for libguestfs"
21833 #: ../test-tool/libguestfs-test-tool.pod:9
21836 " libguestfs-test-tool [--options]\n"
21841 #: ../test-tool/libguestfs-test-tool.pod:13
21843 "libguestfs-test-tool is a test program shipped with libguestfs to end users "
21844 "and developers, to allow them to check basic libguestfs functionality is "
21845 "working. This is needed because libguestfs occasionally breaks for reasons "
21846 "beyond our control: usually because of changes in the underlying qemu or "
21847 "kernel packages, or the host environment."
21851 #: ../test-tool/libguestfs-test-tool.pod:20
21852 msgid "If you suspect a problem in libguestfs, then just run:"
21856 #: ../test-tool/libguestfs-test-tool.pod:22
21859 " libguestfs-test-tool\n"
21864 #: ../test-tool/libguestfs-test-tool.pod:24
21865 msgid "It will print lots of diagnostic messages."
21869 #: ../test-tool/libguestfs-test-tool.pod:26
21870 msgid "If it runs to completion successfully, you will see this near the end:"
21874 #: ../test-tool/libguestfs-test-tool.pod:28
21877 " ===== TEST FINISHED OK =====\n"
21882 #: ../test-tool/libguestfs-test-tool.pod:30
21883 msgid "and the test tool will exit with code 0."
21887 #: ../test-tool/libguestfs-test-tool.pod:32
21889 "If it fails (and/or exits with non-zero error code), please paste the "
21890 "B<complete, unedited> output of the test tool into a bug report. More "
21891 "information about reporting bugs can be found on the L<http://libguestfs.org/"
21896 #: ../test-tool/libguestfs-test-tool.pod:41
21901 #: ../test-tool/libguestfs-test-tool.pod:43
21902 msgid "Display short usage information and exit."
21906 #: ../test-tool/libguestfs-test-tool.pod:45
21907 msgid "I<--helper /path/to/libguestfs-test-tool-helper>"
21911 #: ../test-tool/libguestfs-test-tool.pod:47
21913 "Pass an alternate name for the helper program. libguestfs-test-tool will "
21914 "normally look in the C<$libexec> directory that was configured when the tool "
21919 #: ../test-tool/libguestfs-test-tool.pod:51
21920 msgid "I<--qemu qemu_binary>"
21924 #: ../test-tool/libguestfs-test-tool.pod:53
21926 "If you have downloaded another qemu binary, point this option at the full "
21927 "path of the binary to try it."
21931 #: ../test-tool/libguestfs-test-tool.pod:56
21932 msgid "I<--qemudir qemu_source_dir>"
21936 #: ../test-tool/libguestfs-test-tool.pod:58
21938 "If you have compiled qemu from source, point this option at the source "
21939 "directory to try it."
21943 #: ../test-tool/libguestfs-test-tool.pod:61
21944 msgid "I<--timeout N>"
21948 #: ../test-tool/libguestfs-test-tool.pod:63
21950 "Set the launch timeout to C<N> seconds. The default is 120 seconds which "
21951 "does not usually need to be adjusted unless your machine is very slow."
21955 #: ../test-tool/libguestfs-test-tool.pod:69
21956 msgid "TRYING OUT A DIFFERENT VERSION OF QEMU"
21960 #: ../test-tool/libguestfs-test-tool.pod:71
21962 "If you have compiled another version of qemu from source and would like to "
21963 "try that, then you can use the I<--qemudir> option to point to the qemu "
21964 "source directory."
21968 #: ../test-tool/libguestfs-test-tool.pod:75
21970 "If you have downloaded a qemu binary from somewhere, use the I<--qemu> "
21971 "option to point to the binary."
21975 #: ../test-tool/libguestfs-test-tool.pod:78
21977 "When using an alternate qemu with libguestfs, usually you would need to "
21978 "write a qemu wrapper script (see section I<QEMU WRAPPERS> in L<guestfs(3)"
21979 ">). libguestfs-test-tool writes a temporary qemu wrapper script when you "
21980 "use either of the I<--qemudir> or I<--qemu> options."
21984 #: ../test-tool/libguestfs-test-tool.pod:85
21986 "libguestfs-test-tool returns I<0> if the tests completed without error, or "
21987 "I<1> if there was an error."
21991 #: ../test-tool/libguestfs-test-tool.pod:92
21992 msgid "/usr/libexec/libguestfs-test-tool-helper"
21996 #: ../test-tool/libguestfs-test-tool.pod:94
21998 "This helper program is run inside the appliance and provides additional "
22003 #: ../test-tool/libguestfs-test-tool.pod:97
22004 msgid "/usr/bin/mkisofs"
22008 #: ../test-tool/libguestfs-test-tool.pod:99
22010 "The C<mkisofs> command is required in order to construct a CD-ROM ISO file "
22011 "which is used as part of the tests."
22015 #: ../test-tool/libguestfs-test-tool.pod:106
22017 "For the full list of environment variables which may affect libguestfs, "
22018 "please see the L<guestfs(3)> manual page."
22022 #: ../test-tool/libguestfs-test-tool.pod:111
22023 msgid "L<guestfs(3)>, L<http://libguestfs.org/>, L<http://qemu.org/>."
22027 #: ../test-tool/libguestfs-test-tool.pod:121 ../fuse/guestmount.pod:195
22028 msgid "Copyright (C) 2009 Red Hat Inc. L<http://libguestfs.org/>"
22032 #: ../fuse/guestmount.pod:5
22034 "guestmount - Mount a guest filesystem on the host using FUSE and libguestfs"
22038 #: ../fuse/guestmount.pod:9
22041 " guestmount [--options] -a disk.img -m device [--ro] mountpoint\n"
22046 #: ../fuse/guestmount.pod:13
22048 "You must I<not> use C<guestmount> in read-write mode on live virtual "
22049 "machines. If you do this, you risk disk corruption in the VM."
22053 #: ../fuse/guestmount.pod:18
22055 "The guestmount program can be used to mount virtual machine filesystems and "
22056 "other disk images on the host. It uses libguestfs for access to the guest "
22057 "filesystem, and FUSE (the \"filesystem in userspace\") to make it appear as "
22058 "a mountable device."
22062 #: ../fuse/guestmount.pod:23
22064 "Along with other options, you have to give at least one device (I<-a> "
22065 "option) and at least one mountpoint (I<-m> option). How this works is "
22066 "better explained in the L<guestfish(1)> manual page, or you can use L<virt-"
22067 "inspector(1)> and/or the wrapper script C<guestmount-wrapper> to help you."
22071 #: ../fuse/guestmount.pod:29
22073 "FUSE lets you mount filesystems as non-root. The mountpoint must be owned "
22074 "by you, and the filesystem will not be visible to any other users unless you "
22075 "make certain global configuration changes to C</etc/fuse.conf>. To unmount "
22076 "the filesystem, use the C<fusermount -u> command."
22080 #: ../fuse/guestmount.pod:37
22082 "For a typical Windows guest which has its main filesystem on the first "
22087 #: ../fuse/guestmount.pod:40
22090 " guestmount -a windows.img -m /dev/sda1 --ro /mnt\n"
22095 #: ../fuse/guestmount.pod:42
22097 "For a typical Linux guest which has a /boot filesystem on the first "
22098 "partition, and the root filesystem on a logical volume:"
22102 #: ../fuse/guestmount.pod:45
22105 " guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot --ro /mnt\n"
22110 #: ../fuse/guestmount.pod:47
22112 "To get L<virt-inspector(1)> to do the hard work of detecting guest "
22113 "mountpoints for you:"
22117 #: ../fuse/guestmount.pod:50
22120 " guestmount $(virt-inspector --ro-fish MyGuest) /mnt\n"
22125 #: ../fuse/guestmount.pod:52
22127 "(or use --fish if you don't want it to be a read only mount). The option is "
22128 "called I<--ro-fish> or I<--fish> because these parameters are compatible "
22129 "with L<guestfish(1)>."
22133 #: ../fuse/guestmount.pod:56
22135 "If you don't know what filesystems are contained in a guest or disk image, "
22136 "use L<virt-list-filesystems(1)> first:"
22140 #: ../fuse/guestmount.pod:59
22143 " virt-list-filesystems MyGuest\n"
22148 #: ../fuse/guestmount.pod:61
22150 "If you want to trace the libguestfs calls but without excessive debugging, "
22155 #: ../fuse/guestmount.pod:64
22158 " guestmount [-a ... -m ...] --trace /mnt\n"
22163 #: ../fuse/guestmount.pod:66
22164 msgid "If you want to debug the program, we recommend:"
22168 #: ../fuse/guestmount.pod:68
22171 " guestmount [-a ... -m ...] --trace --verbose /mnt\n"
22176 #: ../fuse/guestmount.pod:76
22177 msgid "Add a block device or virtual machine image."
22181 #: ../fuse/guestmount.pod:78
22182 msgid "B<--dir-cache-timeout N>"
22186 #: ../fuse/guestmount.pod:80
22188 "Set the readdir cache timeout to I<N> seconds, the default being 60 "
22189 "seconds. The readdir cache [actually, there are several semi-independent "
22190 "caches] is populated after a readdir(2) call with the stat and extended "
22191 "attributes of the files in the directory, in anticipation that they will be "
22192 "requested soon after."
22196 #: ../fuse/guestmount.pod:86
22198 "There is also a different attribute cache implemented by FUSE (see the FUSE "
22199 "option I<-o attr_timeout>), but the FUSE cache does not anticipate future "
22200 "requests, only cache existing ones."
22204 #: ../fuse/guestmount.pod:90
22205 msgid "B<--fuse-help>"
22209 #: ../fuse/guestmount.pod:92
22210 msgid "Display help on special FUSE options (see I<-o> below)."
22214 #: ../fuse/guestmount.pod:96
22215 msgid "Display brief help and exit."
22219 #: ../fuse/guestmount.pod:98
22220 msgid "B<-m dev[:mnt]> | B<--mount dev[:mnt]>"
22224 #: ../fuse/guestmount.pod:100
22226 "Mount the named partition or logical volume on the given mountpoint B<in the "
22227 "guest> (this has nothing to do with mountpoints in the host)."
22231 #: ../fuse/guestmount.pod:103
22233 "If the mountpoint is omitted, it defaults to C</>. You have to mount "
22234 "something on C</>."
22238 #: ../fuse/guestmount.pod:108
22240 "By default, we attempt to sync the guest disk when the FUSE mountpoint is "
22241 "unmounted. If you specify this option, then we don't attempt to sync the "
22242 "disk. See the discussion of autosync in the L<guestfs(3)> manpage."
22246 #: ../fuse/guestmount.pod:113
22247 msgid "B<-o option> | B<--option option>"
22251 #: ../fuse/guestmount.pod:115
22252 msgid "Pass extra options to FUSE."
22256 #: ../fuse/guestmount.pod:117
22258 "To get a list of all the extra options supported by FUSE, use the command "
22259 "below. Note that only the FUSE I<-o> options can be passed, and only some "
22260 "of them are a good idea."
22264 #: ../fuse/guestmount.pod:121
22267 " guestmount --fuse-help\n"
22272 #: ../fuse/guestmount.pod:123
22273 msgid "Some potentially useful FUSE options:"
22277 #: ../fuse/guestmount.pod:127
22278 msgid "B<-o allow_other>"
22282 #: ../fuse/guestmount.pod:129
22283 msgid "Allow other users to see the filesystem."
22287 #: ../fuse/guestmount.pod:131
22288 msgid "B<-o attr_timeout=N>"
22292 #: ../fuse/guestmount.pod:133
22293 msgid "Enable attribute caching by FUSE, and set the timeout to I<N> seconds."
22297 #: ../fuse/guestmount.pod:135
22298 msgid "B<-o kernel_cache>"
22302 #: ../fuse/guestmount.pod:137
22304 "Allow the kernel to cache files (reduces the number of reads that have to go "
22305 "through the L<guestfs(3)> API). This is generally a good idea if you can "
22306 "afford the extra memory usage."
22310 #: ../fuse/guestmount.pod:141
22311 msgid "B<-o uid=N> B<-o gid=N>"
22315 #: ../fuse/guestmount.pod:143
22317 "Use these options to map all UIDs and GIDs inside the guest filesystem to "
22318 "the chosen values."
22322 #: ../fuse/guestmount.pod:150
22324 "Add devices and mount everything read-only. Also disallow writes and make "
22325 "the disk appear read-only to FUSE."
22329 #: ../fuse/guestmount.pod:153
22331 "This is highly recommended if you are not going to edit the guest disk. If "
22332 "the guest is running and this option is I<not> supplied, then there is a "
22333 "strong risk of disk corruption in the guest. We try to prevent this from "
22334 "happening, but it is not always possible."
22338 #: ../fuse/guestmount.pod:160
22339 msgid "Enable SELinux support for the guest."
22343 #: ../fuse/guestmount.pod:162
22348 #: ../fuse/guestmount.pod:164
22349 msgid "Trace libguestfs calls (to stderr)."
22353 #: ../fuse/guestmount.pod:166
22354 msgid "This also stops the daemon from forking into the background."
22358 #: ../fuse/guestmount.pod:170
22359 msgid "Enable verbose messages from underlying libguestfs."
22363 #: ../fuse/guestmount.pod:174
22364 msgid "Display the program version and exit."
22368 #: ../fuse/guestmount.pod:180
22370 "L<guestfish(1)>, L<virt-inspector(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
22371 "L<virt-tar(1)>, L<guestfs(3)>, L<http://libguestfs.org/>, L<http://fuse.sf."
22376 #: ../inspector/virt-inspector.pl:40
22378 "virt-inspector - Display OS version, kernel, drivers, mount points, "
22379 "applications, etc. in a virtual machine"
22383 #: ../inspector/virt-inspector.pl:44
22386 " virt-inspector [--connect URI] domname\n"
22391 #: ../inspector/virt-inspector.pl:46
22394 " virt-inspector guest.img [guest.img ...]\n"
22399 #: ../inspector/virt-inspector.pl:50
22401 "B<virt-inspector> examines a virtual machine and tries to determine the "
22402 "version of the OS, the kernel version, what drivers are installed, whether "
22403 "the virtual machine is fully virtualized (FV) or para-virtualized (PV), what "
22404 "applications are installed and more."
22408 #: ../inspector/virt-inspector.pl:55
22410 "Virt-inspector can produce output in several formats, including a readable "
22411 "text report, and XML for feeding into other programs."
22415 #: ../inspector/virt-inspector.pl:58
22417 "In the normal usage, use C<virt-inspector domname> where C<domname> is the "
22418 "libvirt domain (see: C<virsh list --all>)."
22422 #: ../inspector/virt-inspector.pl:61
22424 "You can also run virt-inspector directly on disk images from a single "
22425 "virtual machine. Use C<virt-inspector guest.img>. In rare cases a domain "
22426 "has several block devices, in which case you should list them one after "
22427 "another, with the first corresponding to the guest's C</dev/sda>, the second "
22428 "to the guest's C</dev/sdb> and so on."
22432 #: ../inspector/virt-inspector.pl:67
22434 "Virt-inspector can only inspect and report upon I<one domain at a time>. To "
22435 "inspect several virtual machines, you have to run virt-inspector several "
22436 "times (for example, from a shell script for-loop)."
22440 #: ../inspector/virt-inspector.pl:72
22442 "Because virt-inspector needs direct access to guest images, it won't "
22443 "normally work over remote libvirt connections."
22447 #: ../inspector/virt-inspector.pl:85 ../tools/virt-cat.pl:90
22448 #: ../tools/virt-df.pl:81 ../tools/virt-edit.pl:83
22449 #: ../tools/virt-list-filesystems.pl:60 ../tools/virt-list-partitions.pl:61
22450 #: ../tools/virt-ls.pl:89 ../tools/virt-make-fs.pl:163
22451 #: ../tools/virt-rescue.pl:113 ../tools/virt-tar.pl:109
22452 #: ../tools/virt-win-reg.pl:182
22453 msgid "Display brief help."
22457 #: ../inspector/virt-inspector.pl:91 ../tools/virt-cat.pl:96
22458 #: ../tools/virt-df.pl:87 ../tools/virt-edit.pl:89
22459 #: ../tools/virt-list-filesystems.pl:66 ../tools/virt-list-partitions.pl:67
22460 #: ../tools/virt-ls.pl:95 ../tools/virt-make-fs.pl:169
22461 #: ../tools/virt-rescue.pl:119 ../tools/virt-resize.pl:249
22462 #: ../tools/virt-tar.pl:115 ../tools/virt-win-reg.pl:188
22463 msgid "B<--version>"
22467 #: ../inspector/virt-inspector.pl:93 ../tools/virt-cat.pl:98
22468 #: ../tools/virt-df.pl:89 ../tools/virt-edit.pl:91
22469 #: ../tools/virt-list-filesystems.pl:68 ../tools/virt-list-partitions.pl:69
22470 #: ../tools/virt-ls.pl:97 ../tools/virt-make-fs.pl:171
22471 #: ../tools/virt-rescue.pl:121 ../tools/virt-resize.pl:251
22472 #: ../tools/virt-tar.pl:117 ../tools/virt-win-reg.pl:190
22473 msgid "Display version number and exit."
22477 #: ../inspector/virt-inspector.pl:99 ../tools/virt-cat.pl:104
22478 #: ../tools/virt-df.pl:95 ../tools/virt-edit.pl:113
22479 #: ../tools/virt-list-filesystems.pl:74 ../tools/virt-list-partitions.pl:75
22480 #: ../tools/virt-ls.pl:103 ../tools/virt-rescue.pl:135
22481 #: ../tools/virt-tar.pl:123 ../tools/virt-win-reg.pl:204
22482 msgid "B<--connect URI> | B<-c URI>"
22486 #: ../inspector/virt-inspector.pl:101 ../tools/virt-cat.pl:106
22487 #: ../tools/virt-df.pl:97 ../tools/virt-edit.pl:115
22488 #: ../tools/virt-list-filesystems.pl:76 ../tools/virt-list-partitions.pl:77
22489 #: ../tools/virt-ls.pl:105 ../tools/virt-rescue.pl:137
22490 #: ../tools/virt-tar.pl:125 ../tools/virt-win-reg.pl:206
22492 "If using libvirt, connect to the given I<URI>. If omitted, then we connect "
22493 "to the default libvirt hypervisor."
22497 #: ../inspector/virt-inspector.pl:104
22499 "Libvirt is only used if you specify a C<domname> on the command line. If "
22500 "you specify guest block devices directly, then libvirt is not used at all."
22504 #: ../inspector/virt-inspector.pl:114
22506 "The following options select the output format. Use only one of them. The "
22507 "default is a readable text report."
22511 #: ../inspector/virt-inspector.pl:119
22512 msgid "B<--text> (default)"
22516 #: ../inspector/virt-inspector.pl:121
22517 msgid "Plain text report."
22521 #: ../inspector/virt-inspector.pl:123
22526 #: ../inspector/virt-inspector.pl:125
22527 msgid "Produce no output at all."
22531 #: ../inspector/virt-inspector.pl:127
22536 #: ../inspector/virt-inspector.pl:129
22538 "If you select I<--xml> then you get XML output which can be fed to other "
22543 #: ../inspector/virt-inspector.pl:132
22548 #: ../inspector/virt-inspector.pl:134
22550 "If you select I<--yaml> then you get YAML output which can be fed to other "
22555 #: ../inspector/virt-inspector.pl:137
22560 #: ../inspector/virt-inspector.pl:139
22562 "If you select I<--perl> then you get Perl structures output which can be "
22563 "used directly in another Perl program."
22567 #: ../inspector/virt-inspector.pl:142
22572 #: ../inspector/virt-inspector.pl:144
22573 msgid "B<--ro-fish>"
22577 #: ../inspector/virt-inspector.pl:146
22579 "If you select I<--fish> then we print a L<guestfish(1)> command line which "
22580 "will automatically mount up the filesystems on the correct mount points. "
22581 "Try this for example:"
22585 #: ../inspector/virt-inspector.pl:150
22588 " guestfish $(virt-inspector --fish guest.img)\n"
22593 #: ../inspector/virt-inspector.pl:152
22595 "I<--ro-fish> is the same, but the I<--ro> option is passed to guestfish so "
22596 "that the filesystems are mounted read-only."
22600 #: ../inspector/virt-inspector.pl:155
22605 #: ../inspector/virt-inspector.pl:157
22607 "In \"query mode\" we answer common questions about the guest, such as "
22608 "whether it is fullvirt or needs a Xen hypervisor to run."
22612 #: ../inspector/virt-inspector.pl:160
22613 msgid "See section I<QUERY MODE> below."
22617 #: ../inspector/virt-inspector.pl:166
22618 msgid "B<--windows-registry>"
22622 #: ../inspector/virt-inspector.pl:168
22624 "This flag is ignored for compatibility with earlier releases of the software."
22628 #: ../inspector/virt-inspector.pl:171
22630 "In this version, if L<Win::Hivex(3)> is available, then we attempt to parse "
22631 "information out of the Registry for any Windows guest."
22635 #: ../inspector/virt-inspector.pl:218
22636 msgid "OUTPUT FORMAT"
22640 #: ../inspector/virt-inspector.pl:220
22643 " Operating system(s)\n"
22644 " -------------------\n"
22645 " Linux (distro + version)\n"
22646 " Windows (version)\n"
22649 " +--- Filesystems ---------- Installed apps --- Kernel & drivers\n"
22650 " ----------- -------------- ----------------\n"
22651 " mount point => device List of apps Extra information\n"
22652 " mount point => device and versions about kernel(s)\n"
22653 " ... and drivers\n"
22654 " swap => swap device\n"
22655 " (plus lots of extra information\n"
22656 " about each filesystem)\n"
22661 #: ../inspector/virt-inspector.pl:235
22662 msgid "The output of virt-inspector is a complex two-level data structure."
22666 #: ../inspector/virt-inspector.pl:237
22668 "At the top level is a list of the operating systems installed on the guest. "
22669 "(For the vast majority of guests, only a single OS is installed.) The data "
22670 "returned for the OS includes the name (Linux, Windows), the distribution and "
22675 #: ../inspector/virt-inspector.pl:242
22676 msgid "The diagram above shows what we return for each OS."
22680 #: ../inspector/virt-inspector.pl:244
22682 "With the I<--xml> option the output is mapped into an XML document. There "
22683 "is a RELAX-NG schema for this XML in the file I<virt-inspector.rng> which "
22684 "normally ships with virt-inspector, or can be found in the source."
22688 #: ../inspector/virt-inspector.pl:249
22690 "With the I<--fish> or I<--ro-fish> option the mount points are mapped to "
22691 "L<guestfish(1)> command line parameters, so that you can go in afterwards "
22692 "and inspect the guest with everything mounted in the right place. For "
22697 #: ../inspector/virt-inspector.pl:254
22700 " guestfish $(virt-inspector --ro-fish guest.img)\n"
22701 " ==> guestfish --ro -a guest.img -m /dev/VG/LV:/ -m /dev/sda1:/boot\n"
22706 #: ../inspector/virt-inspector.pl:589
22711 #: ../inspector/virt-inspector.pl:591
22713 "When you use C<virt-inspector --query>, the output is a series of lines of "
22718 #: ../inspector/virt-inspector.pl:594
22724 " xen_pv_drivers=no\n"
22729 #: ../inspector/virt-inspector.pl:599
22731 "(each answer is usually C<yes> or C<no>, or the line is completely missing "
22732 "if we could not determine the answer at all)."
22736 #: ../inspector/virt-inspector.pl:602
22738 "If the guest is multiboot, you can get apparently conflicting answers (eg. "
22739 "C<windows=yes> and C<linux=yes>, or a guest which is both fullvirt and has a "
22740 "Xen PV kernel). This is normal, and just means that the guest can do both "
22741 "things, although it might require operator intervention such as selecting a "
22742 "boot option when the guest is booting."
22746 #: ../inspector/virt-inspector.pl:609
22747 msgid "This section describes the full range of answers possible."
22751 #: ../inspector/virt-inspector.pl:630
22752 msgid "windows=(yes|no)"
22756 #: ../inspector/virt-inspector.pl:632
22757 msgid "Answer C<yes> if Microsoft Windows is installed in the guest."
22761 #: ../inspector/virt-inspector.pl:645
22762 msgid "linux=(yes|no)"
22766 #: ../inspector/virt-inspector.pl:647
22767 msgid "Answer C<yes> if a Linux kernel is installed in the guest."
22771 #: ../inspector/virt-inspector.pl:660
22772 msgid "rhel=(yes|no)"
22776 #: ../inspector/virt-inspector.pl:662
22777 msgid "Answer C<yes> if the guest contains Red Hat Enterprise Linux."
22781 #: ../inspector/virt-inspector.pl:676
22782 msgid "fedora=(yes|no)"
22786 #: ../inspector/virt-inspector.pl:678
22787 msgid "Answer C<yes> if the guest contains the Fedora Linux distribution."
22791 #: ../inspector/virt-inspector.pl:691
22792 msgid "debian=(yes|no)"
22796 #: ../inspector/virt-inspector.pl:693
22797 msgid "Answer C<yes> if the guest contains the Debian Linux distribution."
22801 #: ../inspector/virt-inspector.pl:706
22802 msgid "fullvirt=(yes|no)"
22806 #: ../inspector/virt-inspector.pl:708
22808 "Answer C<yes> if there is at least one operating system kernel installed in "
22809 "the guest which runs fully virtualized. Such a guest would require a "
22810 "hypervisor which supports full system virtualization."
22814 #: ../inspector/virt-inspector.pl:731
22815 msgid "xen_domU_kernel=(yes|no)"
22819 #: ../inspector/virt-inspector.pl:733
22821 "Answer C<yes> if there is at least one Linux kernel installed in the guest "
22822 "which is compiled as a Xen DomU (a Xen paravirtualized guest)."
22826 #: ../inspector/virt-inspector.pl:753
22827 msgid "xen_pv_drivers=(yes|no)"
22831 #: ../inspector/virt-inspector.pl:755
22833 "Answer C<yes> if the guest has Xen paravirtualized drivers installed "
22834 "(usually the kernel itself will be fully virtualized, but the PV drivers "
22835 "have been installed by the administrator for performance reasons)."
22839 #: ../inspector/virt-inspector.pl:777
22840 msgid "virtio_drivers=(yes|no)"
22844 #: ../inspector/virt-inspector.pl:779
22846 "Answer C<yes> if the guest has virtio paravirtualized drivers installed. "
22847 "Virtio drivers are commonly used to improve the performance of KVM."
22851 #: ../inspector/virt-inspector.pl:800
22852 msgid "userspace_arch=(x86_64|...)"
22856 #: ../inspector/virt-inspector.pl:802
22857 msgid "Print the architecture of userspace."
22861 #: ../inspector/virt-inspector.pl:804 ../inspector/virt-inspector.pl:825
22862 msgid "NB. For multi-boot VMs this can print several lines."
22866 #: ../inspector/virt-inspector.pl:821
22867 msgid "kernel_arch=(x86_64|...)"
22871 #: ../inspector/virt-inspector.pl:823
22872 msgid "Print the architecture of the kernel."
22876 #: ../inspector/virt-inspector.pl:848 ../tools/virt-df.pl:484
22878 "L<guestfs(3)>, L<guestfish(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
22879 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
22883 #: ../inspector/virt-inspector.pl:857 ../tools/virt-cat.pl:175
22884 #: ../tools/virt-df.pl:493 ../tools/virt-edit.pl:339
22885 #: ../tools/virt-list-filesystems.pl:205 ../tools/virt-list-partitions.pl:242
22886 #: ../tools/virt-ls.pl:223 ../tools/virt-make-fs.pl:554
22887 #: ../tools/virt-rescue.pl:243 ../tools/virt-resize.pl:1409
22888 #: ../tools/virt-tar.pl:270 ../tools/virt-win-reg.pl:489
22889 msgid "Richard W.M. Jones L<http://people.redhat.com/~rjones/>"
22893 #: ../inspector/virt-inspector.pl:859
22894 msgid "Matthew Booth L<mbooth@redhat.com>"
22898 #: ../inspector/virt-inspector.pl:863 ../tools/virt-cat.pl:179
22899 #: ../tools/virt-list-filesystems.pl:209 ../tools/virt-ls.pl:227
22900 #: ../tools/virt-tar.pl:274
22901 msgid "Copyright (C) 2009 Red Hat Inc."
22905 #: ../tools/virt-cat.pl:34
22906 msgid "virt-cat - Display a file in a virtual machine"
22910 #: ../tools/virt-cat.pl:38
22913 " virt-cat [--options] domname file\n"
22918 #: ../tools/virt-cat.pl:40
22921 " virt-cat [--options] disk.img [disk.img ...] file\n"
22926 #: ../tools/virt-cat.pl:44
22928 "C<virt-cat> is a command line tool to display the contents of C<file> where "
22929 "C<file> exists in the named virtual machine (or disk image)."
22933 #: ../tools/virt-cat.pl:47
22935 "C<virt-cat> can be used to quickly view a single file. To edit a file, use "
22936 "C<virt-edit>. For more complex cases you should look at the L<guestfish(1)> "
22941 #: ../tools/virt-cat.pl:53
22943 "Display C</etc/fstab> file from inside the libvirt VM called C<mydomain>:"
22947 #: ../tools/virt-cat.pl:56
22950 " virt-cat mydomain /etc/fstab\n"
22955 #: ../tools/virt-cat.pl:58
22956 msgid "List syslog messages from a VM:"
22960 #: ../tools/virt-cat.pl:60
22963 " virt-cat mydomain /var/log/messages | tail\n"
22968 #: ../tools/virt-cat.pl:62
22969 msgid "Find out what DHCP IP address a VM acquired:"
22973 #: ../tools/virt-cat.pl:64
22976 " virt-cat mydomain /var/log/messages | grep 'dhclient: bound to' | tail\n"
22981 #: ../tools/virt-cat.pl:66
22982 msgid "Find out what packages were recently installed:"
22986 #: ../tools/virt-cat.pl:68
22989 " virt-cat mydomain /var/log/yum.log | tail\n"
22994 #: ../tools/virt-cat.pl:70
22995 msgid "Find out who is logged on inside a virtual machine:"
22999 #: ../tools/virt-cat.pl:72
23002 " virt-cat mydomain /var/run/utmp > /tmp/utmp\n"
23008 #: ../tools/virt-cat.pl:75
23009 msgid "or who was logged on:"
23013 #: ../tools/virt-cat.pl:77
23016 " virt-cat mydomain /var/log/wtmp > /tmp/wtmp\n"
23017 " last -f /tmp/wtmp\n"
23022 #: ../tools/virt-cat.pl:109 ../tools/virt-df.pl:100 ../tools/virt-edit.pl:118
23023 #: ../tools/virt-list-filesystems.pl:79 ../tools/virt-list-partitions.pl:80
23024 #: ../tools/virt-ls.pl:108 ../tools/virt-rescue.pl:140
23025 #: ../tools/virt-tar.pl:128 ../tools/virt-win-reg.pl:209
23027 "If you specify guest block devices directly, then libvirt is not used at all."
23031 #: ../tools/virt-cat.pl:165
23033 "L<guestfs(3)>, L<guestfish(1)>, L<virt-edit(1)>, L<Sys::Guestfs(3)>, L<Sys::"
23034 "Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
23038 #: ../tools/virt-cat.pl:173 ../tools/virt-df.pl:491 ../tools/virt-edit.pl:337
23039 #: ../tools/virt-list-filesystems.pl:203 ../tools/virt-list-partitions.pl:240
23040 #: ../tools/virt-ls.pl:221 ../tools/virt-make-fs.pl:552
23041 #: ../tools/virt-rescue.pl:241 ../tools/virt-resize.pl:1407
23042 #: ../tools/virt-tar.pl:268 ../tools/virt-win-reg.pl:487
23047 #: ../tools/virt-df.pl:36
23048 msgid "virt-df - Display free space on virtual filesystems"
23052 #: ../tools/virt-df.pl:40
23055 " virt-df [--options]\n"
23060 #: ../tools/virt-df.pl:42
23063 " virt-df [--options] domname\n"
23068 #: ../tools/virt-df.pl:44
23071 " virt-df [--options] disk.img [disk.img ...]\n"
23076 #: ../tools/virt-df.pl:48
23078 "C<virt-df> is a command line tool to display free space on virtual machine "
23079 "filesystems. Unlike other tools, it doesn't just display the amount of "
23080 "space allocated to a virtual machine, but can look inside the virtual "
23081 "machine to see how much space is really being used."
23085 #: ../tools/virt-df.pl:53
23087 "It is like the L<df(1)> command, but for virtual machines, except that it "
23088 "also works for Windows virtual machines."
23092 #: ../tools/virt-df.pl:56
23094 "If used without any arguments, C<virt-df> checks with libvirt to get a list "
23095 "of all active and inactive guests, and performs a C<df>-type operation on "
23096 "each one in turn, printing out the results."
23100 #: ../tools/virt-df.pl:60
23102 "If used with any argument(s), C<virt-df> performs a C<df>-type operation on "
23103 "either the single named libvirt domain, or on the disk image(s) listed on "
23104 "the command line (which must all belong to a single VM). In this mode (with "
23105 "arguments), C<virt-df> will I<only work for a single guest>. If you want to "
23106 "run on multiple guests, then you have to invoke C<virt-df> multiple times."
23110 #: ../tools/virt-df.pl:67
23112 "Use the C<--csv> option to get a format which can be easily parsed by other "
23113 "programs. Other options are mostly similar to standard C<df> options. See "
23114 "below for the complete list."
23118 #: ../tools/virt-df.pl:107
23123 #: ../tools/virt-df.pl:109
23125 "Write out the results in CSV format (comma-separated values). This format "
23126 "can be imported easily into databases and spreadsheets, but read L</NOTE "
23127 "ABOUT CSV FORMAT> below."
23131 #: ../tools/virt-df.pl:117
23132 msgid "B<--human-readable> | B<-h>"
23136 #: ../tools/virt-df.pl:119
23137 msgid "Print sizes in human-readable format."
23141 #: ../tools/virt-df.pl:121
23142 msgid "You are not allowed to use I<-h> and I<--csv> at the same time."
23146 #: ../tools/virt-df.pl:127
23147 msgid "B<--inodes> | B<-i>"
23151 #: ../tools/virt-df.pl:129
23152 msgid "Print inodes instead of blocks."
23156 #: ../tools/virt-df.pl:458
23157 msgid "NOTE ABOUT CSV FORMAT"
23161 #: ../tools/virt-df.pl:460
23163 "Comma-separated values (CSV) is a deceptive format. It I<seems> like it "
23164 "should be easy to parse, but it is definitely not easy to parse."
23168 #: ../tools/virt-df.pl:463
23170 "Myth: Just split fields at commas. Reality: This does I<not> work "
23171 "reliably. This example has two columns:"
23175 #: ../tools/virt-df.pl:466
23178 " \"foo,bar\",baz\n"
23183 #: ../tools/virt-df.pl:468
23185 "Myth: Read the file one line at a time. Reality: This does I<not> work "
23186 "reliably. This example has one row:"
23190 #: ../tools/virt-df.pl:471
23199 #: ../tools/virt-df.pl:474
23201 "For shell scripts, use C<csvtool> (L<http://merjis.com/developers/csv> also "
23202 "packaged in major Linux distributions)."
23206 #: ../tools/virt-df.pl:477
23208 "For other languages, use a CSV processing library (eg. C<Text::CSV> for Perl "
23209 "or Python's built-in csv library)."
23213 #: ../tools/virt-df.pl:480
23214 msgid "Most spreadsheets and databases can import CSV directly."
23218 #: ../tools/virt-df.pl:497 ../tools/virt-edit.pl:343
23219 #: ../tools/virt-list-partitions.pl:246 ../tools/virt-rescue.pl:247
23220 msgid "Copyright (C) 2009-2010 Red Hat Inc."
23224 #: ../tools/virt-edit.pl:35
23225 msgid "virt-edit - Edit a file in a virtual machine"
23229 #: ../tools/virt-edit.pl:39
23232 " virt-edit [--options] domname file\n"
23237 #: ../tools/virt-edit.pl:41
23240 " virt-edit [--options] disk.img [disk.img ...] file\n"
23245 #: ../tools/virt-edit.pl:43
23248 " virt-edit [domname|disk.img] file -e 'expr'\n"
23253 #: ../tools/virt-edit.pl:47
23255 "You must I<not> use C<virt-edit> on live virtual machines. If you do this, "
23256 "you risk disk corruption in the VM. C<virt-edit> tries to stop you from "
23257 "doing this, but doesn't catch all cases."
23261 #: ../tools/virt-edit.pl:53
23263 "C<virt-edit> is a command line tool to edit C<file> where C<file> exists in "
23264 "the named virtual machine (or disk image)."
23268 #: ../tools/virt-edit.pl:56
23270 "If you want to just view a file, use L<virt-cat(1)>. For more complex cases "
23271 "you should look at the L<guestfish(1)> tool."
23275 #: ../tools/virt-edit.pl:61
23276 msgid "Edit the named files interactively:"
23280 #: ../tools/virt-edit.pl:63
23283 " virt-edit mydomain /boot/grub/grub.conf\n"
23288 #: ../tools/virt-edit.pl:65
23291 " virt-edit mydomain /etc/passwd\n"
23296 #: ../tools/virt-edit.pl:67
23298 "You can also edit files non-interactively (see L</NON-INTERACTIVE EDITING> "
23299 "below). To change the init default level to 5:"
23303 #: ../tools/virt-edit.pl:71
23306 " virt-edit mydomain /etc/inittab -e 's/^id:.*/id:5:initdefault:/'\n"
23311 #: ../tools/virt-edit.pl:97
23312 msgid "B<--backup extension> | B<-b extension>"
23316 #: ../tools/virt-edit.pl:99
23318 "Create a backup of the original file I<in the guest disk image>. The backup "
23319 "has the original filename with C<extension> added."
23323 #: ../tools/virt-edit.pl:102
23325 "Usually the first character of C<extension> would be a dot C<.> so you would "
23330 #: ../tools/virt-edit.pl:105
23333 " virt-edit -b .orig [etc]\n"
23338 #: ../tools/virt-edit.pl:107
23339 msgid "By default, no backup file is made."
23343 #: ../tools/virt-edit.pl:125
23344 msgid "B<--expr EXPR> | B<-e EXPR>"
23348 #: ../tools/virt-edit.pl:127
23350 "Instead of launching the external editor, non-interactively apply the Perl "
23351 "expression C<EXPR> to each line in the file. See L</NON-INTERACTIVE "
23356 #: ../tools/virt-edit.pl:131
23358 "Be careful to properly quote the expression to prevent it from being altered "
23363 #: ../tools/virt-edit.pl:250
23364 msgid "NON-INTERACTIVE EDITING"
23368 #: ../tools/virt-edit.pl:252
23370 "C<virt-edit> normally calls out to C<$EDITOR> (or vi) so the system "
23371 "administrator can interactively edit the file."
23375 #: ../tools/virt-edit.pl:255
23377 "There are two ways also to use C<virt-edit> from scripts in order to make "
23378 "automated edits to files. (Note that although you I<can> use C<virt-edit> "
23379 "like this, it's less error-prone to write scripts directly using the "
23380 "libguestfs API and Augeas for configuration file editing.)"
23384 #: ../tools/virt-edit.pl:261
23386 "The first method is to temporarily set C<$EDITOR> to any script or program "
23387 "you want to run. The script is invoked as C<$EDITOR tmpfile> and it should "
23388 "update C<tmpfile> in place however it likes."
23392 #: ../tools/virt-edit.pl:265
23394 "The second method is to use the C<-e> parameter of C<virt-edit> to run a "
23395 "short Perl snippet in the style of L<sed(1)>. For example to replace all "
23396 "instances of C<foo> with C<bar> in a file:"
23400 #: ../tools/virt-edit.pl:269
23403 " virt-edit domname filename -e 's/foo/bar/'\n"
23408 #: ../tools/virt-edit.pl:271
23410 "The full power of Perl regular expressions can be used (see L<perlre(1)>). "
23411 "For example to delete root's password you could do:"
23415 #: ../tools/virt-edit.pl:274
23418 " virt-edit domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
23423 #: ../tools/virt-edit.pl:276
23425 "What really happens is that the snippet is evaluated as a Perl expression "
23426 "for each line of the file. The line, including the final C<\\n>, is passed "
23427 "in C<$_> and the expression should update C<$_> or leave it unchanged."
23431 #: ../tools/virt-edit.pl:281
23433 "To delete a line, set C<$_> to the empty string. For example, to delete the "
23434 "C<apache> user account from the password file you can do:"
23438 #: ../tools/virt-edit.pl:284
23441 " virt-edit mydomain /etc/passwd -e '$_ = \"\" if /^apache:/'\n"
23446 #: ../tools/virt-edit.pl:286
23448 "To insert a line, prepend or append it to C<$_>. However appending lines to "
23449 "the end of the file is rather difficult this way since there is no concept "
23450 "of \"last line of the file\" - your expression just doesn't get called "
23451 "again. You might want to use the first method (setting C<$EDITOR>) if you "
23456 #: ../tools/virt-edit.pl:292
23458 "The variable C<$lineno> contains the current line number. As is "
23459 "traditional, the first line in the file is number C<1>."
23463 #: ../tools/virt-edit.pl:295
23465 "The return value from the expression is ignored, but the expression may call "
23466 "C<die> in order to abort the whole program, leaving the original file "
23471 #: ../tools/virt-edit.pl:299
23473 "Remember when matching the end of a line that C<$_> may contain the final C<"
23474 "\\n>, or (for DOS files) C<\\r\\n>, or if the file does not end with a "
23475 "newline then neither of these. Thus to match or substitute some text at the "
23476 "end of a line, use this regular expression:"
23480 #: ../tools/virt-edit.pl:304
23483 " /some text(\\r?\\n)?$/\n"
23488 #: ../tools/virt-edit.pl:306
23490 "Alternately, use the perl C<chomp> function, being careful not to chomp C<"
23491 "$_> itself (since that would remove all newlines from the file):"
23495 #: ../tools/virt-edit.pl:310
23498 " my $m = $_; chomp $m; $m =~ /some text$/\n"
23503 #: ../tools/virt-edit.pl:316
23508 #: ../tools/virt-edit.pl:318
23510 "If set, this string is used as the editor. It may contain arguments, eg. C<"
23515 #: ../tools/virt-edit.pl:321
23516 msgid "If not set, C<vi> is used."
23520 #: ../tools/virt-edit.pl:327
23522 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, L<Sys::"
23523 "Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>, L<perl(1)>, "
23528 #: ../tools/virt-list-filesystems.pl:32
23530 "virt-list-filesystems - List filesystems in a virtual machine or disk image"
23534 #: ../tools/virt-list-filesystems.pl:36
23537 " virt-list-filesystems [--options] domname\n"
23542 #: ../tools/virt-list-filesystems.pl:38
23545 " virt-list-filesystems [--options] disk.img [disk.img ...]\n"
23550 #: ../tools/virt-list-filesystems.pl:42
23552 "C<virt-list-filesystems> is a command line tool to list the filesystems that "
23553 "are contained in a virtual machine or disk image."
23557 #: ../tools/virt-list-filesystems.pl:46
23559 "C<virt-list-filesystems> is just a simple wrapper around L<libguestfs(3)> "
23560 "functionality. For more complex cases you should look at the L<guestfish(1)"
23565 #: ../tools/virt-list-filesystems.pl:86 ../tools/virt-list-partitions.pl:95
23566 #: ../tools/virt-ls.pl:115
23567 msgid "B<-l> | B<--long>"
23571 #: ../tools/virt-list-filesystems.pl:88
23573 "With this option, C<virt-list-filesystems> displays the type of each "
23574 "filesystem too (where \"type\" means C<ext3>, C<xfs> etc.)"
23578 #: ../tools/virt-list-filesystems.pl:95
23579 msgid "B<-a> | B<--all>"
23583 #: ../tools/virt-list-filesystems.pl:97
23585 "Normally we only show mountable filesystems. If this option is given then "
23586 "swap devices are shown too."
23590 #: ../tools/virt-list-filesystems.pl:193
23592 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, L<virt-list-"
23593 "partitions(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)"
23594 ">, L<http://libguestfs.org/>."
23598 #: ../tools/virt-list-partitions.pl:32
23600 "virt-list-partitions - List partitions in a virtual machine or disk image"
23604 #: ../tools/virt-list-partitions.pl:36
23607 " virt-list-partitions [--options] domname\n"
23612 #: ../tools/virt-list-partitions.pl:38
23615 " virt-list-partitions [--options] disk.img [disk.img ...]\n"
23620 #: ../tools/virt-list-partitions.pl:42
23622 "C<virt-list-partitions> is a command line tool to list the partitions that "
23623 "are contained in a virtual machine or disk image. It is mainly useful as a "
23624 "first step to using L<virt-resize(1)>."
23628 #: ../tools/virt-list-partitions.pl:47
23630 "C<virt-list-partitions> is just a simple wrapper around L<libguestfs(3)> "
23631 "functionality. For more complex cases you should look at the L<guestfish(1)"
23636 #: ../tools/virt-list-partitions.pl:87
23637 msgid "B<-h> | B<--human-readable>"
23641 #: ../tools/virt-list-partitions.pl:89
23642 msgid "Show sizes in human-readable form (eg. \"1G\")."
23646 #: ../tools/virt-list-partitions.pl:97
23648 "With this option, C<virt-list-partitions> displays the type and size of each "
23649 "partition too (where \"type\" means C<ext3>, C<pv> etc.)"
23653 #: ../tools/virt-list-partitions.pl:104
23654 msgid "B<-t> | B<--total>"
23658 #: ../tools/virt-list-partitions.pl:106
23660 "Display the total size of each block device (as a separate row or rows)."
23664 #: ../tools/virt-list-partitions.pl:231
23666 "L<guestfs(3)>, L<guestfish(1)>, L<virt-list-filesystems(1)>, L<virt-resize(1)"
23667 ">, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://"
23668 "libguestfs.org/>."
23672 #: ../tools/virt-ls.pl:35
23673 msgid "virt-ls - List files in a virtual machine"
23677 #: ../tools/virt-ls.pl:39
23680 " virt-ls [--options] domname directory\n"
23685 #: ../tools/virt-ls.pl:41
23688 " virt-ls [--options] disk.img [disk.img ...] directory\n"
23693 #: ../tools/virt-ls.pl:45
23695 "C<virt-ls> is a command line tool to list the names of files in a directory "
23696 "inside a virtual machine or disk image."
23700 #: ../tools/virt-ls.pl:48
23702 "C<virt-ls> is just a simple wrapper around L<libguestfs(3)> functionality. "
23703 "For more complex cases you should look at the L<guestfish(1)> tool."
23707 #: ../tools/virt-ls.pl:52
23709 "C<virt-ls> can be used in one of three modes: simple, long and recursive. A "
23710 "simple listing is like the ordinary L<ls(1)> command:"
23714 #: ../tools/virt-ls.pl:55
23717 " $ virt-ls myguest /\n"
23725 #: ../tools/virt-ls.pl:60
23726 msgid "With the C<-l> (C<--long>) option, C<virt-ls> shows more detail:"
23730 #: ../tools/virt-ls.pl:62
23733 " $ virt-ls -l myguest /\n"
23735 " dr-xr-xr-x. 2 root root 4096 2009-08-25 19:06 bin\n"
23736 " dr-xr-xr-x. 5 root root 3072 2009-08-25 19:06 boot\n"
23742 #: ../tools/virt-ls.pl:68
23744 "With the C<-R> (C<--recursive>) option, C<virt-ls> lists the names of files "
23745 "and directories recursively:"
23749 #: ../tools/virt-ls.pl:71
23752 " $ virt-ls -R myguest /tmp\n"
23760 #: ../tools/virt-ls.pl:76
23762 "You I<cannot> combine these options. To do more complicated things, use "
23767 #: ../tools/virt-ls.pl:117
23768 msgid "B<-R> | B<--recursive>"
23772 #: ../tools/virt-ls.pl:119
23774 "Select the mode. With neither of these options, C<virt-ls> produces a "
23775 "simple, flat list of the files in the named directory."
23779 #: ../tools/virt-ls.pl:122
23781 "C<virt-ls -l> produces a \"long listing\", which shows more detail (just "
23782 "like the plain C<ls -l> command)."
23786 #: ../tools/virt-ls.pl:125
23788 "C<virt-ls -R> produces a recursive list of files starting at the named "
23789 "directory. See the documentation for the C<guestfs_find> command L<guestfs"
23790 "(3)> for precise details."
23794 #: ../tools/virt-ls.pl:129
23795 msgid "You cannot combine these options."
23799 #: ../tools/virt-ls.pl:212
23801 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, L<Sys::"
23802 "Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs."
23807 #: ../tools/virt-make-fs.pl:37
23808 msgid "virt-make-fs - Make a filesystem from a tar archive or files"
23812 #: ../tools/virt-make-fs.pl:41
23815 " virt-make-fs [--options] input.tar output.img\n"
23820 #: ../tools/virt-make-fs.pl:43
23823 " virt-make-fs [--options] input.tar.gz output.img\n"
23828 #: ../tools/virt-make-fs.pl:45
23831 " virt-make-fs [--options] directory output.img\n"
23836 #: ../tools/virt-make-fs.pl:49
23838 "Virt-make-fs is a command line tool for creating a filesystem from a tar "
23839 "archive or some files in a directory. It is similar to tools like L<mkisofs"
23840 "(1)>, L<genisoimage(1)> and L<mksquashfs(1)>. Unlike those tools, it can "
23841 "create common filesystem types like ext2/3 or NTFS, which can be useful if "
23842 "you want to attach these filesystems to existing virtual machines (eg. to "
23843 "import large amounts of read-only data to a VM)."
23847 #: ../tools/virt-make-fs.pl:57
23848 msgid "Basic usage is:"
23852 #: ../tools/virt-make-fs.pl:59
23855 " virt-make-fs input output\n"
23860 #: ../tools/virt-make-fs.pl:61
23862 "where C<input> is either a directory containing files that you want to add, "
23863 "or a tar archive (either uncompressed tar or gzip-compressed tar); and "
23864 "C<output> is a disk image. The input type is detected automatically. The "
23865 "output disk image defaults to a raw ext2 image unless you specify extra "
23866 "flags (see L</OPTIONS> below)."
23870 #: ../tools/virt-make-fs.pl:67
23871 msgid "EXTRA SPACE"
23875 #: ../tools/virt-make-fs.pl:69
23877 "Unlike formats such as tar and squashfs, a filesystem does not \"just fit\" "
23878 "the files that it contains, but might have extra space. Depending on how "
23879 "you are going to use the output, you might think this extra space is wasted "
23880 "and want to minimize it, or you might want to leave space so that more files "
23881 "can be added later. Virt-make-fs defaults to minimizing the extra space, "
23882 "but you can use the C<--size> flag to leave space in the filesystem if you "
23887 #: ../tools/virt-make-fs.pl:77
23889 "An alternative way to leave extra space but not make the output image any "
23890 "bigger is to use an alternative disk image format (instead of the default "
23891 "\"raw\" format). Using C<--format=qcow2> will use the native QEmu/KVM qcow2 "
23892 "image format (check your hypervisor supports this before using it). This "
23893 "allows you to choose a large C<--size> but the extra space won't actually be "
23894 "allocated in the image until you try to store something in it."
23898 #: ../tools/virt-make-fs.pl:85
23900 "Don't forget that you can also use local commands including L<resize2fs(8)> "
23901 "and L<virt-resize(1)> to resize existing filesystems, or rerun virt-make-"
23902 "resize to build another image from scratch."
23906 #: ../tools/virt-make-fs.pl:89 ../tools/virt-make-fs.pl:123
23907 #: ../tools/virt-make-fs.pl:142
23912 #: ../tools/virt-make-fs.pl:91
23915 " virt-make-fs --format=qcow2 --size=+200M input output.img\n"
23920 #: ../tools/virt-make-fs.pl:93
23921 msgid "FILESYSTEM TYPE"
23925 #: ../tools/virt-make-fs.pl:95
23927 "The default filesystem type is C<ext2>. Just about any filesystem type that "
23928 "libguestfs supports can be used (but I<not> read-only formats like "
23929 "ISO9660). Here are some of the more common choices:"
23933 #: ../tools/virt-make-fs.pl:101
23938 #: ../tools/virt-make-fs.pl:103
23940 "Note that ext3 filesystems contain a journal, typically 1-32 MB in size. If "
23941 "you are not going to use the filesystem in a way that requires the journal, "
23942 "then this is just wasted overhead."
23946 #: ../tools/virt-make-fs.pl:107
23947 msgid "I<ntfs> or I<vfat>"
23951 #: ../tools/virt-make-fs.pl:109
23952 msgid "Useful if exporting data to a Windows guest."
23956 #: ../tools/virt-make-fs.pl:111
23958 "I<Note for vfat>: The tar archive or local directory must only contain files "
23959 "which are owned by root (ie. UID:GID = 0:0). The reason is that the tar "
23960 "program running within libguestfs is unable to change the ownership of non-"
23961 "root files, since vfat itself does not support this."
23965 #: ../tools/virt-make-fs.pl:116
23970 #: ../tools/virt-make-fs.pl:118
23972 "Lower overhead than C<ext2>, but certain limitations on filename length and "
23973 "total filesystem size."
23977 #: ../tools/virt-make-fs.pl:125
23980 " virt-make-fs --type=minix input minixfs.img\n"
23985 #: ../tools/virt-make-fs.pl:127
23986 msgid "TO PARTITION OR NOT TO PARTITION"
23990 #: ../tools/virt-make-fs.pl:129
23991 msgid "Optionally virt-make-fs can add a partition table to the output disk."
23995 #: ../tools/virt-make-fs.pl:131
23997 "Adding a partition can make the disk image more compatible with certain "
23998 "virtualized operating systems which don't expect to see a filesystem "
23999 "directly located on a block device (Linux doesn't care and will happily "
24000 "handle both types)."
24004 #: ../tools/virt-make-fs.pl:136
24006 "On the other hand, if you have a partition table then the output image is no "
24007 "longer a straight filesystem. For example you cannot run L<fsck(8)> "
24008 "directly on a partitioned disk image. (However libguestfs tools such as "
24009 "L<guestfish(1)> and L<virt-resize(1)> can still be used)."
24013 #: ../tools/virt-make-fs.pl:144
24014 msgid "Add an MBR partition:"
24018 #: ../tools/virt-make-fs.pl:146
24021 " virt-make-fs --partition -- input disk.img\n"
24026 #: ../tools/virt-make-fs.pl:148
24028 "If the output disk image could be terabyte-sized or larger, it's better to "
24029 "use an EFI/GPT-compatible partition table:"
24033 #: ../tools/virt-make-fs.pl:151
24036 " virt-make-fs --partition=gpt --size=+4T --format=qcow2 input disk.img\n"
24041 #: ../tools/virt-make-fs.pl:177 ../tools/virt-win-reg.pl:196
24046 #: ../tools/virt-make-fs.pl:179
24047 msgid "Enable debugging information."
24051 #: ../tools/virt-make-fs.pl:185
24052 msgid "B<--size=E<lt>NE<gt>>"
24056 #: ../tools/virt-make-fs.pl:187
24057 msgid "B<--size=+E<lt>NE<gt>>"
24061 #: ../tools/virt-make-fs.pl:189
24062 msgid "B<-s E<lt>NE<gt>>"
24066 #: ../tools/virt-make-fs.pl:191
24067 msgid "B<-s +E<lt>NE<gt>>"
24071 #: ../tools/virt-make-fs.pl:193
24073 "Use the C<--size> (or C<-s>) option to choose the size of the output image."
24077 #: ../tools/virt-make-fs.pl:196
24079 "If this option is I<not> given, then the output image will be just large "
24080 "enough to contain all the files, with not much wasted space."
24084 #: ../tools/virt-make-fs.pl:199
24086 "To choose a fixed size output disk, specify an absolute number followed by b/"
24087 "K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
24088 "Petabytes or Exabytes. This must be large enough to contain all the input "
24089 "files, else you will get an error."
24093 #: ../tools/virt-make-fs.pl:204
24095 "To leave extra space, specify C<+> (plus sign) and a number followed by b/K/"
24096 "M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
24097 "Petabytes or Exabytes. For example: C<--size=+200M> means enough space for "
24098 "the input files, and (approximately) an extra 200 MB free space."
24102 #: ../tools/virt-make-fs.pl:210
24104 "Note that virt-make-fs estimates free space, and therefore will not produce "
24105 "filesystems containing precisely the free space requested. (It is much more "
24106 "expensive and time-consuming to produce a filesystem which has precisely the "
24107 "desired free space)."
24111 #: ../tools/virt-make-fs.pl:219
24112 msgid "B<--format=E<lt>fmtE<gt>>"
24116 #: ../tools/virt-make-fs.pl:221
24117 msgid "B<-F E<lt>fmtE<gt>>"
24121 #: ../tools/virt-make-fs.pl:223
24122 msgid "Choose the output disk image format."
24126 #: ../tools/virt-make-fs.pl:225
24127 msgid "The default is C<raw> (raw disk image)."
24131 #: ../tools/virt-make-fs.pl:227
24133 "For other choices, see the L<qemu-img(1)> manpage. The only other choice "
24134 "that would really make sense here is C<qcow2>."
24138 #: ../tools/virt-make-fs.pl:234
24139 msgid "B<--type=E<lt>fsE<gt>>"
24143 #: ../tools/virt-make-fs.pl:236
24144 msgid "B<-t E<lt>fsE<gt>>"
24148 #: ../tools/virt-make-fs.pl:238
24149 msgid "Choose the output filesystem type."
24153 #: ../tools/virt-make-fs.pl:240
24154 msgid "The default is C<ext2>."
24158 #: ../tools/virt-make-fs.pl:242
24160 "Any filesystem which is supported read-write by libguestfs can be used here."
24164 #: ../tools/virt-make-fs.pl:249
24165 msgid "B<--partition>"
24169 #: ../tools/virt-make-fs.pl:251
24170 msgid "B<--partition=E<lt>parttypeE<gt>>"
24174 #: ../tools/virt-make-fs.pl:253
24176 "If specified, this flag adds an MBR partition table to the output disk image."
24180 #: ../tools/virt-make-fs.pl:256
24182 "You can change the partition table type, eg. C<--partition=gpt> for large "
24187 #: ../tools/virt-make-fs.pl:259
24189 "Note that if you just use a lonesome C<--partition>, the Perl option parser "
24190 "might consider the next parameter to be the partition type. For example:"
24194 #: ../tools/virt-make-fs.pl:263
24197 " virt-make-fs --partition input.tar ...\n"
24202 #: ../tools/virt-make-fs.pl:265
24204 "would cause virt-make-fs to think you wanted to use a partition type of "
24205 "C<input.tar> which is completely wrong. To avoid this, use C<--> (a double "
24206 "dash) between options and the input file argument:"
24210 #: ../tools/virt-make-fs.pl:269
24213 " virt-make-fs --partition -- input.tar ...\n"
24218 #: ../tools/virt-make-fs.pl:529
24220 "L<guestfish(1)>, L<virt-resize(1)>, L<virt-tar(1)>, L<mkisofs(1)>, "
24221 "L<genisoimage(1)>, L<mksquashfs(1)>, L<mke2fs(8)>, L<resize2fs(8)>, L<guestfs"
24222 "(3)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
24226 #: ../tools/virt-make-fs.pl:543 ../tools/virt-win-reg.pl:478
24228 "When reporting bugs, please enable debugging and capture the I<complete> "
24233 #: ../tools/virt-make-fs.pl:546
24236 " export LIBGUESTFS_DEBUG=1\n"
24237 " virt-make-fs --debug [...] > /tmp/virt-make-fs.log 2>&1\n"
24242 #: ../tools/virt-make-fs.pl:549
24244 "Attach /tmp/virt-make-fs.log to a new bug report at L<https://bugzilla."
24249 #: ../tools/virt-make-fs.pl:558 ../tools/virt-resize.pl:1413
24250 #: ../tools/virt-win-reg.pl:493
24251 msgid "Copyright (C) 2010 Red Hat Inc."
24255 #: ../tools/virt-rescue.pl:33
24256 msgid "virt-rescue - Run a rescue shell on a virtual machine"
24260 #: ../tools/virt-rescue.pl:37
24263 " virt-rescue [--options] domname\n"
24268 #: ../tools/virt-rescue.pl:39
24271 " virt-rescue [--options] disk.img [disk.img ...]\n"
24276 #: ../tools/virt-rescue.pl:43
24278 "You must I<not> use C<virt-rescue> on live virtual machines. Doing so will "
24279 "probably result in disk corruption in the VM. C<virt-rescue> tries to stop "
24280 "you from doing this, but doesn't catch all cases."
24284 #: ../tools/virt-rescue.pl:47
24286 "However if you use the I<--ro> (read only) option, then you can attach a "
24287 "shell to a live virtual machine. The results might be strange or "
24288 "inconsistent at times but you won't get disk corruption."
24292 #: ../tools/virt-rescue.pl:53
24294 "virt-rescue is like a Rescue CD, but for virtual machines, and without the "
24295 "need for a CD. virt-rescue gives you a rescue shell and some simple "
24296 "recovery tools which you can use to examine or rescue a virtual machine or "
24301 #: ../tools/virt-rescue.pl:58
24303 "You can run virt-rescue on any virtual machine known to libvirt, or directly "
24304 "on disk image(s):"
24308 #: ../tools/virt-rescue.pl:61
24311 " virt-rescue GuestName\n"
24316 #: ../tools/virt-rescue.pl:63
24319 " virt-rescue --ro /path/to/disk.img\n"
24324 #: ../tools/virt-rescue.pl:65
24327 " virt-rescue /dev/sdc\n"
24332 #: ../tools/virt-rescue.pl:67
24333 msgid "For live VMs you I<must> use the --ro option."
24337 #: ../tools/virt-rescue.pl:69
24339 "When you run virt-rescue on a virtual machine or disk image, you are placed "
24340 "in an interactive bash shell where you can use many ordinary Linux "
24341 "commands. What you see in C</> (C</bin>, C</lib> etc) is the rescue "
24342 "appliance. You must mount the virtual machine's filesystems by hand. There "
24343 "is an empty directory called C</sysroot> where you can mount filesystems."
24347 #: ../tools/virt-rescue.pl:76
24349 "In the example below, we list logical volumes, then choose one to mount "
24350 "under C</sysroot>:"
24354 #: ../tools/virt-rescue.pl:79
24358 " LV VG Attr LSize Origin Snap% Move Log Copy% Convert\n"
24359 " lv_root vg_f11x64 -wi-a- 8.83G\n"
24360 " lv_swap vg_f11x64 -wi-a- 992.00M\n"
24361 " ><rescue> mount /dev/vg_f11x64/lv_root /sysroot\n"
24362 " ><rescue> ls /sysroot\n"
24367 #: ../tools/virt-rescue.pl:86
24369 "If you don't know what filesystems are available on the virtual machine then "
24370 "you can use commands such as L<parted(8)> and L<lvs(8)> to find out."
24374 #: ../tools/virt-rescue.pl:90 ../tools/virt-resize.pl:1350
24379 #: ../tools/virt-rescue.pl:92
24381 "Virt-rescue can be used on I<any> disk image file or device, not just a "
24382 "virtual machine. For example you can use it on a blank file if you want to "
24383 "partition that file (although we would recommend using L<guestfish(1)> "
24384 "instead as it is more suitable for this purpose). You can even use virt-"
24385 "rescue on things like SD cards."
24389 #: ../tools/virt-rescue.pl:98
24391 "This tool is just designed for quick interactive hacking on a virtual "
24392 "machine. For more structured access to a virtual machine disk image, you "
24393 "should use L<guestfs(3)>. To get a structured shell that you can use to "
24394 "make scripted changes to guests, use L<guestfish(1)>."
24398 #: ../tools/virt-rescue.pl:127
24399 msgid "B<--append kernelopts>"
24403 #: ../tools/virt-rescue.pl:129
24404 msgid "Pass additional options to the rescue kernel."
24408 #: ../tools/virt-rescue.pl:147
24409 msgid "B<--memsize MB> | B<-m MB>"
24413 #: ../tools/virt-rescue.pl:149
24415 "Change the amount of memory allocated to the rescue system. The default is "
24416 "set by libguestfs and is small but adequate for running system tools. The "
24417 "occasional program might need more memory. The parameter is specified in "
24422 #: ../tools/virt-rescue.pl:158
24423 msgid "B<--ro> | B<-r>"
24427 #: ../tools/virt-rescue.pl:160
24428 msgid "Open the image read-only."
24432 #: ../tools/virt-rescue.pl:172
24434 "Enable SELinux in the rescue appliance. You should read L<guestfs(3)/"
24435 "SELINUX> before using this option."
24439 #: ../tools/virt-rescue.pl:228
24441 "Several environment variables affect virt-rescue. See L<guestfs(3)/"
24442 "ENVIRONMENT VARIABLES> for the complete list."
24446 #: ../tools/virt-rescue.pl:233
24448 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, L<Sys::"
24449 "Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
24453 #: ../tools/virt-resize.pl:42
24454 msgid "virt-resize - Resize a virtual machine disk"
24458 #: ../tools/virt-resize.pl:46
24461 " virt-resize [--resize /dev/sdaN=[+/-]<size>[%]]\n"
24462 " [--expand /dev/sdaN] [--shrink /dev/sdaN]\n"
24463 " [--ignore /dev/sdaN] [--delete /dev/sdaN] [...] indisk outdisk\n"
24468 #: ../tools/virt-resize.pl:52
24470 "Virt-resize is a tool which can resize a virtual machine disk, making it "
24471 "larger or smaller overall, and resizing or deleting any partitions contained "
24476 #: ../tools/virt-resize.pl:56
24478 "Virt-resize B<cannot> resize disk images in-place. Virt-resize B<should "
24479 "not> be used on live virtual machines - for consistent results, shut the "
24480 "virtual machine down before resizing it."
24484 #: ../tools/virt-resize.pl:60
24486 "If you are not familiar with the associated tools: L<virt-list-partitions(1)"
24487 ">, L<virt-list-filesystems(1)> and L<virt-df(1)>, we recommend you go and "
24488 "read those manual pages first."
24492 #: ../tools/virt-resize.pl:68
24494 "Copy C<olddisk> to C<newdisk>, extending one of the guest's partitions to "
24495 "fill the extra 5GB of space."
24499 #: ../tools/virt-resize.pl:71
24502 " truncate -r olddisk newdisk; truncate -s +5G newdisk\n"
24503 " virt-list-partitions -lht olddisk\n"
24504 " # Note \"/dev/sda2\" is a partition inside the \"olddisk\" file.\n"
24505 " virt-resize --expand /dev/sda2 olddisk newdisk\n"
24510 #: ../tools/virt-resize.pl:76
24512 "As above, but make the /boot partition 200MB bigger, while giving the "
24513 "remaining space to /dev/sda2:"
24517 #: ../tools/virt-resize.pl:79
24520 " virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 olddisk newdisk\n"
24525 #: ../tools/virt-resize.pl:81
24526 msgid "DETAILED USAGE"
24530 #: ../tools/virt-resize.pl:83
24531 msgid "EXPANDING A VIRTUAL MACHINE DISK"
24535 #: ../tools/virt-resize.pl:87
24536 msgid "1. Shut down the virtual machine"
24540 #: ../tools/virt-resize.pl:89
24541 msgid "2. Locate input disk image"
24545 #: ../tools/virt-resize.pl:91
24547 "Locate the input disk image (ie. the file or device on the host containing "
24548 "the guest's disk). If the guest is managed by libvirt, you can use C<virsh "
24549 "dumpxml> like this to find the disk image name:"
24553 #: ../tools/virt-resize.pl:95
24556 " # virsh dumpxml guestname | xpath /domain/devices/disk/source\n"
24557 " Found 1 nodes:\n"
24559 " <source dev=\"/dev/vg/lv_guest\" />\n"
24564 #: ../tools/virt-resize.pl:100
24565 msgid "3. Look at current sizing"
24569 #: ../tools/virt-resize.pl:102
24571 "Use L<virt-list-partitions(1)> to display the current partitions and sizes:"
24575 #: ../tools/virt-resize.pl:105
24578 " # virt-list-partitions -lht /dev/vg/lv_guest\n"
24579 " /dev/sda1 ext3 101.9M\n"
24580 " /dev/sda2 pv 7.9G\n"
24581 " /dev/sda device 8.0G\n"
24586 #: ../tools/virt-resize.pl:110
24588 "(This example is a virtual machine with an 8 GB disk which we would like to "
24589 "expand up to 10 GB)."
24593 #: ../tools/virt-resize.pl:113
24594 msgid "4. Create output disk"
24598 #: ../tools/virt-resize.pl:115
24600 "Virt-resize cannot do in-place disk modifications. You have to have space "
24601 "to store the resized output disk."
24605 #: ../tools/virt-resize.pl:118
24607 "To store the resized disk image in a file, create a file of a suitable size:"
24611 #: ../tools/virt-resize.pl:121
24614 " # rm -f outdisk\n"
24615 " # truncate -s 10G outdisk\n"
24620 #: ../tools/virt-resize.pl:124
24621 msgid "Or use L<lvcreate(1)> to create a logical volume:"
24625 #: ../tools/virt-resize.pl:126
24628 " # lvcreate -L 10G -n lv_name vg_name\n"
24633 #: ../tools/virt-resize.pl:128
24634 msgid "Or use L<virsh(1)> vol-create-as to create a libvirt storage volume:"
24638 #: ../tools/virt-resize.pl:130
24641 " # virsh pool-list\n"
24642 " # virsh vol-create-as poolname newvol 10G\n"
24647 #: ../tools/virt-resize.pl:133
24652 #: ../tools/virt-resize.pl:135
24654 "virt-resize takes two mandatory parameters, the input disk (eg. device or "
24655 "file) and the output disk. The output disk is the one created in the "
24660 #: ../tools/virt-resize.pl:139
24663 " # virt-resize indisk outdisk\n"
24668 #: ../tools/virt-resize.pl:141
24670 "This command just copies disk image C<indisk> to disk image C<outdisk> "
24671 "I<without> resizing or changing any existing partitions. If C<outdisk> is "
24672 "larger, then an extra, empty partition is created at the end of the disk "
24673 "covering the extra space. If C<outdisk> is smaller, then it will give an "
24678 #: ../tools/virt-resize.pl:147
24680 "More realistically you'd want to expand existing partitions in the disk "
24681 "image by passing extra options (for the full list see the L</OPTIONS> "
24686 #: ../tools/virt-resize.pl:151
24688 "L</--expand> is the most useful option. It expands the named partition "
24689 "within the disk to fill any extra space:"
24693 #: ../tools/virt-resize.pl:154
24696 " # virt-resize --expand /dev/sda2 indisk outdisk\n"
24701 #: ../tools/virt-resize.pl:156
24703 "(In this case, an extra partition is I<not> created at the end of the disk, "
24704 "because there will be no unused space)."
24708 #: ../tools/virt-resize.pl:159
24710 "L</--resize> is the other commonly used option. The following would "
24711 "increase the size of /dev/sda1 by 200M, and expand /dev/sda2 to fill the "
24712 "rest of the available space:"
24716 #: ../tools/virt-resize.pl:163
24719 " # virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
24720 " indisk outdisk\n"
24725 #: ../tools/virt-resize.pl:166
24727 "If the expanded partition in the image contains a filesystem or LVM PV, then "
24728 "if virt-resize knows how, it will resize the contents, the equivalent of "
24729 "calling a command such as L<pvresize(8)>, L<resize2fs(8)> or L<ntfsresize(8)"
24730 ">. However virt-resize does not know how to resize some filesystems, so you "
24731 "would have to online resize them after booting the guest. And virt-resize "
24732 "also does not resize anything inside an LVM PV, it just resizes the PV "
24733 "itself and leaves the user to resize any LVs inside that PV as desired."
24737 #: ../tools/virt-resize.pl:175
24738 msgid "Other options are covered below."
24742 #: ../tools/virt-resize.pl:177
24747 #: ../tools/virt-resize.pl:179
24748 msgid "Thoroughly test the new disk image I<before> discarding the old one."
24752 #: ../tools/virt-resize.pl:181
24753 msgid "If you are using libvirt, edit the XML to point at the new disk:"
24757 #: ../tools/virt-resize.pl:183
24760 " # virsh edit guestname\n"
24765 #: ../tools/virt-resize.pl:185
24767 "Change E<lt>source ...E<gt>, see L<http://libvirt.org/formatdomain."
24768 "html#elementsDisks>"
24772 #: ../tools/virt-resize.pl:188
24773 msgid "Then start up the domain with the new, resized disk:"
24777 #: ../tools/virt-resize.pl:190
24780 " # virsh start guestname\n"
24785 #: ../tools/virt-resize.pl:192
24787 "and check that it still works. See also the L</NOTES> section below for "
24788 "additional information."
24792 #: ../tools/virt-resize.pl:195
24793 msgid "7. Resize LVs etc inside the guest"
24797 #: ../tools/virt-resize.pl:197
24798 msgid "(This can also be done offline using L<guestfish(1)>)"
24802 #: ../tools/virt-resize.pl:199
24804 "Once the guest has booted you should see the new space available, at least "
24805 "for filesystems that virt-resize knows how to resize, and for PVs. The user "
24806 "may need to resize LVs inside PVs, and also resize filesystem types that "
24807 "virt-resize does not know how to expand."
24811 #: ../tools/virt-resize.pl:206
24812 msgid "SHRINKING A VIRTUAL MACHINE DISK"
24816 #: ../tools/virt-resize.pl:208
24818 "Shrinking is somewhat more complex than expanding, and only an overview is "
24823 #: ../tools/virt-resize.pl:211
24825 "Firstly virt-resize will not attempt to shrink any partition content (PVs, "
24826 "filesystems). The user has to shrink content before passing the disk image "
24827 "to virt-resize, and virt-resize will check that the content has been shrunk "
24832 #: ../tools/virt-resize.pl:216
24833 msgid "(Shrinking can also be done offline using L<guestfish(1)>)"
24837 #: ../tools/virt-resize.pl:218
24839 "After shrinking PVs and filesystems, shut down the guest, and proceed with "
24840 "steps 3 and 4 above to allocate a new disk image."
24844 #: ../tools/virt-resize.pl:221
24846 "Then run virt-resize with any of the C<--shrink> and/or C<--resize> options."
24850 #: ../tools/virt-resize.pl:224
24851 msgid "IGNORING OR DELETING PARTITIONS"
24855 #: ../tools/virt-resize.pl:226
24857 "virt-resize also gives a convenient way to ignore or delete partitions when "
24858 "copying from the input disk to the output disk. Ignoring a partition speeds "
24859 "up the copy where you don't care about the existing contents of a "
24860 "partition. Deleting a partition removes it completely, but note that it "
24861 "also renumbers any partitions after the one which is deleted, which can "
24862 "leave some guests unbootable."
24866 #: ../tools/virt-resize.pl:243
24867 msgid "Display help."
24871 #: ../tools/virt-resize.pl:257
24872 msgid "B<--resize part=size>"
24876 #: ../tools/virt-resize.pl:259
24878 "Resize the named partition (expanding or shrinking it) so that it has the "
24883 #: ../tools/virt-resize.pl:262
24885 "C<size> can be expressed as an absolute number followed by b/K/M/G/T/P/E to "
24886 "mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Petabytes or "
24887 "Exabytes; or as a percentage of the current size; or as a relative number or "
24888 "percentage. For example:"
24892 #: ../tools/virt-resize.pl:267
24895 " --resize /dev/sda2=10G\n"
24900 #: ../tools/virt-resize.pl:269
24903 " --resize /dev/sda4=90%\n"
24908 #: ../tools/virt-resize.pl:271
24911 " --resize /dev/sda2=+1G\n"
24916 #: ../tools/virt-resize.pl:273
24919 " --resize /dev/sda2=-200M\n"
24924 #: ../tools/virt-resize.pl:275
24927 " --resize /dev/sda1=+128K\n"
24932 #: ../tools/virt-resize.pl:277
24935 " --resize /dev/sda1=+10%\n"
24940 #: ../tools/virt-resize.pl:279
24943 " --resize /dev/sda1=-10%\n"
24948 #: ../tools/virt-resize.pl:281
24950 "You can increase the size of any partition. Virt-resize will expand the "
24951 "direct content of the partition if it knows how (see C<--expand> below)."
24955 #: ../tools/virt-resize.pl:285
24957 "You can only I<decrease> the size of partitions that contain filesystems or "
24958 "PVs which have already been shrunk. Virt-resize will check this has been "
24959 "done before proceeding, or else will print an error (see also C<--resize-"
24964 #: ../tools/virt-resize.pl:290 ../tools/virt-resize.pl:382
24965 #: ../tools/virt-resize.pl:399
24966 msgid "You can give this option multiple times."
24970 #: ../tools/virt-resize.pl:296
24971 msgid "B<--resize-force part=size>"
24975 #: ../tools/virt-resize.pl:298
24977 "This is the same as C<--resize> except that it will let you decrease the "
24978 "size of any partition. Generally this means you will lose any data which "
24979 "was at the end of the partition you shrink, but you may not care about that "
24980 "(eg. if shrinking an unused partition, or if you can easily recreate it such "
24981 "as a swap partition)."
24985 #: ../tools/virt-resize.pl:304
24986 msgid "See also the C<--ignore> option."
24990 #: ../tools/virt-resize.pl:310
24991 msgid "B<--expand part>"
24995 #: ../tools/virt-resize.pl:312
24997 "Expand the named partition so it uses up all extra space (space left over "
24998 "after any other resize changes that you request have been done)."
25002 #: ../tools/virt-resize.pl:315
25004 "If virt-resize knows how, it will expand the direct content of the "
25005 "partition. For example, if the partition is an LVM PV, it will expand the "
25006 "PV to fit (like calling L<pvresize(8)>). Virt-resize leaves any other "
25007 "content it doesn't know about alone."
25011 #: ../tools/virt-resize.pl:320
25012 msgid "Currently virt-resize can resize:"
25016 #: ../tools/virt-resize.pl:326
25018 "ext2, ext3 and ext4 filesystems when they are contained directly inside a "
25023 #: ../tools/virt-resize.pl:331
25025 "NTFS filesystems contained directly in a partition, if libguestfs was "
25026 "compiled with support for NTFS."
25030 #: ../tools/virt-resize.pl:334
25032 "The filesystem must have been shut down consistently last time it was used. "
25033 "Additionally, L<ntfsresize(8)> marks the resized filesystem as requiring a "
25034 "consistency check, so at the first boot after resizing Windows will check "
25039 #: ../tools/virt-resize.pl:341
25041 "LVM PVs (physical volumes). However virt-resize does I<not> resize anything "
25042 "inside the PV. The user will have to resize LVs as desired."
25046 #: ../tools/virt-resize.pl:347 ../tools/virt-resize.pl:369
25047 msgid "Note that you cannot use C<--expand> and C<--shrink> together."
25051 #: ../tools/virt-resize.pl:353
25052 msgid "B<--shrink part>"
25056 #: ../tools/virt-resize.pl:355
25058 "Shrink the named partition until the overall disk image fits in the "
25059 "destination. The named partition B<must> contain a filesystem or PV which "
25060 "has already been shrunk using another tool (eg. L<guestfish(1)> or other "
25061 "online tools). Virt-resize will check this and give an error if it has not "
25066 #: ../tools/virt-resize.pl:361
25068 "The amount by which the overall disk must be shrunk (after carrying out all "
25069 "other operations requested by the user) is called the \"deficit\". For "
25070 "example, a straight copy (assume no other operations) from a 5GB disk image "
25071 "to a 4GB disk image results in a 1GB deficit. In this case, virt-resize "
25072 "would give an error unless the user specified a partition to shrink and that "
25073 "partition had more than a gigabyte of free space."
25077 #: ../tools/virt-resize.pl:375
25078 msgid "B<--ignore part>"
25082 #: ../tools/virt-resize.pl:377
25084 "Ignore the named partition. Effectively this means the partition is "
25085 "allocated on the destination disk, but the content is not copied across from "
25086 "the source disk. The content of the partition will be blank (all zero "
25091 #: ../tools/virt-resize.pl:388
25092 msgid "B<--delete part>"
25096 #: ../tools/virt-resize.pl:390
25098 "Delete the named partition. It would be more accurate to describe this as "
25099 "\"don't copy it over\", since virt-resize doesn't do in-place changes and "
25100 "the original disk image is left intact."
25104 #: ../tools/virt-resize.pl:394
25106 "Note that when you delete a partition, then anything contained in the "
25107 "partition is also deleted. Furthermore, this causes any partitions that "
25108 "come after to be I<renumbered>, which can easily make your guest unbootable."
25112 #: ../tools/virt-resize.pl:405
25113 msgid "B<--LV-expand logvol>"
25117 #: ../tools/virt-resize.pl:407
25119 "This takes the logical volume and, as a final step, expands it to fill all "
25120 "the space available in its volume group. A typical usage, assuming a Linux "
25121 "guest with a single PV C</dev/sda2> and a root device called C</dev/vg_guest/"
25122 "lv_root> would be:"
25126 #: ../tools/virt-resize.pl:412
25129 " virt-resize indisk outdisk \\\n"
25130 " --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root\n"
25135 #: ../tools/virt-resize.pl:415
25137 "This would first expand the partition (and PV), and then expand the root "
25138 "device to fill the extra space in the PV."
25142 #: ../tools/virt-resize.pl:418
25144 "The contents of the LV are also resized if virt-resize knows how to do "
25145 "that. You can stop virt-resize from trying to expand the content by using "
25146 "the option C<--no-expand-content>."
25150 #: ../tools/virt-resize.pl:422
25151 msgid "Use L<virt-list-filesystems(1)> to list the filesystems in the guest."
25155 #: ../tools/virt-resize.pl:425
25157 "You can give this option multiple times, I<but> it doesn't make sense to do "
25158 "this unless the logical volumes you specify are all in different volume "
25163 #: ../tools/virt-resize.pl:433
25164 msgid "B<--no-copy-boot-loader>"
25168 #: ../tools/virt-resize.pl:435
25170 "By default, virt-resize copies over some sectors at the start of the disk "
25171 "(up to the beginning of the first partition). Commonly these sectors "
25172 "contain the Master Boot Record (MBR) and the boot loader, and are required "
25173 "in order for the guest to boot correctly."
25177 #: ../tools/virt-resize.pl:440
25179 "If you specify this flag, then this initial copy is not done. You may need "
25180 "to reinstall the boot loader in this case."
25184 #: ../tools/virt-resize.pl:448
25185 msgid "B<--no-extra-partition>"
25189 #: ../tools/virt-resize.pl:450
25191 "By default, virt-resize creates an extra partition if there is any extra, "
25192 "unused space after all resizing has happened. Use this option to prevent "
25193 "the extra partition from being created. If you do this then the extra space "
25194 "will be inaccessible until you run fdisk, parted, or some other partitioning "
25195 "tool in the guest."
25199 #: ../tools/virt-resize.pl:456
25201 "Note that if the surplus space is smaller than 10 MB, no extra partition "
25206 #: ../tools/virt-resize.pl:463
25207 msgid "B<--no-expand-content>"
25211 #: ../tools/virt-resize.pl:465
25213 "By default, virt-resize will try to expand the direct contents of "
25214 "partitions, if it knows how (see C<--expand> option above)."
25218 #: ../tools/virt-resize.pl:468
25220 "If you give the C<--no-expand-content> option then virt-resize will not "
25225 #: ../tools/virt-resize.pl:475
25226 msgid "B<-d> | B<--debug>"
25230 #: ../tools/virt-resize.pl:477 ../tools/virt-win-reg.pl:198
25231 msgid "Enable debugging messages."
25235 #: ../tools/virt-resize.pl:483
25236 msgid "B<-n> | B<--dryrun>"
25240 #: ../tools/virt-resize.pl:485
25241 msgid "Print a summary of what would be done, but don't do anything."
25245 #: ../tools/virt-resize.pl:491
25246 msgid "B<-q> | B<--quiet>"
25250 #: ../tools/virt-resize.pl:493
25251 msgid "Don't print the summary."
25255 #: ../tools/virt-resize.pl:1352
25256 msgid "\"Partition 1 does not end on cylinder boundary.\""
25260 #: ../tools/virt-resize.pl:1354
25262 "Virt-resize aligns partitions to multiples of 64 sectors. Usually this "
25263 "means the partitions will not be aligned to the ancient CHS geometry. "
25264 "However CHS geometry is meaningless for disks manufactured since the early "
25265 "1990s, and doubly so for virtual hard drives. Alignment of partitions to "
25266 "cylinders is not required by any modern operating system."
25270 #: ../tools/virt-resize.pl:1361
25271 msgid "RESIZING WINDOWS VIRTUAL MACHINES"
25275 #: ../tools/virt-resize.pl:1363
25277 "In Windows Vista and later versions, Microsoft switched to using a separate "
25278 "boot partition. In these VMs, typically C</dev/sda1> is the boot partition "
25279 "and C</dev/sda2> is the main (C:) drive. We have not had any luck resizing "
25280 "the boot partition. Doing so seems to break the guest completely. However "
25281 "expanding the second partition (ie. C: drive) should work."
25285 #: ../tools/virt-resize.pl:1370
25287 "Windows may initiate a lengthy \"chkdsk\" on first boot after a resize, if "
25288 "NTFS partitions have been expanded. This is just a safety check and (unless "
25289 "it find errors) is nothing to worry about."
25293 #: ../tools/virt-resize.pl:1374
25294 msgid "ALTERNATIVE TOOLS"
25298 #: ../tools/virt-resize.pl:1376
25300 "There are several proprietary tools for resizing partitions. We won't "
25301 "mention any here."
25305 #: ../tools/virt-resize.pl:1379
25307 "L<parted(8)> and its graphical shell gparted can do some types of resizing "
25308 "operations on disk images. They can resize and move partitions, but I don't "
25309 "think they can do anything with the contents, and they certainly don't "
25314 #: ../tools/virt-resize.pl:1384
25316 "L<guestfish(1)> can do everything that virt-resize can do and a lot more, "
25317 "but at a much lower level. You will probably end up hand-calculating sector "
25318 "offsets, which is something that virt-resize was designed to avoid. If you "
25319 "want to see the guestfish-equivalent commands that virt-resize runs, use the "
25324 #: ../tools/virt-resize.pl:1392
25326 "L<virt-list-partitions(1)>, L<virt-list-filesystems(1)>, L<virt-df(1)>, "
25327 "L<guestfs(3)>, L<guestfish(1)>, L<lvm(8)>, L<pvresize(8)>, L<lvresize(8)>, "
25328 "L<resize2fs(8)>, L<ntfsresize(8)>, L<virsh(1)>, L<parted(8)>, L<Sys::Guestfs"
25329 "(3)>, L<http://libguestfs.org/>."
25333 #: ../tools/virt-tar.pl:34
25334 msgid "virt-tar - Extract or upload files to a virtual machine"
25338 #: ../tools/virt-tar.pl:38
25341 " virt-tar [--options] -x domname directory tarball\n"
25346 #: ../tools/virt-tar.pl:40
25349 " virt-tar [--options] -u domname tarball directory\n"
25354 #: ../tools/virt-tar.pl:42
25357 " virt-tar [--options] disk.img [disk.img ...] -x directory tarball\n"
25362 #: ../tools/virt-tar.pl:44
25365 " virt-tar [--options] disk.img [disk.img ...] -u tarball directory\n"
25370 #: ../tools/virt-tar.pl:48
25371 msgid "Download C</home> from the VM into a local tarball:"
25375 #: ../tools/virt-tar.pl:50
25378 " virt-tar -x domname /home home.tar\n"
25383 #: ../tools/virt-tar.pl:52
25386 " virt-tar -zx domname /home home.tar.gz\n"
25391 #: ../tools/virt-tar.pl:54
25392 msgid "Upload a local tarball and unpack it inside C</tmp> in the VM:"
25396 #: ../tools/virt-tar.pl:56
25399 " virt-tar -u domname uploadstuff.tar /tmp\n"
25404 #: ../tools/virt-tar.pl:58
25407 " virt-tar -zu domname uploadstuff.tar.gz /tmp\n"
25412 #: ../tools/virt-tar.pl:62
25414 "You must I<not> use C<virt-tar> with the C<-u> option (upload) on live "
25415 "virtual machines. If you do this, you risk disk corruption in the VM. "
25416 "C<virt-tar> tries to stop you from doing this, but doesn't catch all cases."
25420 #: ../tools/virt-tar.pl:67
25422 "You can use C<-x> (extract) on live virtual machines, but you might get "
25423 "inconsistent results or errors if there is filesystem activity inside the "
25424 "VM. If the live VM is synched and quiescent, then C<virt-tar> will usually "
25425 "work, but the only way to guarantee consistent results is if the virtual "
25426 "machine is shut down."
25430 #: ../tools/virt-tar.pl:75
25432 "C<virt-tar> is a general purpose archive tool for downloading and uploading "
25433 "parts of a guest filesystem. There are many possibilities: making backups, "
25434 "uploading data files, snooping on guest activity, fixing or customizing "
25439 #: ../tools/virt-tar.pl:80
25441 "If you want to just view a single file, use L<virt-cat(1)>. If you just "
25442 "want to edit a single file, use L<virt-edit(1)>. For more complex cases you "
25443 "should look at the L<guestfish(1)> tool."
25447 #: ../tools/virt-tar.pl:84
25449 "There are two modes of operation: C<-x> (eXtract) downloads a directory and "
25450 "its contents (recursively) from the virtual machine into a local tarball. "
25451 "C<-u> uploads from a local tarball, unpacking it into a directory inside the "
25452 "virtual machine. You cannot use these two options together."
25456 #: ../tools/virt-tar.pl:90
25458 "In addition, you may need to use the C<-z> (gZip) option to enable "
25459 "compression. When uploading, you have to specify C<-z> if the upload file "
25460 "is compressed because virt-tar won't detect this on its own."
25464 #: ../tools/virt-tar.pl:94
25466 "C<virt-tar> can only handle tar (optionally gzipped) format tarballs. For "
25467 "example it cannot do PKZip files or bzip2 compression. If you want that "
25468 "then you'll have to rebuild the tarballs yourself. (This is a limitation of "
25469 "the L<libguestfs(3)> API)."
25473 #: ../tools/virt-tar.pl:135
25474 msgid "B<-x> | B<--extract> | B<--download>"
25478 #: ../tools/virt-tar.pl:137
25479 msgid "B<-u> | B<--upload>"
25483 #: ../tools/virt-tar.pl:139
25485 "Use C<-x> to extract (download) a directory from a virtual machine to a "
25490 #: ../tools/virt-tar.pl:142
25492 "Use C<-u> to upload and unpack from a local tarball into a virtual machine. "
25493 "Please read the L</WARNING> section above before using this option."
25497 #: ../tools/virt-tar.pl:146
25498 msgid "You must specify exactly one of these options."
25502 #: ../tools/virt-tar.pl:152
25503 msgid "B<-z> | B<--gzip>"
25507 #: ../tools/virt-tar.pl:154
25508 msgid "Specify that the input or output tarball is gzip-compressed."
25512 #: ../tools/virt-tar.pl:259
25514 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, L<Sys::"
25515 "Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs."
25520 #: ../tools/virt-win-reg.pl:38
25522 "virt-win-reg - Export and merge Windows Registry entries from a Windows guest"
25526 #: ../tools/virt-win-reg.pl:42
25529 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey'\n"
25534 #: ../tools/virt-win-reg.pl:44
25537 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' name\n"
25542 #: ../tools/virt-win-reg.pl:46
25545 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' @\n"
25550 #: ../tools/virt-win-reg.pl:48
25553 " virt-win-reg --merge domname [input.reg ...]\n"
25558 #: ../tools/virt-win-reg.pl:50
25561 " virt-win-reg [--options] disk.img ... # instead of domname\n"
25566 #: ../tools/virt-win-reg.pl:54
25568 "You must I<not> use C<virt-win-reg> with the C<--merge> option on live "
25569 "virtual machines. If you do this, you I<will> get irreversible disk "
25570 "corruption in the VM. C<virt-win-reg> tries to stop you from doing this, "
25571 "but doesn't catch all cases."
25575 #: ../tools/virt-win-reg.pl:59
25577 "Modifying the Windows Registry is an inherently risky operation. The format "
25578 "is deliberately obscure and undocumented, and Registry changes can leave the "
25579 "system unbootable. Therefore when using the C<--merge> option, make sure "
25580 "you have a reliable backup first."
25584 #: ../tools/virt-win-reg.pl:66
25586 "This program can export and merge Windows Registry entries from a Windows "
25591 #: ../tools/virt-win-reg.pl:69
25593 "The first parameter is the libvirt guest name or the raw disk image of a "
25598 #: ../tools/virt-win-reg.pl:72
25600 "If C<--merge> is I<not> specified, then the chosen registry key is displayed/"
25601 "exported (recursively). For example:"
25605 #: ../tools/virt-win-reg.pl:75
25608 " $ virt-win-reg Windows7 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft'\n"
25613 #: ../tools/virt-win-reg.pl:77
25615 "You can also display single values from within registry keys, for example:"
25619 #: ../tools/virt-win-reg.pl:80
25622 " $ cvkey='HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'\n"
25623 " $ virt-win-reg Windows7 $cvkey ProductName\n"
25624 " Windows 7 Enterprise\n"
25629 #: ../tools/virt-win-reg.pl:84
25631 "With C<--merge>, you can merge a textual regedit file into the Windows "
25636 #: ../tools/virt-win-reg.pl:87
25639 " $ virt-win-reg --merge Windows7 changes.reg\n"
25644 #: ../tools/virt-win-reg.pl:89
25645 msgid "SUPPORTED SYSTEMS"
25649 #: ../tools/virt-win-reg.pl:91
25651 "The program currently supports Windows NT-derived guests starting with "
25652 "Windows XP through to at least Windows 7."
25656 #: ../tools/virt-win-reg.pl:94
25658 "Registry support is done for C<HKEY_LOCAL_MACHINE\\SAM>, C<HKEY_LOCAL_MACHINE"
25659 "\\SECURITY>, C<HKEY_LOCAL_MACHINE\\SOFTWARE>, C<HKEY_LOCAL_MACHINE\\SYSTEM> "
25660 "and C<HKEY_USERS\\.DEFAULT>."
25664 #: ../tools/virt-win-reg.pl:98
25666 "You can use C<HKLM> as a shorthand for C<HKEY_LOCAL_MACHINE>, and C<HKU> for "
25671 #: ../tools/virt-win-reg.pl:101
25673 "C<HKEY_USERS\\$SID> and C<HKEY_CURRENT_USER> are B<not> supported at this "
25678 #: ../tools/virt-win-reg.pl:104
25683 #: ../tools/virt-win-reg.pl:106
25685 "This program is only meant for simple access to the registry. If you want "
25686 "to do complicated things with the registry, we suggest you download the "
25687 "Registry hive files from the guest using L<libguestfs(3)> or L<guestfish(1)> "
25688 "and access them locally, eg. using L<hivex(3)>, L<hivexsh(1)> or "
25689 "L<hivexregedit(1)>."
25693 #: ../tools/virt-win-reg.pl:112
25698 #: ../tools/virt-win-reg.pl:114
25700 "C<virt-win-reg> expects that regedit files have already been reencoded in "
25701 "the local encoding. Usually on Linux hosts, this means UTF-8 with Unix-"
25702 "style line endings. Since Windows regedit files are often in UTF-16LE with "
25703 "Windows-style line endings, you may need to reencode the whole file before "
25704 "or after processing."
25708 #: ../tools/virt-win-reg.pl:120
25710 "To reencode a file from Windows format to Linux (before processing it with "
25711 "the C<--merge> option), you would do something like this:"
25715 #: ../tools/virt-win-reg.pl:123
25718 " iconv -f utf-16le -t utf-8 < win.reg | dos2unix > linux.reg\n"
25723 #: ../tools/virt-win-reg.pl:125
25725 "To go in the opposite direction, after exporting and before sending the file "
25726 "to a Windows user, do something like this:"
25730 #: ../tools/virt-win-reg.pl:128
25733 " unix2dos linux.reg | iconv -f utf-8 -t utf-16le > win.reg\n"
25738 #: ../tools/virt-win-reg.pl:130
25739 msgid "For more information about encoding, see L<Win::Hivex::Regedit(3)>."
25743 #: ../tools/virt-win-reg.pl:132
25745 "If you are unsure about the current encoding, use the L<file(1)> command. "
25746 "Recent versions of Windows regedit.exe produce a UTF-16LE file with Windows-"
25747 "style (CRLF) line endings, like this:"
25751 #: ../tools/virt-win-reg.pl:136
25754 " $ file software.reg\n"
25755 " software.reg: Little-endian UTF-16 Unicode text, with very long lines,\n"
25756 " with CRLF line terminators\n"
25761 #: ../tools/virt-win-reg.pl:140
25762 msgid "This file would need conversion before you could C<--merge> it."
25766 #: ../tools/virt-win-reg.pl:142
25767 msgid "SHELL QUOTING"
25771 #: ../tools/virt-win-reg.pl:144
25773 "Be careful when passing parameters containing C<\\> (backslash) in the "
25774 "shell. Usually you will have to use 'single quotes' or double backslashes "
25775 "(but not both) to protect them from the shell."
25779 #: ../tools/virt-win-reg.pl:148
25780 msgid "Paths and value names are case-insensitive."
25784 #: ../tools/virt-win-reg.pl:150
25785 msgid "CurrentControlSet etc."
25789 #: ../tools/virt-win-reg.pl:152
25791 "Registry keys like C<CurrentControlSet> don't really exist in the Windows "
25792 "Registry at the level of the hive file, and therefore you cannot modify "
25797 #: ../tools/virt-win-reg.pl:156
25799 "C<CurrentControlSet> is usually an alias for C<ControlSet001>. In some "
25800 "circumstances it might refer to another control set. The way to find out is "
25801 "to look at the C<HKLM\\SYSTEM\\Select> key:"
25805 #: ../tools/virt-win-reg.pl:160
25808 " # virt-win-reg WindowsGuest 'HKLM\\SYSTEM\\Select'\n"
25809 " [HKEY_LOCAL_MACHINE\\SYSTEM\\Select]\n"
25810 " \"Current\"=dword:00000001\n"
25811 " \"Default\"=dword:00000001\n"
25812 " \"Failed\"=dword:00000000\n"
25813 " \"LastKnownGood\"=dword:00000002\n"
25818 #: ../tools/virt-win-reg.pl:167
25819 msgid "\"Default\" is the one which Windows will choose when it boots."
25823 #: ../tools/virt-win-reg.pl:169
25825 "Similarly, other C<Current...> keys in the path may need to be replaced."
25829 #: ../tools/virt-win-reg.pl:216
25834 #: ../tools/virt-win-reg.pl:218
25836 "In merge mode, this merges a textual regedit file into the Windows Registry "
25837 "of the virtual machine. If this flag is I<not> given then virt-win-reg "
25838 "displays or exports Registry entries instead."
25842 #: ../tools/virt-win-reg.pl:222
25844 "Note that C<--merge> is I<unsafe> to use on live virtual machines, and will "
25845 "result in disk corruption. However exporting (without this flag) is always "
25850 #: ../tools/virt-win-reg.pl:230
25851 msgid "B<--encoding> UTF-16LE|ASCII"
25855 #: ../tools/virt-win-reg.pl:232
25857 "When merging (only), you may need to specify the encoding for strings to be "
25858 "used in the hive file. This is explained in detail in L<Win::Hivex::Regedit"
25859 "(3)/ENCODING STRINGS>."
25863 #: ../tools/virt-win-reg.pl:236
25865 "The default is to use UTF-16LE, which should work with recent versions of "
25870 #: ../tools/virt-win-reg.pl:463
25872 "L<hivex(3)>, L<hivexsh(1)>, L<hivexregedit(1)>, L<guestfs(3)>, L<guestfish(1)"
25873 ">, L<virt-cat(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Win::Hivex"
25874 "(3)>, L<Win::Hivex::Regedit(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
25878 #: ../tools/virt-win-reg.pl:481
25881 " export LIBGUESTFS_DEBUG=1\n"
25882 " virt-win-reg --debug [... rest ...] > /tmp/virt-win-reg.log 2>&1\n"
25887 #: ../tools/virt-win-reg.pl:484
25889 "Attach /tmp/virt-win-reg.log to a new bug report at L<https://bugzilla."