Version 1.7.7.
[libguestfs.git] / po-docs / ja.po
1 # SOME DESCRIPTIVE TITLE.
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
4 #
5 #, fuzzy
6 msgid ""
7 msgstr ""
8 "Project-Id-Version: PACKAGE VERSION\n"
9 "Report-Msgid-Bugs-To: libguestfs@redhat.com\n"
10 "POT-Creation-Date: 2010-11-13 16:19+0000\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"
14 "Language: \n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
18
19 # type: =encoding
20 #: ../src/guestfs.pod:1 ../fish/guestfish.pod:1
21 #: ../test-tool/libguestfs-test-tool.pod:1 ../fuse/guestmount.pod:1
22 #: ../inspector/virt-inspector.pl:31 ../tools/virt-edit.pl:30
23 #: ../tools/virt-win-reg.pl:33 ../tools/virt-df.pl:32 ../tools/virt-ls.pl:30
24 #: ../tools/virt-resize.pl:38 ../tools/virt-list-filesystems.pl:28
25 #: ../tools/virt-tar.pl:29 ../tools/virt-rescue.pl:29
26 #: ../tools/virt-make-fs.pl:33 ../tools/virt-list-partitions.pl:28
27 msgid "utf8"
28 msgstr ""
29
30 # type: =head1
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:33 ../tools/virt-edit.pl:32
34 #: ../tools/virt-win-reg.pl:35 ../tools/virt-df.pl:34 ../tools/virt-ls.pl:32
35 #: ../tools/virt-resize.pl:40 ../tools/virt-list-filesystems.pl:30
36 #: ../tools/virt-tar.pl:31 ../tools/virt-rescue.pl:31
37 #: ../tools/virt-make-fs.pl:35 ../tools/virt-list-partitions.pl:30
38 msgid "NAME"
39 msgstr "名前"
40
41 # type: textblock
42 #: ../src/guestfs.pod:5
43 msgid "guestfs - Library for accessing and modifying virtual machine images"
44 msgstr ""
45
46 # type: =head1
47 #: ../src/guestfs.pod:7 ../fish/guestfish.pod:7
48 #: ../test-tool/libguestfs-test-tool.pod:7 ../fuse/guestmount.pod:7
49 #: ../inspector/virt-inspector.pl:37 ../tools/virt-edit.pl:36
50 #: ../tools/virt-win-reg.pl:39 ../tools/virt-df.pl:38 ../tools/virt-ls.pl:36
51 #: ../tools/virt-resize.pl:44 ../tools/virt-list-filesystems.pl:34
52 #: ../tools/virt-tar.pl:35 ../tools/virt-rescue.pl:35
53 #: ../tools/virt-make-fs.pl:39 ../tools/virt-list-partitions.pl:34
54 msgid "SYNOPSIS"
55 msgstr ""
56
57 # type: verbatim
58 #: ../src/guestfs.pod:9
59 #, no-wrap
60 msgid ""
61 " #include <guestfs.h>\n"
62 " \n"
63 msgstr ""
64
65 # type: verbatim
66 #: ../src/guestfs.pod:11
67 #, no-wrap
68 msgid ""
69 " guestfs_h *g = guestfs_create ();\n"
70 " guestfs_add_drive (g, \"guest.img\");\n"
71 " guestfs_launch (g);\n"
72 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
73 " guestfs_touch (g, \"/hello\");\n"
74 " guestfs_umount (g, \"/\");\n"
75 " guestfs_sync (g);\n"
76 " guestfs_close (g);\n"
77 "\n"
78 msgstr ""
79
80 # type: verbatim
81 #: ../src/guestfs.pod:20
82 #, no-wrap
83 msgid ""
84 " cc prog.c -o prog -lguestfs\n"
85 "or:\n"
86 " cc prog.c -o prog `pkg-config libguestfs --cflags --libs`\n"
87 "\n"
88 msgstr ""
89
90 # type: =head1
91 #: ../src/guestfs.pod:24 ../fish/guestfish.pod:30
92 #: ../test-tool/libguestfs-test-tool.pod:11 ../fuse/guestmount.pod:20
93 #: ../inspector/virt-inspector.pl:43 ../tools/virt-edit.pl:50
94 #: ../tools/virt-win-reg.pl:63 ../tools/virt-df.pl:46 ../tools/virt-ls.pl:42
95 #: ../tools/virt-resize.pl:50 ../tools/virt-list-filesystems.pl:40
96 #: ../tools/virt-tar.pl:72 ../tools/virt-rescue.pl:51
97 #: ../tools/virt-make-fs.pl:47 ../tools/virt-list-partitions.pl:40
98 msgid "DESCRIPTION"
99 msgstr ""
100
101 # type: textblock
102 #: ../src/guestfs.pod:26
103 msgid ""
104 "Libguestfs is a library for accessing and modifying guest disk images.  "
105 "Amongst the things this is good for: making batch configuration changes to "
106 "guests, getting disk used/free statistics (see also: virt-df), migrating "
107 "between virtualization systems (see also: virt-p2v), performing partial "
108 "backups, performing partial guest clones, cloning guests and changing "
109 "registry/UUID/hostname info, and much else besides."
110 msgstr ""
111
112 # type: textblock
113 #: ../src/guestfs.pod:34
114 msgid ""
115 "Libguestfs uses Linux kernel and qemu code, and can access any type of guest "
116 "filesystem that Linux and qemu can, including but not limited to: ext2/3/4, "
117 "btrfs, FAT and NTFS, LVM, many different disk partition schemes, qcow, "
118 "qcow2, vmdk."
119 msgstr ""
120
121 # type: textblock
122 #: ../src/guestfs.pod:39
123 msgid ""
124 "Libguestfs provides ways to enumerate guest storage (eg. partitions, LVs, "
125 "what filesystem is in each LV, etc.).  It can also run commands in the "
126 "context of the guest.  Also you can access filesystems over FUSE."
127 msgstr ""
128
129 # type: textblock
130 #: ../src/guestfs.pod:44
131 msgid ""
132 "Libguestfs is a library that can be linked with C and C++ management "
133 "programs (or management programs written in OCaml, Perl, Python, Ruby, Java, "
134 "PHP, Haskell or C#).  You can also use it from shell scripts or the command "
135 "line."
136 msgstr ""
137
138 # type: textblock
139 #: ../src/guestfs.pod:49
140 msgid ""
141 "You don't need to be root to use libguestfs, although obviously you do need "
142 "enough permissions to access the disk images."
143 msgstr ""
144
145 # type: textblock
146 #: ../src/guestfs.pod:52
147 msgid ""
148 "Libguestfs is a large API because it can do many things.  For a gentle "
149 "introduction, please read the L</API OVERVIEW> section next."
150 msgstr ""
151
152 # type: =head1
153 #: ../src/guestfs.pod:55
154 msgid "API OVERVIEW"
155 msgstr ""
156
157 # type: textblock
158 #: ../src/guestfs.pod:57
159 msgid ""
160 "This section provides a gentler overview of the libguestfs API.  We also try "
161 "to group API calls together, where that may not be obvious from reading "
162 "about the individual calls in the main section of this manual."
163 msgstr ""
164
165 # type: =head2
166 #: ../src/guestfs.pod:62
167 msgid "HANDLES"
168 msgstr ""
169
170 # type: textblock
171 #: ../src/guestfs.pod:64
172 msgid ""
173 "Before you can use libguestfs calls, you have to create a handle.  Then you "
174 "must add at least one disk image to the handle, followed by launching the "
175 "handle, then performing whatever operations you want, and finally closing "
176 "the handle.  By convention we use the single letter C<g> for the name of the "
177 "handle variable, although of course you can use any name you want."
178 msgstr ""
179
180 # type: textblock
181 #: ../src/guestfs.pod:71
182 msgid "The general structure of all libguestfs-using programs looks like this:"
183 msgstr ""
184
185 # type: verbatim
186 #: ../src/guestfs.pod:74
187 #, no-wrap
188 msgid ""
189 " guestfs_h *g = guestfs_create ();\n"
190 " \n"
191 msgstr ""
192
193 # type: verbatim
194 #: ../src/guestfs.pod:76
195 #, no-wrap
196 msgid ""
197 " /* Call guestfs_add_drive additional times if there are\n"
198 "  * multiple disk images.\n"
199 "  */\n"
200 " guestfs_add_drive (g, \"guest.img\");\n"
201 " \n"
202 msgstr ""
203
204 # type: verbatim
205 #: ../src/guestfs.pod:81
206 #, no-wrap
207 msgid ""
208 " /* Most manipulation calls won't work until you've launched\n"
209 "  * the handle 'g'.  You have to do this _after_ adding drives\n"
210 "  * and _before_ other commands.\n"
211 "  */\n"
212 " guestfs_launch (g);\n"
213 " \n"
214 msgstr ""
215
216 # type: verbatim
217 #: ../src/guestfs.pod:87
218 #, no-wrap
219 msgid ""
220 " /* Now you can examine what partitions, LVs etc are available.\n"
221 "  */\n"
222 " char **partitions = guestfs_list_partitions (g);\n"
223 " char **logvols = guestfs_lvs (g);\n"
224 " \n"
225 msgstr ""
226
227 # type: verbatim
228 #: ../src/guestfs.pod:92
229 #, no-wrap
230 msgid ""
231 " /* To access a filesystem in the image, you must mount it.\n"
232 "  */\n"
233 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
234 " \n"
235 msgstr ""
236
237 # type: verbatim
238 #: ../src/guestfs.pod:96
239 #, no-wrap
240 msgid ""
241 " /* Now you can perform filesystem actions on the guest\n"
242 "  * disk image.\n"
243 "  */\n"
244 " guestfs_touch (g, \"/hello\");\n"
245 " \n"
246 msgstr ""
247
248 # type: verbatim
249 #: ../src/guestfs.pod:101
250 #, no-wrap
251 msgid ""
252 " /* You only need to call guestfs_sync if you have made\n"
253 "  * changes to the guest image.  (But if you've made changes\n"
254 "  * then you *must* sync).  See also: guestfs_umount and\n"
255 "  * guestfs_umount_all calls.\n"
256 "  */\n"
257 " guestfs_sync (g);\n"
258 " \n"
259 msgstr ""
260
261 # type: verbatim
262 #: ../src/guestfs.pod:108
263 #, no-wrap
264 msgid ""
265 " /* Close the handle 'g'. */\n"
266 " guestfs_close (g);\n"
267 "\n"
268 msgstr ""
269
270 # type: textblock
271 #: ../src/guestfs.pod:111
272 msgid ""
273 "The code above doesn't include any error checking.  In real code you should "
274 "check return values carefully for errors.  In general all functions that "
275 "return integers return C<-1> on error, and all functions that return "
276 "pointers return C<NULL> on error.  See section L</ERROR HANDLING> below for "
277 "how to handle errors, and consult the documentation for each function call "
278 "below to see precisely how they return error indications."
279 msgstr ""
280
281 # type: =head2
282 #: ../src/guestfs.pod:119
283 msgid "DISK IMAGES"
284 msgstr ""
285
286 # type: textblock
287 #: ../src/guestfs.pod:121
288 msgid ""
289 "The image filename (C<\"guest.img\"> in the example above) could be a disk "
290 "image from a virtual machine, a L<dd(1)> copy of a physical hard disk, an "
291 "actual block device, or simply an empty file of zeroes that you have created "
292 "through L<posix_fallocate(3)>.  Libguestfs lets you do useful things to all "
293 "of these."
294 msgstr ""
295
296 # type: textblock
297 #: ../src/guestfs.pod:127
298 msgid ""
299 "The call you should use in modern code for adding drives is L</"
300 "guestfs_add_drive_opts>.  To add a disk image, allowing writes, and "
301 "specifying that the format is raw, do:"
302 msgstr ""
303
304 # type: verbatim
305 #: ../src/guestfs.pod:131
306 #, no-wrap
307 msgid ""
308 " guestfs_add_drive_opts (g, filename,\n"
309 "                         GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
310 "                         -1);\n"
311 "\n"
312 msgstr ""
313
314 # type: textblock
315 #: ../src/guestfs.pod:135
316 msgid "You can add a disk read-only using:"
317 msgstr ""
318
319 # type: verbatim
320 #: ../src/guestfs.pod:137
321 #, no-wrap
322 msgid ""
323 " guestfs_add_drive_opts (g, filename,\n"
324 "                         GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
325 "                         GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
326 "                         -1);\n"
327 "\n"
328 msgstr ""
329
330 # type: textblock
331 #: ../src/guestfs.pod:142
332 msgid ""
333 "or by calling the older function L</guestfs_add_drive_ro>.  In either case "
334 "libguestfs won't modify the file."
335 msgstr ""
336
337 # type: textblock
338 #: ../src/guestfs.pod:145
339 msgid ""
340 "Be extremely cautious if the disk image is in use, eg. if it is being used "
341 "by a virtual machine.  Adding it read-write will almost certainly cause disk "
342 "corruption, but adding it read-only is safe."
343 msgstr ""
344
345 # type: textblock
346 #: ../src/guestfs.pod:149
347 msgid ""
348 "You must add at least one disk image, and you may add multiple disk images.  "
349 "In the API, the disk images are usually referred to as C</dev/sda> (for the "
350 "first one you added), C</dev/sdb> (for the second one you added), etc."
351 msgstr ""
352
353 # type: textblock
354 #: ../src/guestfs.pod:154
355 msgid ""
356 "Once L</guestfs_launch> has been called you cannot add any more images.  You "
357 "can call L</guestfs_list_devices> to get a list of the device names, in the "
358 "order that you added them.  See also L</BLOCK DEVICE NAMING> below."
359 msgstr ""
360
361 # type: =head2
362 #: ../src/guestfs.pod:159
363 msgid "MOUNTING"
364 msgstr ""
365
366 # type: textblock
367 #: ../src/guestfs.pod:161
368 msgid ""
369 "Before you can read or write files, create directories and so on in a disk "
370 "image that contains filesystems, you have to mount those filesystems using "
371 "L</guestfs_mount>.  If you already know that a disk image contains (for "
372 "example) one partition with a filesystem on that partition, then you can "
373 "mount it directly:"
374 msgstr ""
375
376 # type: verbatim
377 #: ../src/guestfs.pod:167
378 #, no-wrap
379 msgid ""
380 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
381 "\n"
382 msgstr ""
383
384 # type: textblock
385 #: ../src/guestfs.pod:169
386 msgid ""
387 "where C</dev/sda1> means literally the first partition (C<1>) of the first "
388 "disk image that we added (C</dev/sda>).  If the disk contains Linux LVM2 "
389 "logical volumes you could refer to those instead (eg. C</dev/VG/LV>)."
390 msgstr ""
391
392 # type: textblock
393 #: ../src/guestfs.pod:173
394 msgid ""
395 "If you are given a disk image and you don't know what it contains then you "
396 "have to find out.  Libguestfs can do that too: use L</"
397 "guestfs_list_partitions> and L</guestfs_lvs> to list possible partitions and "
398 "LVs, and either try mounting each to see what is mountable, or else examine "
399 "them with L</guestfs_vfs_type> or L</guestfs_file>.  Libguestfs also has a "
400 "set of APIs for inspection of disk images (see L</INSPECTION> below).  But "
401 "you might find it easier to look at higher level programs built on top of "
402 "libguestfs, in particular L<virt-inspector(1)>."
403 msgstr ""
404
405 # type: textblock
406 #: ../src/guestfs.pod:183
407 msgid ""
408 "To mount a disk image read-only, use L</guestfs_mount_ro>.  There are "
409 "several other variations of the C<guestfs_mount_*> call."
410 msgstr ""
411
412 # type: =head2
413 #: ../src/guestfs.pod:186
414 msgid "FILESYSTEM ACCESS AND MODIFICATION"
415 msgstr ""
416
417 # type: textblock
418 #: ../src/guestfs.pod:188
419 msgid ""
420 "The majority of the libguestfs API consists of fairly low-level calls for "
421 "accessing and modifying the files, directories, symlinks etc on mounted "
422 "filesystems.  There are over a hundred such calls which you can find listed "
423 "in detail below in this man page, and we don't even pretend to cover them "
424 "all in this overview."
425 msgstr ""
426
427 # type: textblock
428 #: ../src/guestfs.pod:194
429 msgid ""
430 "Specify filenames as full paths, starting with C<\"/\"> and including the "
431 "mount point."
432 msgstr ""
433
434 # type: textblock
435 #: ../src/guestfs.pod:197
436 msgid ""
437 "For example, if you mounted a filesystem at C<\"/\"> and you want to read "
438 "the file called C<\"etc/passwd\"> then you could do:"
439 msgstr ""
440
441 # type: verbatim
442 #: ../src/guestfs.pod:200
443 #, no-wrap
444 msgid ""
445 " char *data = guestfs_cat (g, \"/etc/passwd\");\n"
446 "\n"
447 msgstr ""
448
449 # type: textblock
450 #: ../src/guestfs.pod:202
451 msgid ""
452 "This would return C<data> as a newly allocated buffer containing the full "
453 "content of that file (with some conditions: see also L</DOWNLOADING> below), "
454 "or C<NULL> if there was an error."
455 msgstr ""
456
457 # type: textblock
458 #: ../src/guestfs.pod:206
459 msgid ""
460 "As another example, to create a top-level directory on that filesystem "
461 "called C<\"var\"> you would do:"
462 msgstr ""
463
464 # type: verbatim
465 #: ../src/guestfs.pod:209
466 #, no-wrap
467 msgid ""
468 " guestfs_mkdir (g, \"/var\");\n"
469 "\n"
470 msgstr ""
471
472 # type: textblock
473 #: ../src/guestfs.pod:211
474 msgid "To create a symlink you could do:"
475 msgstr ""
476
477 # type: verbatim
478 #: ../src/guestfs.pod:213
479 #, no-wrap
480 msgid ""
481 " guestfs_ln_s (g, \"/etc/init.d/portmap\",\n"
482 "               \"/etc/rc3.d/S30portmap\");\n"
483 "\n"
484 msgstr ""
485
486 # type: textblock
487 #: ../src/guestfs.pod:216
488 msgid ""
489 "Libguestfs will reject attempts to use relative paths and there is no "
490 "concept of a current working directory."
491 msgstr ""
492
493 # type: textblock
494 #: ../src/guestfs.pod:219
495 msgid ""
496 "Libguestfs can return errors in many situations: for example if the "
497 "filesystem isn't writable, or if a file or directory that you requested "
498 "doesn't exist.  If you are using the C API (documented here)  you have to "
499 "check for those error conditions after each call.  (Other language bindings "
500 "turn these errors into exceptions)."
501 msgstr ""
502
503 # type: textblock
504 #: ../src/guestfs.pod:225
505 msgid ""
506 "File writes are affected by the per-handle umask, set by calling L</"
507 "guestfs_umask> and defaulting to 022.  See L</UMASK>."
508 msgstr ""
509
510 # type: =head2
511 #: ../src/guestfs.pod:228
512 msgid "PARTITIONING"
513 msgstr ""
514
515 # type: textblock
516 #: ../src/guestfs.pod:230
517 msgid ""
518 "Libguestfs contains API calls to read, create and modify partition tables on "
519 "disk images."
520 msgstr ""
521
522 # type: textblock
523 #: ../src/guestfs.pod:233
524 msgid ""
525 "In the common case where you want to create a single partition covering the "
526 "whole disk, you should use the L</guestfs_part_disk> call:"
527 msgstr ""
528
529 # type: verbatim
530 #: ../src/guestfs.pod:237
531 #, no-wrap
532 msgid ""
533 " const char *parttype = \"mbr\";\n"
534 " if (disk_is_larger_than_2TB)\n"
535 "   parttype = \"gpt\";\n"
536 " guestfs_part_disk (g, \"/dev/sda\", parttype);\n"
537 "\n"
538 msgstr ""
539
540 # type: textblock
541 #: ../src/guestfs.pod:242
542 msgid ""
543 "Obviously this effectively wipes anything that was on that disk image before."
544 msgstr ""
545
546 # type: =head2
547 #: ../src/guestfs.pod:245
548 msgid "LVM2"
549 msgstr ""
550
551 # type: textblock
552 #: ../src/guestfs.pod:247
553 msgid ""
554 "Libguestfs provides access to a large part of the LVM2 API, such as L</"
555 "guestfs_lvcreate> and L</guestfs_vgremove>.  It won't make much sense unless "
556 "you familiarize yourself with the concepts of physical volumes, volume "
557 "groups and logical volumes."
558 msgstr ""
559
560 # type: textblock
561 #: ../src/guestfs.pod:252
562 msgid ""
563 "This author strongly recommends reading the LVM HOWTO, online at L<http://"
564 "tldp.org/HOWTO/LVM-HOWTO/>."
565 msgstr ""
566
567 # type: =head2
568 #: ../src/guestfs.pod:255
569 msgid "DOWNLOADING"
570 msgstr ""
571
572 # type: textblock
573 #: ../src/guestfs.pod:257
574 msgid ""
575 "Use L</guestfs_cat> to download small, text only files.  This call is "
576 "limited to files which are less than 2 MB and which cannot contain any ASCII "
577 "NUL (C<\\0>) characters.  However it has a very simple to use API."
578 msgstr ""
579
580 # type: textblock
581 #: ../src/guestfs.pod:262
582 msgid ""
583 "L</guestfs_read_file> can be used to read files which contain arbitrary 8 "
584 "bit data, since it returns a (pointer, size) pair.  However it is still "
585 "limited to \"small\" files, less than 2 MB."
586 msgstr ""
587
588 # type: textblock
589 #: ../src/guestfs.pod:266
590 msgid ""
591 "L</guestfs_download> can be used to download any file, with no limits on "
592 "content or size (even files larger than 4 GB)."
593 msgstr ""
594
595 # type: textblock
596 #: ../src/guestfs.pod:269
597 msgid ""
598 "To download multiple files, see L</guestfs_tar_out> and L</guestfs_tgz_out>."
599 msgstr ""
600
601 # type: =head2
602 #: ../src/guestfs.pod:272
603 msgid "UPLOADING"
604 msgstr ""
605
606 # type: textblock
607 #: ../src/guestfs.pod:274
608 msgid ""
609 "It's often the case that you want to write a file or files to the disk image."
610 msgstr ""
611
612 # type: textblock
613 #: ../src/guestfs.pod:277
614 msgid ""
615 "To write a small file with fixed content, use L</guestfs_write>.  To create "
616 "a file of all zeroes, use L</guestfs_truncate_size> (sparse) or L</"
617 "guestfs_fallocate64> (with all disk blocks allocated).  There are a variety "
618 "of other functions for creating test files, for example L</guestfs_fill> and "
619 "L</guestfs_fill_pattern>."
620 msgstr ""
621
622 # type: textblock
623 #: ../src/guestfs.pod:283
624 msgid ""
625 "To upload a single file, use L</guestfs_upload>.  This call has no limits on "
626 "file content or size (even files larger than 4 GB)."
627 msgstr ""
628
629 # type: textblock
630 #: ../src/guestfs.pod:286
631 msgid ""
632 "To upload multiple files, see L</guestfs_tar_in> and L</guestfs_tgz_in>."
633 msgstr ""
634
635 # type: textblock
636 #: ../src/guestfs.pod:288
637 msgid ""
638 "However the fastest way to upload I<large numbers of arbitrary files> is to "
639 "turn them into a squashfs or CD ISO (see L<mksquashfs(8)> and L<mkisofs(8)"
640 ">), then attach this using L</guestfs_add_drive_ro>.  If you add the drive "
641 "in a predictable way (eg. adding it last after all other drives) then you "
642 "can get the device name from L</guestfs_list_devices> and mount it directly "
643 "using L</guestfs_mount_ro>.  Note that squashfs images are sometimes non-"
644 "portable between kernel versions, and they don't support labels or UUIDs.  "
645 "If you want to pre-build an image or you need to mount it using a label or "
646 "UUID, use an ISO image instead."
647 msgstr ""
648
649 # type: =head2
650 #: ../src/guestfs.pod:299
651 msgid "COPYING"
652 msgstr ""
653
654 # type: textblock
655 #: ../src/guestfs.pod:301
656 msgid ""
657 "There are various different commands for copying between files and devices "
658 "and in and out of the guest filesystem.  These are summarised in the table "
659 "below."
660 msgstr ""
661
662 # type: =item
663 #: ../src/guestfs.pod:307
664 msgid "B<file> to B<file>"
665 msgstr ""
666
667 # type: textblock
668 #: ../src/guestfs.pod:309
669 msgid ""
670 "Use L</guestfs_cp> to copy a single file, or L</guestfs_cp_a> to copy "
671 "directories recursively."
672 msgstr ""
673
674 # type: =item
675 #: ../src/guestfs.pod:312
676 msgid "B<file or device> to B<file or device>"
677 msgstr ""
678
679 # type: textblock
680 #: ../src/guestfs.pod:314
681 msgid ""
682 "Use L</guestfs_dd> which efficiently uses L<dd(1)> to copy between files and "
683 "devices in the guest."
684 msgstr ""
685
686 # type: textblock
687 #: ../src/guestfs.pod:317
688 msgid "Example: duplicate the contents of an LV:"
689 msgstr ""
690
691 # type: verbatim
692 #: ../src/guestfs.pod:319
693 #, no-wrap
694 msgid ""
695 " guestfs_dd (g, \"/dev/VG/Original\", \"/dev/VG/Copy\");\n"
696 "\n"
697 msgstr ""
698
699 # type: textblock
700 #: ../src/guestfs.pod:321
701 msgid ""
702 "The destination (C</dev/VG/Copy>) must be at least as large as the source "
703 "(C</dev/VG/Original>).  To copy less than the whole source device, use L</"
704 "guestfs_copy_size>."
705 msgstr ""
706
707 # type: =item
708 #: ../src/guestfs.pod:325
709 msgid "B<file on the host> to B<file or device>"
710 msgstr ""
711
712 # type: textblock
713 #: ../src/guestfs.pod:327
714 msgid "Use L</guestfs_upload>.  See L</UPLOADING> above."
715 msgstr ""
716
717 # type: =item
718 #: ../src/guestfs.pod:329
719 msgid "B<file or device> to B<file on the host>"
720 msgstr ""
721
722 # type: textblock
723 #: ../src/guestfs.pod:331
724 msgid "Use L</guestfs_download>.  See L</DOWNLOADING> above."
725 msgstr ""
726
727 # type: =head2
728 #: ../src/guestfs.pod:335
729 msgid "LISTING FILES"
730 msgstr ""
731
732 # type: textblock
733 #: ../src/guestfs.pod:337
734 msgid ""
735 "L</guestfs_ll> is just designed for humans to read (mainly when using the "
736 "L<guestfish(1)>-equivalent command C<ll>)."
737 msgstr ""
738
739 # type: textblock
740 #: ../src/guestfs.pod:340
741 msgid ""
742 "L</guestfs_ls> is a quick way to get a list of files in a directory from "
743 "programs, as a flat list of strings."
744 msgstr ""
745
746 # type: textblock
747 #: ../src/guestfs.pod:343
748 msgid ""
749 "L</guestfs_readdir> is a programmatic way to get a list of files in a "
750 "directory, plus additional information about each one.  It is more "
751 "equivalent to using the L<readdir(3)> call on a local filesystem."
752 msgstr ""
753
754 # type: textblock
755 #: ../src/guestfs.pod:347
756 msgid ""
757 "L</guestfs_find> and L</guestfs_find0> can be used to recursively list files."
758 msgstr ""
759
760 # type: =head2
761 #: ../src/guestfs.pod:350
762 msgid "RUNNING COMMANDS"
763 msgstr ""
764
765 # type: textblock
766 #: ../src/guestfs.pod:352
767 msgid ""
768 "Although libguestfs is primarily an API for manipulating files inside guest "
769 "images, we also provide some limited facilities for running commands inside "
770 "guests."
771 msgstr ""
772
773 # type: textblock
774 #: ../src/guestfs.pod:356
775 msgid "There are many limitations to this:"
776 msgstr ""
777
778 # type: =item
779 #: ../src/guestfs.pod:360 ../src/guestfs.pod:365 ../src/guestfs.pod:370
780 #: ../src/guestfs.pod:374 ../src/guestfs.pod:379 ../src/guestfs.pod:383
781 #: ../src/guestfs.pod:388 ../src/guestfs.pod:393 ../src/guestfs.pod:955
782 #: ../src/guestfs.pod:959 ../src/guestfs.pod:963 ../src/guestfs.pod:968
783 #: ../src/guestfs.pod:976 ../src/guestfs.pod:995 ../src/guestfs.pod:1003
784 #: ../src/guestfs.pod:1025 ../src/guestfs.pod:1029 ../src/guestfs.pod:1033
785 #: ../src/guestfs.pod:1037 ../src/guestfs.pod:1041 ../src/guestfs.pod:1045
786 #: ../src/guestfs.pod:1519 ../src/guestfs.pod:1524 ../src/guestfs.pod:1528
787 #: ../src/guestfs.pod:1638 ../src/guestfs.pod:1643 ../src/guestfs.pod:1647
788 #: ../src/guestfs.pod:1991 ../src/guestfs.pod:1997 ../src/guestfs.pod:2002
789 #: ../src/guestfs.pod:2008 ../src/guestfs.pod:2115 ../src/guestfs.pod:2119
790 #: ../src/guestfs.pod:2123 ../src/guestfs.pod:2127
791 #: ../src/guestfs-actions.pod:15 ../src/guestfs-actions.pod:22
792 #: ../src/guestfs-actions.pod:569 ../src/guestfs-actions.pod:577
793 #: ../src/guestfs-actions.pod:584 ../src/guestfs-actions.pod:591
794 #: ../src/guestfs-actions.pod:1587 ../src/guestfs-actions.pod:1591
795 #: ../src/guestfs-actions.pod:1595 ../src/guestfs-actions.pod:1599
796 #: ../src/guestfs-actions.pod:1607 ../src/guestfs-actions.pod:1611
797 #: ../src/guestfs-actions.pod:1615 ../src/guestfs-actions.pod:1625
798 #: ../src/guestfs-actions.pod:1629 ../src/guestfs-actions.pod:1633
799 #: ../src/guestfs-actions.pod:1771 ../src/guestfs-actions.pod:1775
800 #: ../src/guestfs-actions.pod:1780 ../src/guestfs-actions.pod:1785
801 #: ../src/guestfs-actions.pod:1846 ../src/guestfs-actions.pod:1850
802 #: ../src/guestfs-actions.pod:1855 ../fish/guestfish.pod:376
803 #: ../fish/guestfish.pod:380 ../fish/guestfish.pod:384
804 #: ../fish/guestfish.pod:388 ../fish/guestfish-actions.pod:13
805 #: ../fish/guestfish-actions.pod:20 ../fish/guestfish-actions.pod:375
806 #: ../fish/guestfish-actions.pod:383 ../fish/guestfish-actions.pod:390
807 #: ../fish/guestfish-actions.pod:397 ../fish/guestfish-actions.pod:1067
808 #: ../fish/guestfish-actions.pod:1071 ../fish/guestfish-actions.pod:1075
809 #: ../fish/guestfish-actions.pod:1079 ../fish/guestfish-actions.pod:1087
810 #: ../fish/guestfish-actions.pod:1091 ../fish/guestfish-actions.pod:1095
811 #: ../fish/guestfish-actions.pod:1105 ../fish/guestfish-actions.pod:1109
812 #: ../fish/guestfish-actions.pod:1113 ../fish/guestfish-actions.pod:1203
813 #: ../fish/guestfish-actions.pod:1207 ../fish/guestfish-actions.pod:1212
814 #: ../fish/guestfish-actions.pod:1217 ../fish/guestfish-actions.pod:1259
815 #: ../fish/guestfish-actions.pod:1263 ../fish/guestfish-actions.pod:1268
816 #: ../inspector/virt-inspector.pl:550 ../inspector/virt-inspector.pl:554
817 #: ../tools/virt-df.pl:161 ../tools/virt-df.pl:167 ../tools/virt-resize.pl:348
818 #: ../tools/virt-resize.pl:353 ../tools/virt-resize.pl:363
819 msgid "*"
820 msgstr ""
821
822 # type: textblock
823 #: ../src/guestfs.pod:362
824 msgid ""
825 "The kernel version that the command runs under will be different from what "
826 "it expects."
827 msgstr ""
828
829 # type: textblock
830 #: ../src/guestfs.pod:367
831 msgid ""
832 "If the command needs to communicate with daemons, then most likely they "
833 "won't be running."
834 msgstr ""
835
836 # type: textblock
837 #: ../src/guestfs.pod:372
838 msgid "The command will be running in limited memory."
839 msgstr ""
840
841 # type: textblock
842 #: ../src/guestfs.pod:376
843 msgid ""
844 "The network may not be available unless you enable it (see L</"
845 "guestfs_set_network>)."
846 msgstr ""
847
848 # type: textblock
849 #: ../src/guestfs.pod:381
850 msgid "Only supports Linux guests (not Windows, BSD, etc)."
851 msgstr ""
852
853 # type: textblock
854 #: ../src/guestfs.pod:385
855 msgid ""
856 "Architecture limitations (eg. won't work for a PPC guest on an X86 host)."
857 msgstr ""
858
859 # type: textblock
860 #: ../src/guestfs.pod:390
861 msgid ""
862 "For SELinux guests, you may need to enable SELinux and load policy first.  "
863 "See L</SELINUX> in this manpage."
864 msgstr ""
865
866 # type: textblock
867 #: ../src/guestfs.pod:395
868 msgid ""
869 "I<Security:> It is not safe to run commands from untrusted, possibly "
870 "malicious guests.  These commands may attempt to exploit your program by "
871 "sending unexpected output.  They could also try to exploit the Linux kernel "
872 "or qemu provided by the libguestfs appliance.  They could use the network "
873 "provided by the libguestfs appliance to bypass ordinary network partitions "
874 "and firewalls.  They could use the elevated privileges or different SELinux "
875 "context of your program to their advantage."
876 msgstr ""
877
878 # type: textblock
879 #: ../src/guestfs.pod:404
880 msgid ""
881 "A secure alternative is to use libguestfs to install a \"firstboot\" script "
882 "(a script which runs when the guest next boots normally), and to have this "
883 "script run the commands you want in the normal context of the running guest, "
884 "network security and so on.  For information about other security issues, "
885 "see L</SECURITY>."
886 msgstr ""
887
888 # type: textblock
889 #: ../src/guestfs.pod:412
890 msgid ""
891 "The two main API calls to run commands are L</guestfs_command> and L</"
892 "guestfs_sh> (there are also variations)."
893 msgstr ""
894
895 # type: textblock
896 #: ../src/guestfs.pod:415
897 msgid ""
898 "The difference is that L</guestfs_sh> runs commands using the shell, so any "
899 "shell globs, redirections, etc will work."
900 msgstr ""
901
902 # type: =head2
903 #: ../src/guestfs.pod:418
904 msgid "CONFIGURATION FILES"
905 msgstr ""
906
907 # type: textblock
908 #: ../src/guestfs.pod:420
909 msgid ""
910 "To read and write configuration files in Linux guest filesystems, we "
911 "strongly recommend using Augeas.  For example, Augeas understands how to "
912 "read and write, say, a Linux shadow password file or X.org configuration "
913 "file, and so avoids you having to write that code."
914 msgstr ""
915
916 # type: textblock
917 #: ../src/guestfs.pod:425
918 msgid ""
919 "The main Augeas calls are bound through the C<guestfs_aug_*> APIs.  We don't "
920 "document Augeas itself here because there is excellent documentation on the "
921 "L<http://augeas.net/> website."
922 msgstr ""
923
924 # type: textblock
925 #: ../src/guestfs.pod:429
926 msgid ""
927 "If you don't want to use Augeas (you fool!) then try calling L</"
928 "guestfs_read_lines> to get the file as a list of lines which you can iterate "
929 "over."
930 msgstr ""
931
932 # type: =head2
933 #: ../src/guestfs.pod:433
934 msgid "SELINUX"
935 msgstr ""
936
937 # type: textblock
938 #: ../src/guestfs.pod:435
939 msgid ""
940 "We support SELinux guests.  To ensure that labeling happens correctly in "
941 "SELinux guests, you need to enable SELinux and load the guest's policy:"
942 msgstr ""
943
944 # type: =item
945 #: ../src/guestfs.pod:441 ../src/guestfs.pod:1140 ../src/guestfs.pod:1271
946 msgid "1."
947 msgstr ""
948
949 # type: textblock
950 #: ../src/guestfs.pod:443
951 msgid "Before launching, do:"
952 msgstr ""
953
954 # type: verbatim
955 #: ../src/guestfs.pod:445
956 #, no-wrap
957 msgid ""
958 " guestfs_set_selinux (g, 1);\n"
959 "\n"
960 msgstr ""
961
962 # type: =item
963 #: ../src/guestfs.pod:447 ../src/guestfs.pod:1144 ../src/guestfs.pod:1275
964 msgid "2."
965 msgstr ""
966
967 # type: textblock
968 #: ../src/guestfs.pod:449
969 msgid ""
970 "After mounting the guest's filesystem(s), load the policy.  This is best "
971 "done by running the L<load_policy(8)> command in the guest itself:"
972 msgstr ""
973
974 # type: verbatim
975 #: ../src/guestfs.pod:453
976 #, no-wrap
977 msgid ""
978 " guestfs_sh (g, \"/usr/sbin/load_policy\");\n"
979 "\n"
980 msgstr ""
981
982 # type: textblock
983 #: ../src/guestfs.pod:455
984 msgid ""
985 "(Older versions of C<load_policy> require you to specify the name of the "
986 "policy file)."
987 msgstr ""
988
989 # type: =item
990 #: ../src/guestfs.pod:458 ../src/guestfs.pod:1281
991 msgid "3."
992 msgstr ""
993
994 # type: textblock
995 #: ../src/guestfs.pod:460
996 msgid ""
997 "Optionally, set the security context for the API.  The correct security "
998 "context to use can only be known by inspecting the guest.  As an example:"
999 msgstr ""
1000
1001 # type: verbatim
1002 #: ../src/guestfs.pod:464
1003 #, no-wrap
1004 msgid ""
1005 " guestfs_setcon (g, \"unconfined_u:unconfined_r:unconfined_t:s0\");\n"
1006 "\n"
1007 msgstr ""
1008
1009 # type: textblock
1010 #: ../src/guestfs.pod:468
1011 msgid "This will work for running commands and editing existing files."
1012 msgstr ""
1013
1014 # type: textblock
1015 #: ../src/guestfs.pod:470
1016 msgid ""
1017 "When new files are created, you may need to label them explicitly, for "
1018 "example by running the external command C<restorecon pathname>."
1019 msgstr ""
1020
1021 # type: =head2
1022 #: ../src/guestfs.pod:474
1023 msgid "UMASK"
1024 msgstr ""
1025
1026 # type: textblock
1027 #: ../src/guestfs.pod:476
1028 msgid ""
1029 "Certain calls are affected by the current file mode creation mask (the "
1030 "\"umask\").  In particular ones which create files or directories, such as "
1031 "L</guestfs_touch>, L</guestfs_mknod> or L</guestfs_mkdir>.  This affects "
1032 "either the default mode that the file is created with or modifies the mode "
1033 "that you supply."
1034 msgstr ""
1035
1036 # type: textblock
1037 #: ../src/guestfs.pod:482
1038 msgid ""
1039 "The default umask is C<022>, so files are created with modes such as C<0644> "
1040 "and directories with C<0755>."
1041 msgstr ""
1042
1043 # type: textblock
1044 #: ../src/guestfs.pod:485
1045 msgid ""
1046 "There are two ways to avoid being affected by umask.  Either set umask to 0 "
1047 "(call C<guestfs_umask (g, 0)> early after launching).  Or call L</"
1048 "guestfs_chmod> after creating each file or directory."
1049 msgstr ""
1050
1051 # type: textblock
1052 #: ../src/guestfs.pod:489
1053 msgid "For more information about umask, see L<umask(2)>."
1054 msgstr ""
1055
1056 # type: =head1
1057 #: ../src/guestfs.pod:491 ../fish/guestfish.pod:669
1058 msgid "ENCRYPTED DISKS"
1059 msgstr ""
1060
1061 # type: textblock
1062 #: ../src/guestfs.pod:493
1063 msgid ""
1064 "Libguestfs allows you to access Linux guests which have been encrypted using "
1065 "whole disk encryption that conforms to the Linux Unified Key Setup (LUKS) "
1066 "standard.  This includes nearly all whole disk encryption systems used by "
1067 "modern Linux guests."
1068 msgstr ""
1069
1070 # type: textblock
1071 #: ../src/guestfs.pod:499
1072 msgid ""
1073 "Use L</guestfs_vfs_type> to identify LUKS-encrypted block devices (it "
1074 "returns the string C<crypto_LUKS>)."
1075 msgstr ""
1076
1077 # type: textblock
1078 #: ../src/guestfs.pod:502
1079 msgid ""
1080 "Then open these devices by calling L</guestfs_luks_open>.  Obviously you "
1081 "will require the passphrase!"
1082 msgstr ""
1083
1084 # type: textblock
1085 #: ../src/guestfs.pod:505
1086 msgid ""
1087 "Opening a LUKS device creates a new device mapper device called C</dev/"
1088 "mapper/mapname> (where C<mapname> is the string you supply to L</"
1089 "guestfs_luks_open>).  Reads and writes to this mapper device are decrypted "
1090 "from and encrypted to the underlying block device respectively."
1091 msgstr ""
1092
1093 # type: textblock
1094 #: ../src/guestfs.pod:511
1095 msgid ""
1096 "LVM volume groups on the device can be made visible by calling L</"
1097 "guestfs_vgscan> followed by L</guestfs_vg_activate_all>.  The logical volume"
1098 "(s) can now be mounted in the usual way."
1099 msgstr ""
1100
1101 # type: textblock
1102 #: ../src/guestfs.pod:515
1103 msgid ""
1104 "Use the reverse process to close a LUKS device.  Unmount any logical volumes "
1105 "on it, deactivate the volume groups by caling C<guestfs_vg_activate (g, 0, "
1106 "[\"/dev/VG\"])>.  Then close the mapper device by calling L</"
1107 "guestfs_luks_close> on the C</dev/mapper/mapname> device (I<not> the "
1108 "underlying encrypted block device)."
1109 msgstr ""
1110
1111 # type: =head2
1112 #: ../src/guestfs.pod:522
1113 msgid "INSPECTION"
1114 msgstr ""
1115
1116 # type: textblock
1117 #: ../src/guestfs.pod:524
1118 msgid ""
1119 "Libguestfs has APIs for inspecting an unknown disk image to find out if it "
1120 "contains operating systems.  (These APIs used to be in a separate Perl-only "
1121 "library called L<Sys::Guestfs::Lib(3)> but since version 1.5.3 the most "
1122 "frequently used part of this library has been rewritten in C and moved into "
1123 "the core code)."
1124 msgstr ""
1125
1126 # type: textblock
1127 #: ../src/guestfs.pod:530
1128 msgid ""
1129 "Add all disks belonging to the unknown virtual machine and call L</"
1130 "guestfs_launch> in the usual way."
1131 msgstr ""
1132
1133 # type: textblock
1134 #: ../src/guestfs.pod:533
1135 msgid ""
1136 "Then call L</guestfs_inspect_os>.  This function uses other libguestfs calls "
1137 "and certain heuristics, and returns a list of operating systems that were "
1138 "found.  An empty list means none were found.  A single element is the root "
1139 "filesystem of the operating system.  For dual- or multi-boot guests, "
1140 "multiple roots can be returned, each one corresponding to a separate "
1141 "operating system.  (Multi-boot virtual machines are extremely rare in the "
1142 "world of virtualization, but since this scenario can happen, we have built "
1143 "libguestfs to deal with it.)"
1144 msgstr ""
1145
1146 # type: textblock
1147 #: ../src/guestfs.pod:542
1148 msgid ""
1149 "For each root, you can then call various C<guestfs_inspect_get_*> functions "
1150 "to get additional details about that operating system.  For example, call L</"
1151 "guestfs_inspect_get_type> to return the string C<windows> or C<linux> for "
1152 "Windows and Linux-based operating systems respectively."
1153 msgstr ""
1154
1155 # type: textblock
1156 #: ../src/guestfs.pod:548
1157 msgid ""
1158 "Un*x-like and Linux-based operating systems usually consist of several "
1159 "filesystems which are mounted at boot time (for example, a separate boot "
1160 "partition mounted on C</boot>).  The inspection rules are able to detect how "
1161 "filesystems correspond to mount points.  Call "
1162 "C<guestfs_inspect_get_mountpoints> to get this mapping.  It might return a "
1163 "hash table like this example:"
1164 msgstr ""
1165
1166 # type: verbatim
1167 #: ../src/guestfs.pod:555
1168 #, no-wrap
1169 msgid ""
1170 " /boot => /dev/sda1\n"
1171 " /     => /dev/vg_guest/lv_root\n"
1172 " /usr  => /dev/vg_guest/lv_usr\n"
1173 "\n"
1174 msgstr ""
1175
1176 # type: textblock
1177 #: ../src/guestfs.pod:559
1178 msgid ""
1179 "The caller can then make calls to L</guestfs_mount_options> to mount the "
1180 "filesystems as suggested."
1181 msgstr ""
1182
1183 # type: textblock
1184 #: ../src/guestfs.pod:562
1185 msgid ""
1186 "Be careful to mount filesystems in the right order (eg. C</> before C</"
1187 "usr>).  Sorting the keys of the hash by length, shortest first, should work."
1188 msgstr ""
1189
1190 # type: textblock
1191 #: ../src/guestfs.pod:566
1192 msgid ""
1193 "Inspection currently only works for some common operating systems.  "
1194 "Contributors are welcome to send patches for other operating systems that we "
1195 "currently cannot detect."
1196 msgstr ""
1197
1198 # type: textblock
1199 #: ../src/guestfs.pod:570
1200 msgid ""
1201 "Encrypted disks must be opened before inspection.  See L</ENCRYPTED DISKS> "
1202 "for more details.  The L</guestfs_inspect_os> function just ignores any "
1203 "encrypted devices."
1204 msgstr ""
1205
1206 # type: textblock
1207 #: ../src/guestfs.pod:574
1208 msgid ""
1209 "A note on the implementation: The call L</guestfs_inspect_os> performs "
1210 "inspection and caches the results in the guest handle.  Subsequent calls to "
1211 "C<guestfs_inspect_get_*> return this cached information, but I<do not> re-"
1212 "read the disks.  If you change the content of the guest disks, you can redo "
1213 "inspection by calling L</guestfs_inspect_os> again."
1214 msgstr ""
1215
1216 # type: =head2
1217 #: ../src/guestfs.pod:581
1218 msgid "SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS"
1219 msgstr ""
1220
1221 # type: textblock
1222 #: ../src/guestfs.pod:583
1223 msgid ""
1224 "Libguestfs can mount NTFS partitions.  It does this using the L<http://www."
1225 "ntfs-3g.org/> driver."
1226 msgstr ""
1227
1228 # type: textblock
1229 #: ../src/guestfs.pod:586
1230 msgid ""
1231 "DOS and Windows still use drive letters, and the filesystems are always "
1232 "treated as case insensitive by Windows itself, and therefore you might find "
1233 "a Windows configuration file referring to a path like C<c:\\windows"
1234 "\\system32>.  When the filesystem is mounted in libguestfs, that directory "
1235 "might be referred to as C</WINDOWS/System32>."
1236 msgstr ""
1237
1238 # type: textblock
1239 #: ../src/guestfs.pod:592
1240 msgid ""
1241 "Drive letter mappings are outside the scope of libguestfs.  You have to use "
1242 "libguestfs to read the appropriate Windows Registry and configuration files, "
1243 "to determine yourself how drives are mapped (see also L<hivex(3)> and L<virt-"
1244 "inspector(1)>)."
1245 msgstr ""
1246
1247 # type: textblock
1248 #: ../src/guestfs.pod:597
1249 msgid ""
1250 "Replacing backslash characters with forward slash characters is also outside "
1251 "the scope of libguestfs, but something that you can easily do."
1252 msgstr ""
1253
1254 # type: textblock
1255 #: ../src/guestfs.pod:600
1256 msgid ""
1257 "Where we can help is in resolving the case insensitivity of paths.  For "
1258 "this, call L</guestfs_case_sensitive_path>."
1259 msgstr ""
1260
1261 # type: textblock
1262 #: ../src/guestfs.pod:603
1263 msgid ""
1264 "Libguestfs also provides some help for decoding Windows Registry \"hive\" "
1265 "files, through the library C<hivex> which is part of the libguestfs project "
1266 "although ships as a separate tarball.  You have to locate and download the "
1267 "hive file(s) yourself, and then pass them to C<hivex> functions.  See also "
1268 "the programs L<hivexml(1)>, L<hivexsh(1)>, L<hivexregedit(1)> and L<virt-win-"
1269 "reg(1)> for more help on this issue."
1270 msgstr ""
1271
1272 # type: =head2
1273 #: ../src/guestfs.pod:611
1274 msgid "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES"
1275 msgstr ""
1276
1277 # type: textblock
1278 #: ../src/guestfs.pod:613
1279 msgid ""
1280 "Although we don't want to discourage you from using the C API, we will "
1281 "mention here that the same API is also available in other languages."
1282 msgstr ""
1283
1284 # type: textblock
1285 #: ../src/guestfs.pod:616
1286 msgid ""
1287 "The API is broadly identical in all supported languages.  This means that "
1288 "the C call C<guestfs_mount(g,path)> is C<$g-E<gt>mount($path)> in Perl, C<g."
1289 "mount(path)> in Python, and C<Guestfs.mount g path> in OCaml.  In other "
1290 "words, a straightforward, predictable isomorphism between each language."
1291 msgstr ""
1292
1293 # type: textblock
1294 #: ../src/guestfs.pod:622
1295 msgid ""
1296 "Error messages are automatically transformed into exceptions if the language "
1297 "supports it."
1298 msgstr ""
1299
1300 # type: textblock
1301 #: ../src/guestfs.pod:625
1302 msgid ""
1303 "We don't try to \"object orientify\" parts of the API in OO languages, "
1304 "although contributors are welcome to write higher level APIs above what we "
1305 "provide in their favourite languages if they wish."
1306 msgstr ""
1307
1308 # type: =item
1309 #: ../src/guestfs.pod:631
1310 msgid "B<C++>"
1311 msgstr ""
1312
1313 # type: textblock
1314 #: ../src/guestfs.pod:633
1315 msgid ""
1316 "You can use the I<guestfs.h> header file from C++ programs.  The C++ API is "
1317 "identical to the C API.  C++ classes and exceptions are not used."
1318 msgstr ""
1319
1320 # type: =item
1321 #: ../src/guestfs.pod:637
1322 msgid "B<C#>"
1323 msgstr ""
1324
1325 # type: textblock
1326 #: ../src/guestfs.pod:639
1327 msgid ""
1328 "The C# bindings are highly experimental.  Please read the warnings at the "
1329 "top of C<csharp/Libguestfs.cs>."
1330 msgstr ""
1331
1332 # type: =item
1333 #: ../src/guestfs.pod:642
1334 msgid "B<Haskell>"
1335 msgstr ""
1336
1337 # type: textblock
1338 #: ../src/guestfs.pod:644
1339 msgid ""
1340 "This is the only language binding that is working but incomplete.  Only "
1341 "calls which return simple integers have been bound in Haskell, and we are "
1342 "looking for help to complete this binding."
1343 msgstr ""
1344
1345 # type: =item
1346 #: ../src/guestfs.pod:648
1347 msgid "B<Java>"
1348 msgstr ""
1349
1350 # type: textblock
1351 #: ../src/guestfs.pod:650
1352 msgid ""
1353 "Full documentation is contained in the Javadoc which is distributed with "
1354 "libguestfs."
1355 msgstr ""
1356
1357 # type: =item
1358 #: ../src/guestfs.pod:653
1359 msgid "B<OCaml>"
1360 msgstr ""
1361
1362 # type: textblock
1363 #: ../src/guestfs.pod:655
1364 msgid "For documentation see the file C<guestfs.mli>."
1365 msgstr ""
1366
1367 # type: =item
1368 #: ../src/guestfs.pod:657
1369 msgid "B<Perl>"
1370 msgstr ""
1371
1372 # type: textblock
1373 #: ../src/guestfs.pod:659
1374 msgid "For documentation see L<Sys::Guestfs(3)>."
1375 msgstr ""
1376
1377 # type: =item
1378 #: ../src/guestfs.pod:661
1379 msgid "B<PHP>"
1380 msgstr ""
1381
1382 # type: textblock
1383 #: ../src/guestfs.pod:663
1384 msgid ""
1385 "For documentation see C<README-PHP> supplied with libguestfs sources or in "
1386 "the php-libguestfs package for your distribution."
1387 msgstr ""
1388
1389 # type: textblock
1390 #: ../src/guestfs.pod:666
1391 msgid "The PHP binding only works correctly on 64 bit machines."
1392 msgstr ""
1393
1394 # type: =item
1395 #: ../src/guestfs.pod:668
1396 msgid "B<Python>"
1397 msgstr ""
1398
1399 # type: textblock
1400 #: ../src/guestfs.pod:670
1401 msgid "For documentation do:"
1402 msgstr ""
1403
1404 # type: verbatim
1405 #: ../src/guestfs.pod:672
1406 #, no-wrap
1407 msgid ""
1408 " $ python\n"
1409 " >>> import guestfs\n"
1410 " >>> help (guestfs)\n"
1411 "\n"
1412 msgstr ""
1413
1414 # type: =item
1415 #: ../src/guestfs.pod:676
1416 msgid "B<Ruby>"
1417 msgstr ""
1418
1419 # type: textblock
1420 #: ../src/guestfs.pod:678
1421 msgid ""
1422 "Use the Guestfs module.  There is no Ruby-specific documentation, but you "
1423 "can find examples written in Ruby in the libguestfs source."
1424 msgstr ""
1425
1426 # type: =item
1427 #: ../src/guestfs.pod:681
1428 msgid "B<shell scripts>"
1429 msgstr ""
1430
1431 # type: textblock
1432 #: ../src/guestfs.pod:683
1433 msgid "For documentation see L<guestfish(1)>."
1434 msgstr ""
1435
1436 # type: =head2
1437 #: ../src/guestfs.pod:687
1438 msgid "LIBGUESTFS GOTCHAS"
1439 msgstr ""
1440
1441 # type: textblock
1442 #: ../src/guestfs.pod:689
1443 msgid ""
1444 "L<http://en.wikipedia.org/wiki/Gotcha_(programming)>: \"A feature of a "
1445 "system [...] that works in the way it is documented but is counterintuitive "
1446 "and almost invites mistakes.\""
1447 msgstr ""
1448
1449 # type: textblock
1450 #: ../src/guestfs.pod:693
1451 msgid ""
1452 "Since we developed libguestfs and the associated tools, there are several "
1453 "things we would have designed differently, but are now stuck with for "
1454 "backwards compatibility or other reasons.  If there is ever a libguestfs 2.0 "
1455 "release, you can expect these to change.  Beware of them."
1456 msgstr ""
1457
1458 # type: =item
1459 #: ../src/guestfs.pod:701
1460 msgid "Autosync / forgetting to sync."
1461 msgstr ""
1462
1463 # type: textblock
1464 #: ../src/guestfs.pod:703
1465 msgid ""
1466 "When modifying a filesystem from C or another language, you B<must> unmount "
1467 "all filesystems and call L</guestfs_sync> explicitly before you close the "
1468 "libguestfs handle.  You can also call:"
1469 msgstr ""
1470
1471 # type: verbatim
1472 #: ../src/guestfs.pod:707
1473 #, no-wrap
1474 msgid ""
1475 " guestfs_set_autosync (g, 1);\n"
1476 "\n"
1477 msgstr ""
1478
1479 # type: textblock
1480 #: ../src/guestfs.pod:709
1481 msgid ""
1482 "to have the unmount/sync done automatically for you when the handle 'g' is "
1483 "closed.  (This feature is called \"autosync\", L</guestfs_set_autosync> q.v.)"
1484 msgstr ""
1485
1486 # type: textblock
1487 #: ../src/guestfs.pod:713
1488 msgid ""
1489 "If you forget to do this, then it is entirely possible that your changes "
1490 "won't be written out, or will be partially written, or (very rarely) that "
1491 "you'll get disk corruption."
1492 msgstr ""
1493
1494 # type: textblock
1495 #: ../src/guestfs.pod:717
1496 msgid ""
1497 "Note that in L<guestfish(3)> autosync is the default.  So quick and dirty "
1498 "guestfish scripts that forget to sync will work just fine, which can make "
1499 "this very puzzling if you are trying to debug a problem."
1500 msgstr ""
1501
1502 # type: textblock
1503 #: ../src/guestfs.pod:721
1504 msgid ""
1505 "Update: Autosync is enabled by default for all API users starting from "
1506 "libguestfs 1.5.24."
1507 msgstr ""
1508
1509 # type: =item
1510 #: ../src/guestfs.pod:724
1511 msgid "Mount option C<-o sync> should not be the default."
1512 msgstr ""
1513
1514 # type: textblock
1515 #: ../src/guestfs.pod:726
1516 msgid ""
1517 "If you use L</guestfs_mount>, then C<-o sync,noatime> are added implicitly.  "
1518 "However C<-o sync> does not add any reliability benefit, but does have a "
1519 "very large performance impact."
1520 msgstr ""
1521
1522 # type: textblock
1523 #: ../src/guestfs.pod:730
1524 msgid ""
1525 "The work around is to use L</guestfs_mount_options> and set the mount "
1526 "options that you actually want to use."
1527 msgstr ""
1528
1529 # type: =item
1530 #: ../src/guestfs.pod:733
1531 msgid "Read-only should be the default."
1532 msgstr ""
1533
1534 # type: textblock
1535 #: ../src/guestfs.pod:735
1536 msgid ""
1537 "In L<guestfish(3)>, I<--ro> should be the default, and you should have to "
1538 "specify I<--rw> if you want to make changes to the image."
1539 msgstr ""
1540
1541 # type: textblock
1542 #: ../src/guestfs.pod:738
1543 msgid "This would reduce the potential to corrupt live VM images."
1544 msgstr ""
1545
1546 # type: textblock
1547 #: ../src/guestfs.pod:740
1548 msgid ""
1549 "Note that many filesystems change the disk when you just mount and unmount, "
1550 "even if you didn't perform any writes.  You need to use L</"
1551 "guestfs_add_drive_ro> to guarantee that the disk is not changed."
1552 msgstr ""
1553
1554 # type: =item
1555 #: ../src/guestfs.pod:744
1556 msgid "guestfish command line is hard to use."
1557 msgstr ""
1558
1559 # type: textblock
1560 #: ../src/guestfs.pod:746
1561 msgid ""
1562 "C<guestfish disk.img> doesn't do what people expect (open C<disk.img> for "
1563 "examination).  It tries to run a guestfish command C<disk.img> which doesn't "
1564 "exist, so it fails.  In earlier versions of guestfish the error message was "
1565 "also unintuitive, but we have corrected this since.  Like the Bourne shell, "
1566 "we should have used C<guestfish -c command> to run commands."
1567 msgstr ""
1568
1569 # type: =item
1570 #: ../src/guestfs.pod:753
1571 msgid "guestfish megabyte modifiers don't work right on all commands"
1572 msgstr ""
1573
1574 # type: textblock
1575 #: ../src/guestfs.pod:755
1576 msgid ""
1577 "In recent guestfish you can use C<1M> to mean 1 megabyte (and similarly for "
1578 "other modifiers).  What guestfish actually does is to multiply the number "
1579 "part by the modifier part and pass the result to the C API.  However this "
1580 "doesn't work for a few APIs which aren't expecting bytes, but are already "
1581 "expecting some other unit (eg. megabytes)."
1582 msgstr ""
1583
1584 # type: textblock
1585 #: ../src/guestfs.pod:762
1586 msgid "The most common is L</guestfs_lvcreate>.  The guestfish command:"
1587 msgstr ""
1588
1589 # type: verbatim
1590 #: ../src/guestfs.pod:764
1591 #, no-wrap
1592 msgid ""
1593 " lvcreate LV VG 100M\n"
1594 "\n"
1595 msgstr ""
1596
1597 # type: textblock
1598 #: ../src/guestfs.pod:766
1599 msgid ""
1600 "does not do what you might expect.  Instead because L</guestfs_lvcreate> is "
1601 "already expecting megabytes, this tries to create a 100 I<terabyte> (100 "
1602 "megabytes * megabytes) logical volume.  The error message you get from this "
1603 "is also a little obscure."
1604 msgstr ""
1605
1606 # type: textblock
1607 #: ../src/guestfs.pod:771
1608 msgid ""
1609 "This could be fixed in the generator by specially marking parameters and "
1610 "return values which take bytes or other units."
1611 msgstr ""
1612
1613 # type: =item
1614 #: ../src/guestfs.pod:774
1615 msgid "Ambiguity between devices and paths"
1616 msgstr ""
1617
1618 # type: textblock
1619 #: ../src/guestfs.pod:776
1620 msgid ""
1621 "There is a subtle ambiguity in the API between a device name (eg. C</dev/"
1622 "sdb2>) and a similar pathname.  A file might just happen to be called "
1623 "C<sdb2> in the directory C</dev> (consider some non-Unix VM image)."
1624 msgstr ""
1625
1626 # type: textblock
1627 #: ../src/guestfs.pod:781
1628 msgid ""
1629 "In the current API we usually resolve this ambiguity by having two separate "
1630 "calls, for example L</guestfs_checksum> and L</guestfs_checksum_device>.  "
1631 "Some API calls are ambiguous and (incorrectly) resolve the problem by "
1632 "detecting if the path supplied begins with C</dev/>."
1633 msgstr ""
1634
1635 # type: textblock
1636 #: ../src/guestfs.pod:787
1637 msgid ""
1638 "To avoid both the ambiguity and the need to duplicate some calls, we could "
1639 "make paths/devices into structured names.  One way to do this would be to "
1640 "use a notation like grub (C<hd(0,0)>), although nobody really likes this "
1641 "aspect of grub.  Another way would be to use a structured type, equivalent "
1642 "to this OCaml type:"
1643 msgstr ""
1644
1645 # type: verbatim
1646 #: ../src/guestfs.pod:793
1647 #, no-wrap
1648 msgid ""
1649 " type path = Path of string | Device of int | Partition of int * int\n"
1650 "\n"
1651 msgstr ""
1652
1653 # type: textblock
1654 #: ../src/guestfs.pod:795
1655 msgid "which would allow you to pass arguments like:"
1656 msgstr ""
1657
1658 # type: verbatim
1659 #: ../src/guestfs.pod:797
1660 #, no-wrap
1661 msgid ""
1662 " Path \"/foo/bar\"\n"
1663 " Device 1            (* /dev/sdb, or perhaps /dev/sda *)\n"
1664 " Partition (1, 2)    (* /dev/sdb2 (or is it /dev/sda2 or /dev/sdb3?) *)\n"
1665 " Path \"/dev/sdb2\"    (* not a device *)\n"
1666 "\n"
1667 msgstr ""
1668
1669 # type: textblock
1670 #: ../src/guestfs.pod:802
1671 msgid ""
1672 "As you can see there are still problems to resolve even with this "
1673 "representation.  Also consider how it might work in guestfish."
1674 msgstr ""
1675
1676 # type: =head2
1677 #: ../src/guestfs.pod:807
1678 msgid "PROTOCOL LIMITS"
1679 msgstr ""
1680
1681 # type: textblock
1682 #: ../src/guestfs.pod:809
1683 msgid ""
1684 "Internally libguestfs uses a message-based protocol to pass API calls and "
1685 "their responses to and from a small \"appliance\" (see L</INTERNALS> for "
1686 "plenty more detail about this).  The maximum message size used by the "
1687 "protocol is slightly less than 4 MB.  For some API calls you may need to be "
1688 "aware of this limit.  The API calls which may be affected are individually "
1689 "documented, with a link back to this section of the documentation."
1690 msgstr ""
1691
1692 # type: textblock
1693 #: ../src/guestfs.pod:817
1694 msgid ""
1695 "A simple call such as L</guestfs_cat> returns its result (the file data) in "
1696 "a simple string.  Because this string is at some point internally encoded as "
1697 "a message, the maximum size that it can return is slightly under 4 MB.  If "
1698 "the requested file is larger than this then you will get an error."
1699 msgstr ""
1700
1701 # type: textblock
1702 #: ../src/guestfs.pod:823
1703 msgid ""
1704 "In order to transfer large files into and out of the guest filesystem, you "
1705 "need to use particular calls that support this.  The sections L</UPLOADING> "
1706 "and L</DOWNLOADING> document how to do this."
1707 msgstr ""
1708
1709 # type: textblock
1710 #: ../src/guestfs.pod:827
1711 msgid ""
1712 "You might also consider mounting the disk image using our FUSE filesystem "
1713 "support (L<guestmount(1)>)."
1714 msgstr ""
1715
1716 # type: =head2
1717 #: ../src/guestfs.pod:830
1718 msgid "KEYS AND PASSPHRASES"
1719 msgstr ""
1720
1721 # type: textblock
1722 #: ../src/guestfs.pod:832
1723 msgid ""
1724 "Certain libguestfs calls take a parameter that contains sensitive key "
1725 "material, passed in as a C string."
1726 msgstr ""
1727
1728 # type: textblock
1729 #: ../src/guestfs.pod:835
1730 msgid ""
1731 "In the future we would hope to change the libguestfs implementation so that "
1732 "keys are L<mlock(2)>-ed into physical RAM, and thus can never end up in "
1733 "swap.  However this is I<not> done at the moment, because of the complexity "
1734 "of such an implementation."
1735 msgstr ""
1736
1737 # type: textblock
1738 #: ../src/guestfs.pod:840
1739 msgid ""
1740 "Therefore you should be aware that any key parameter you pass to libguestfs "
1741 "might end up being written out to the swap partition.  If this is a concern, "
1742 "scrub the swap partition or don't use libguestfs on encrypted devices."
1743 msgstr ""
1744
1745 # type: =head1
1746 #: ../src/guestfs.pod:845
1747 msgid "MULTIPLE HANDLES AND MULTIPLE THREADS"
1748 msgstr ""
1749
1750 # type: textblock
1751 #: ../src/guestfs.pod:847
1752 msgid ""
1753 "All high-level libguestfs actions are synchronous.  If you want to use "
1754 "libguestfs asynchronously then you must create a thread."
1755 msgstr ""
1756
1757 # type: textblock
1758 #: ../src/guestfs.pod:850
1759 msgid ""
1760 "Only use the handle from a single thread.  Either use the handle exclusively "
1761 "from one thread, or provide your own mutex so that two threads cannot issue "
1762 "calls on the same handle at the same time."
1763 msgstr ""
1764
1765 # type: textblock
1766 #: ../src/guestfs.pod:854
1767 msgid ""
1768 "See the graphical program guestfs-browser for one possible architecture for "
1769 "multithreaded programs using libvirt and libguestfs."
1770 msgstr ""
1771
1772 # type: =head1
1773 #: ../src/guestfs.pod:857
1774 msgid "PATH"
1775 msgstr ""
1776
1777 # type: textblock
1778 #: ../src/guestfs.pod:859
1779 msgid ""
1780 "Libguestfs needs a kernel and initrd.img, which it finds by looking along an "
1781 "internal path."
1782 msgstr ""
1783
1784 # type: textblock
1785 #: ../src/guestfs.pod:862
1786 msgid ""
1787 "By default it looks for these in the directory C<$libdir/guestfs> (eg. C</"
1788 "usr/local/lib/guestfs> or C</usr/lib64/guestfs>)."
1789 msgstr ""
1790
1791 # type: textblock
1792 #: ../src/guestfs.pod:865
1793 msgid ""
1794 "Use L</guestfs_set_path> or set the environment variable L</LIBGUESTFS_PATH> "
1795 "to change the directories that libguestfs will search in.  The value is a "
1796 "colon-separated list of paths.  The current directory is I<not> searched "
1797 "unless the path contains an empty element or C<.>.  For example "
1798 "C<LIBGUESTFS_PATH=:/usr/lib/guestfs> would search the current directory and "
1799 "then C</usr/lib/guestfs>."
1800 msgstr ""
1801
1802 # type: =head1
1803 #: ../src/guestfs.pod:872
1804 msgid "QEMU WRAPPERS"
1805 msgstr ""
1806
1807 # type: textblock
1808 #: ../src/guestfs.pod:874
1809 msgid ""
1810 "If you want to compile your own qemu, run qemu from a non-standard location, "
1811 "or pass extra arguments to qemu, then you can write a shell-script wrapper "
1812 "around qemu."
1813 msgstr ""
1814
1815 # type: textblock
1816 #: ../src/guestfs.pod:878
1817 msgid ""
1818 "There is one important rule to remember: you I<must C<exec qemu>> as the "
1819 "last command in the shell script (so that qemu replaces the shell and "
1820 "becomes the direct child of the libguestfs-using program).  If you don't do "
1821 "this, then the qemu process won't be cleaned up correctly."
1822 msgstr ""
1823
1824 # type: textblock
1825 #: ../src/guestfs.pod:883
1826 msgid ""
1827 "Here is an example of a wrapper, where I have built my own copy of qemu from "
1828 "source:"
1829 msgstr ""
1830
1831 # type: verbatim
1832 #: ../src/guestfs.pod:886
1833 #, no-wrap
1834 msgid ""
1835 " #!/bin/sh -\n"
1836 " qemudir=/home/rjones/d/qemu\n"
1837 " exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios \"$@\"\n"
1838 "\n"
1839 msgstr ""
1840
1841 # type: textblock
1842 #: ../src/guestfs.pod:890
1843 msgid ""
1844 "Save this script as C</tmp/qemu.wrapper> (or wherever), C<chmod +x>, and "
1845 "then use it by setting the LIBGUESTFS_QEMU environment variable.  For "
1846 "example:"
1847 msgstr ""
1848
1849 # type: verbatim
1850 #: ../src/guestfs.pod:894
1851 #, no-wrap
1852 msgid ""
1853 " LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n"
1854 "\n"
1855 msgstr ""
1856
1857 # type: textblock
1858 #: ../src/guestfs.pod:896
1859 msgid ""
1860 "Note that libguestfs also calls qemu with the -help and -version options in "
1861 "order to determine features."
1862 msgstr ""
1863
1864 # type: =head2
1865 #: ../src/guestfs.pod:899
1866 msgid "ABI GUARANTEE"
1867 msgstr ""
1868
1869 # type: textblock
1870 #: ../src/guestfs.pod:901
1871 msgid ""
1872 "We guarantee the libguestfs ABI (binary interface), for public, high-level "
1873 "actions as outlined in this section.  Although we will deprecate some "
1874 "actions, for example if they get replaced by newer calls, we will keep the "
1875 "old actions forever.  This allows you the developer to program in confidence "
1876 "against the libguestfs API."
1877 msgstr ""
1878
1879 # type: =head1
1880 #: ../src/guestfs.pod:907
1881 msgid "BLOCK DEVICE NAMING"
1882 msgstr ""
1883
1884 # type: textblock
1885 #: ../src/guestfs.pod:909
1886 msgid ""
1887 "In the kernel there is now quite a profusion of schemata for naming block "
1888 "devices (in this context, by I<block device> I mean a physical or virtual "
1889 "hard drive).  The original Linux IDE driver used names starting with C</dev/"
1890 "hd*>.  SCSI devices have historically used a different naming scheme, C</dev/"
1891 "sd*>.  When the Linux kernel I<libata> driver became a popular replacement "
1892 "for the old IDE driver (particularly for SATA devices) those devices also "
1893 "used the C</dev/sd*> scheme.  Additionally we now have virtual machines with "
1894 "paravirtualized drivers.  This has created several different naming systems, "
1895 "such as C</dev/vd*> for virtio disks and C</dev/xvd*> for Xen PV disks."
1896 msgstr ""
1897
1898 # type: textblock
1899 #: ../src/guestfs.pod:921
1900 msgid ""
1901 "As discussed above, libguestfs uses a qemu appliance running an embedded "
1902 "Linux kernel to access block devices.  We can run a variety of appliances "
1903 "based on a variety of Linux kernels."
1904 msgstr ""
1905
1906 # type: textblock
1907 #: ../src/guestfs.pod:925
1908 msgid ""
1909 "This causes a problem for libguestfs because many API calls use device or "
1910 "partition names.  Working scripts and the recipe (example) scripts that we "
1911 "make available over the internet could fail if the naming scheme changes."
1912 msgstr ""
1913
1914 # type: textblock
1915 #: ../src/guestfs.pod:930
1916 msgid ""
1917 "Therefore libguestfs defines C</dev/sd*> as the I<standard naming scheme>.  "
1918 "Internally C</dev/sd*> names are translated, if necessary, to other names as "
1919 "required.  For example, under RHEL 5 which uses the C</dev/hd*> scheme, any "
1920 "device parameter C</dev/sda2> is translated to C</dev/hda2> transparently."
1921 msgstr ""
1922
1923 # type: textblock
1924 #: ../src/guestfs.pod:936
1925 msgid ""
1926 "Note that this I<only> applies to parameters.  The L</guestfs_list_devices>, "
1927 "L</guestfs_list_partitions> and similar calls return the true names of the "
1928 "devices and partitions as known to the appliance."
1929 msgstr ""
1930
1931 # type: =head2
1932 #: ../src/guestfs.pod:941
1933 msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION"
1934 msgstr ""
1935
1936 # type: textblock
1937 #: ../src/guestfs.pod:943
1938 msgid ""
1939 "Usually this translation is transparent.  However in some (very rare)  cases "
1940 "you may need to know the exact algorithm.  Such cases include where you use "
1941 "L</guestfs_config> to add a mixture of virtio and IDE devices to the qemu-"
1942 "based appliance, so have a mixture of C</dev/sd*> and C</dev/vd*> devices."
1943 msgstr ""
1944
1945 # type: textblock
1946 #: ../src/guestfs.pod:949
1947 msgid ""
1948 "The algorithm is applied only to I<parameters> which are known to be either "
1949 "device or partition names.  Return values from functions such as L</"
1950 "guestfs_list_devices> are never changed."
1951 msgstr ""
1952
1953 # type: textblock
1954 #: ../src/guestfs.pod:957
1955 msgid "Is the string a parameter which is a device or partition name?"
1956 msgstr ""
1957
1958 # type: textblock
1959 #: ../src/guestfs.pod:961
1960 msgid "Does the string begin with C</dev/sd>?"
1961 msgstr ""
1962
1963 # type: textblock
1964 #: ../src/guestfs.pod:965
1965 msgid ""
1966 "Does the named device exist? If so, we use that device.  However if I<not> "
1967 "then we continue with this algorithm."
1968 msgstr ""
1969
1970 # type: textblock
1971 #: ../src/guestfs.pod:970
1972 msgid "Replace initial C</dev/sd> string with C</dev/hd>."
1973 msgstr ""
1974
1975 # type: textblock
1976 #: ../src/guestfs.pod:972
1977 msgid "For example, change C</dev/sda2> to C</dev/hda2>."
1978 msgstr ""
1979
1980 # type: textblock
1981 #: ../src/guestfs.pod:974
1982 msgid "If that named device exists, use it.  If not, continue."
1983 msgstr ""
1984
1985 # type: textblock
1986 #: ../src/guestfs.pod:978
1987 msgid "Replace initial C</dev/sd> string with C</dev/vd>."
1988 msgstr ""
1989
1990 # type: textblock
1991 #: ../src/guestfs.pod:980
1992 msgid "If that named device exists, use it.  If not, return an error."
1993 msgstr ""
1994
1995 # type: =head3
1996 #: ../src/guestfs.pod:984
1997 msgid "PORTABILITY CONCERNS WITH BLOCK DEVICE NAMING"
1998 msgstr ""
1999
2000 # type: textblock
2001 #: ../src/guestfs.pod:986
2002 msgid ""
2003 "Although the standard naming scheme and automatic translation is useful for "
2004 "simple programs and guestfish scripts, for larger programs it is best not to "
2005 "rely on this mechanism."
2006 msgstr ""
2007
2008 # type: textblock
2009 #: ../src/guestfs.pod:990
2010 msgid ""
2011 "Where possible for maximum future portability programs using libguestfs "
2012 "should use these future-proof techniques:"
2013 msgstr ""
2014
2015 # type: textblock
2016 #: ../src/guestfs.pod:997
2017 msgid ""
2018 "Use L</guestfs_list_devices> or L</guestfs_list_partitions> to list actual "
2019 "device names, and then use those names directly."
2020 msgstr ""
2021
2022 # type: textblock
2023 #: ../src/guestfs.pod:1000
2024 msgid ""
2025 "Since those device names exist by definition, they will never be translated."
2026 msgstr ""
2027
2028 # type: textblock
2029 #: ../src/guestfs.pod:1005
2030 msgid ""
2031 "Use higher level ways to identify filesystems, such as LVM names, UUIDs and "
2032 "filesystem labels."
2033 msgstr ""
2034
2035 # type: =head1
2036 #: ../src/guestfs.pod:1010
2037 msgid "SECURITY"
2038 msgstr ""
2039
2040 # type: textblock
2041 #: ../src/guestfs.pod:1012
2042 msgid ""
2043 "This section discusses security implications of using libguestfs, "
2044 "particularly with untrusted or malicious guests or disk images."
2045 msgstr ""
2046
2047 # type: =head2
2048 #: ../src/guestfs.pod:1015
2049 msgid "GENERAL SECURITY CONSIDERATIONS"
2050 msgstr ""
2051
2052 # type: textblock
2053 #: ../src/guestfs.pod:1017
2054 msgid ""
2055 "Be careful with any files or data that you download from a guest (by "
2056 "\"download\" we mean not just the L</guestfs_download> command but any "
2057 "command that reads files, filenames, directories or anything else from a "
2058 "disk image).  An attacker could manipulate the data to fool your program "
2059 "into doing the wrong thing.  Consider cases such as:"
2060 msgstr ""
2061
2062 # type: textblock
2063 #: ../src/guestfs.pod:1027
2064 msgid "the data (file etc) not being present"
2065 msgstr ""
2066
2067 # type: textblock
2068 #: ../src/guestfs.pod:1031
2069 msgid "being present but empty"
2070 msgstr ""
2071
2072 # type: textblock
2073 #: ../src/guestfs.pod:1035
2074 msgid "being much larger than normal"
2075 msgstr ""
2076
2077 # type: textblock
2078 #: ../src/guestfs.pod:1039
2079 msgid "containing arbitrary 8 bit data"
2080 msgstr ""
2081
2082 # type: textblock
2083 #: ../src/guestfs.pod:1043
2084 msgid "being in an unexpected character encoding"
2085 msgstr ""
2086
2087 # type: textblock
2088 #: ../src/guestfs.pod:1047
2089 msgid "containing homoglyphs."
2090 msgstr ""
2091
2092 # type: =head2
2093 #: ../src/guestfs.pod:1051
2094 msgid "SECURITY OF MOUNTING FILESYSTEMS"
2095 msgstr ""
2096
2097 # type: textblock
2098 #: ../src/guestfs.pod:1053
2099 msgid ""
2100 "When you mount a filesystem under Linux, mistakes in the kernel filesystem "
2101 "(VFS) module can sometimes be escalated into exploits by deliberately "
2102 "creating a malicious, malformed filesystem.  These exploits are very severe "
2103 "for two reasons.  Firstly there are very many filesystem drivers in the "
2104 "kernel, and many of them are infrequently used and not much developer "
2105 "attention has been paid to the code.  Linux userspace helps potential "
2106 "crackers by detecting the filesystem type and automatically choosing the "
2107 "right VFS driver, even if that filesystem type is obscure or unexpected for "
2108 "the administrator.  Secondly, a kernel-level exploit is like a local root "
2109 "exploit (worse in some ways), giving immediate and total access to the "
2110 "system right down to the hardware level."
2111 msgstr ""
2112
2113 # type: textblock
2114 #: ../src/guestfs.pod:1066
2115 msgid ""
2116 "That explains why you should never mount a filesystem from an untrusted "
2117 "guest on your host kernel.  How about libguestfs? We run a Linux kernel "
2118 "inside a qemu virtual machine, usually running as a non-root user.  The "
2119 "attacker would need to write a filesystem which first exploited the kernel, "
2120 "and then exploited either qemu virtualization (eg. a faulty qemu driver) or "
2121 "the libguestfs protocol, and finally to be as serious as the host kernel "
2122 "exploit it would need to escalate its privileges to root.  This multi-step "
2123 "escalation, performed by a static piece of data, is thought to be extremely "
2124 "hard to do, although we never say 'never' about security issues."
2125 msgstr ""
2126
2127 # type: textblock
2128 #: ../src/guestfs.pod:1077
2129 msgid ""
2130 "In any case callers can reduce the attack surface by forcing the filesystem "
2131 "type when mounting (use L</guestfs_mount_vfs>)."
2132 msgstr ""
2133
2134 # type: =head2
2135 #: ../src/guestfs.pod:1080
2136 msgid "PROTOCOL SECURITY"
2137 msgstr ""
2138
2139 # type: textblock
2140 #: ../src/guestfs.pod:1082
2141 msgid ""
2142 "The protocol is designed to be secure, being based on RFC 4506 (XDR)  with a "
2143 "defined upper message size.  However a program that uses libguestfs must "
2144 "also take care - for example you can write a program that downloads a binary "
2145 "from a disk image and executes it locally, and no amount of protocol "
2146 "security will save you from the consequences."
2147 msgstr ""
2148
2149 # type: =head2
2150 #: ../src/guestfs.pod:1088
2151 msgid "INSPECTION SECURITY"
2152 msgstr ""
2153
2154 # type: textblock
2155 #: ../src/guestfs.pod:1090
2156 msgid ""
2157 "Parts of the inspection API (see L</INSPECTION>) return untrusted strings "
2158 "directly from the guest, and these could contain any 8 bit data.  Callers "
2159 "should be careful to escape these before printing them to a structured file "
2160 "(for example, use HTML escaping if creating a web page)."
2161 msgstr ""
2162
2163 # type: textblock
2164 #: ../src/guestfs.pod:1096
2165 msgid ""
2166 "The inspection API parses guest configuration using two external libraries: "
2167 "Augeas (Linux configuration) and hivex (Windows Registry).  Both are "
2168 "designed to be robust in the face of malicious data, although denial of "
2169 "service attacks are still possible, for example with oversized configuration "
2170 "files."
2171 msgstr ""
2172
2173 # type: =head2
2174 #: ../src/guestfs.pod:1102
2175 msgid "RUNNING UNTRUSTED GUEST COMMANDS"
2176 msgstr ""
2177
2178 # type: textblock
2179 #: ../src/guestfs.pod:1104
2180 msgid ""
2181 "Be very cautious about running commands from the guest.  By running a "
2182 "command in the guest, you are giving CPU time to a binary that you do not "
2183 "control, under the same user account as the library, albeit wrapped in qemu "
2184 "virtualization.  More information and alternatives can be found in the "
2185 "section L</RUNNING COMMANDS>."
2186 msgstr ""
2187
2188 # type: =head2
2189 #: ../src/guestfs.pod:1110
2190 msgid "CVE-2010-3851"
2191 msgstr ""
2192
2193 # type: textblock
2194 #: ../src/guestfs.pod:1112
2195 msgid "https://bugzilla.redhat.com/642934"
2196 msgstr ""
2197
2198 # type: textblock
2199 #: ../src/guestfs.pod:1114
2200 msgid ""
2201 "This security bug concerns the automatic disk format detection that qemu "
2202 "does on disk images."
2203 msgstr ""
2204
2205 # type: textblock
2206 #: ../src/guestfs.pod:1117
2207 msgid ""
2208 "A raw disk image is just the raw bytes, there is no header.  Other disk "
2209 "images like qcow2 contain a special header.  Qemu deals with this by looking "
2210 "for one of the known headers, and if none is found then assuming the disk "
2211 "image must be raw."
2212 msgstr ""
2213
2214 # type: textblock
2215 #: ../src/guestfs.pod:1122
2216 msgid ""
2217 "This allows a guest which has been given a raw disk image to write some "
2218 "other header.  At next boot (or when the disk image is accessed by "
2219 "libguestfs) qemu would do autodetection and think the disk image format was, "
2220 "say, qcow2 based on the header written by the guest."
2221 msgstr ""
2222
2223 # type: textblock
2224 #: ../src/guestfs.pod:1127
2225 msgid ""
2226 "This in itself would not be a problem, but qcow2 offers many features, one "
2227 "of which is to allow a disk image to refer to another image (called the "
2228 "\"backing disk\").  It does this by placing the path to the backing disk "
2229 "into the qcow2 header.  This path is not validated and could point to any "
2230 "host file (eg. \"/etc/passwd\").  The backing disk is then exposed through "
2231 "\"holes\" in the qcow2 disk image, which of course is completely under the "
2232 "control of the attacker."
2233 msgstr ""
2234
2235 # type: textblock
2236 #: ../src/guestfs.pod:1135
2237 msgid ""
2238 "In libguestfs this is rather hard to exploit except under two circumstances:"
2239 msgstr ""
2240
2241 # type: textblock
2242 #: ../src/guestfs.pod:1142
2243 msgid "You have enabled the network or have opened the disk in write mode."
2244 msgstr ""
2245
2246 # type: textblock
2247 #: ../src/guestfs.pod:1146
2248 msgid ""
2249 "You are also running untrusted code from the guest (see L</RUNNING "
2250 "COMMANDS>)."
2251 msgstr ""
2252
2253 # type: textblock
2254 #: ../src/guestfs.pod:1151
2255 msgid ""
2256 "The way to avoid this is to specify the expected disk format when adding "
2257 "disks (the optional C<format> option to L</guestfs_add_drive_opts>).  You "
2258 "should always do this if the disk is raw format, and it's a good idea for "
2259 "other cases too."
2260 msgstr ""
2261
2262 # type: textblock
2263 #: ../src/guestfs.pod:1156
2264 msgid ""
2265 "For disks added from libvirt using calls like L</guestfs_add_domain>, the "
2266 "format is fetched from libvirt and passed through."
2267 msgstr ""
2268
2269 # type: textblock
2270 #: ../src/guestfs.pod:1159
2271 msgid ""
2272 "For libguestfs tools, use the I<--format> command line parameter as "
2273 "appropriate."
2274 msgstr ""
2275
2276 # type: =head1
2277 #: ../src/guestfs.pod:1162
2278 msgid "CONNECTION MANAGEMENT"
2279 msgstr ""
2280
2281 # type: =head2
2282 #: ../src/guestfs.pod:1164
2283 msgid "guestfs_h *"
2284 msgstr ""
2285
2286 # type: textblock
2287 #: ../src/guestfs.pod:1166
2288 msgid ""
2289 "C<guestfs_h> is the opaque type representing a connection handle.  Create a "
2290 "handle by calling L</guestfs_create>.  Call L</guestfs_close> to free the "
2291 "handle and release all resources used."
2292 msgstr ""
2293
2294 # type: textblock
2295 #: ../src/guestfs.pod:1170
2296 msgid ""
2297 "For information on using multiple handles and threads, see the section L</"
2298 "MULTIPLE HANDLES AND MULTIPLE THREADS> below."
2299 msgstr ""
2300
2301 # type: =head2
2302 #: ../src/guestfs.pod:1173
2303 msgid "guestfs_create"
2304 msgstr ""
2305
2306 # type: verbatim
2307 #: ../src/guestfs.pod:1175
2308 #, no-wrap
2309 msgid ""
2310 " guestfs_h *guestfs_create (void);\n"
2311 "\n"
2312 msgstr ""
2313
2314 # type: textblock
2315 #: ../src/guestfs.pod:1177
2316 msgid "Create a connection handle."
2317 msgstr ""
2318
2319 # type: textblock
2320 #: ../src/guestfs.pod:1179
2321 msgid ""
2322 "You have to call L</guestfs_add_drive_opts> (or one of the equivalent calls) "
2323 "on the handle at least once."
2324 msgstr ""
2325
2326 # type: textblock
2327 #: ../src/guestfs.pod:1182
2328 msgid ""
2329 "This function returns a non-NULL pointer to a handle on success or NULL on "
2330 "error."
2331 msgstr ""
2332
2333 # type: textblock
2334 #: ../src/guestfs.pod:1185
2335 msgid "After configuring the handle, you have to call L</guestfs_launch>."
2336 msgstr ""
2337
2338 # type: textblock
2339 #: ../src/guestfs.pod:1187
2340 msgid ""
2341 "You may also want to configure error handling for the handle.  See L</ERROR "
2342 "HANDLING> section below."
2343 msgstr ""
2344
2345 # type: =head2
2346 #: ../src/guestfs.pod:1190
2347 msgid "guestfs_close"
2348 msgstr ""
2349
2350 # type: verbatim
2351 #: ../src/guestfs.pod:1192
2352 #, no-wrap
2353 msgid ""
2354 " void guestfs_close (guestfs_h *g);\n"
2355 "\n"
2356 msgstr ""
2357
2358 # type: textblock
2359 #: ../src/guestfs.pod:1194
2360 msgid "This closes the connection handle and frees up all resources used."
2361 msgstr ""
2362
2363 # type: =head1
2364 #: ../src/guestfs.pod:1196
2365 msgid "ERROR HANDLING"
2366 msgstr ""
2367
2368 # type: textblock
2369 #: ../src/guestfs.pod:1198
2370 msgid ""
2371 "API functions can return errors.  For example, almost all functions that "
2372 "return C<int> will return C<-1> to indicate an error."
2373 msgstr ""
2374
2375 # type: textblock
2376 #: ../src/guestfs.pod:1201
2377 msgid ""
2378 "Additional information is available for errors: an error message string and "
2379 "optionally an error number (errno) if the thing that failed was a system "
2380 "call."
2381 msgstr ""
2382
2383 # type: textblock
2384 #: ../src/guestfs.pod:1205
2385 msgid ""
2386 "You can get at the additional information about the last error on the handle "
2387 "by calling L</guestfs_last_error>, L</guestfs_last_errno>, and/or by setting "
2388 "up an error handler with L</guestfs_set_error_handler>."
2389 msgstr ""
2390
2391 # type: textblock
2392 #: ../src/guestfs.pod:1210
2393 msgid ""
2394 "When the handle is created, a default error handler is installed which "
2395 "prints the error message string to C<stderr>.  For small short-running "
2396 "command line programs it is sufficient to do:"
2397 msgstr ""
2398
2399 # type: verbatim
2400 #: ../src/guestfs.pod:1214
2401 #, no-wrap
2402 msgid ""
2403 " if (guestfs_launch (g) == -1)\n"
2404 "   exit (EXIT_FAILURE);\n"
2405 "\n"
2406 msgstr ""
2407
2408 # type: textblock
2409 #: ../src/guestfs.pod:1217
2410 msgid ""
2411 "since the default error handler will ensure that an error message has been "
2412 "printed to C<stderr> before the program exits."
2413 msgstr ""
2414
2415 # type: textblock
2416 #: ../src/guestfs.pod:1220
2417 msgid ""
2418 "For other programs the caller will almost certainly want to install an "
2419 "alternate error handler or do error handling in-line like this:"
2420 msgstr ""
2421
2422 # type: verbatim
2423 #: ../src/guestfs.pod:1223
2424 #, no-wrap
2425 msgid ""
2426 " g = guestfs_create ();\n"
2427 " \n"
2428 msgstr ""
2429
2430 # type: verbatim
2431 #: ../src/guestfs.pod:1225
2432 #, no-wrap
2433 msgid ""
2434 " /* This disables the default behaviour of printing errors\n"
2435 "    on stderr. */\n"
2436 " guestfs_set_error_handler (g, NULL, NULL);\n"
2437 " \n"
2438 msgstr ""
2439
2440 # type: verbatim
2441 #: ../src/guestfs.pod:1229
2442 #, no-wrap
2443 msgid ""
2444 " if (guestfs_launch (g) == -1) {\n"
2445 "   /* Examine the error message and print it etc. */\n"
2446 "   char *msg = guestfs_last_error (g);\n"
2447 "   int errnum = guestfs_last_errno (g);\n"
2448 "   fprintf (stderr, \"%s\\n\", msg);\n"
2449 "   /* ... */\n"
2450 "  }\n"
2451 "\n"
2452 msgstr ""
2453
2454 # type: textblock
2455 #: ../src/guestfs.pod:1237
2456 msgid ""
2457 "Out of memory errors are handled differently.  The default action is to call "
2458 "L<abort(3)>.  If this is undesirable, then you can set a handler using L</"
2459 "guestfs_set_out_of_memory_handler>."
2460 msgstr ""
2461
2462 # type: textblock
2463 #: ../src/guestfs.pod:1241
2464 msgid ""
2465 "L</guestfs_create> returns C<NULL> if the handle cannot be created, and "
2466 "because there is no handle if this happens there is no way to get additional "
2467 "error information.  However L</guestfs_create> is supposed to be a "
2468 "lightweight operation which can only fail because of insufficient memory (it "
2469 "returns NULL in this case)."
2470 msgstr ""
2471
2472 # type: =head2
2473 #: ../src/guestfs.pod:1247
2474 msgid "guestfs_last_error"
2475 msgstr ""
2476
2477 # type: verbatim
2478 #: ../src/guestfs.pod:1249
2479 #, no-wrap
2480 msgid ""
2481 " const char *guestfs_last_error (guestfs_h *g);\n"
2482 "\n"
2483 msgstr ""
2484
2485 # type: textblock
2486 #: ../src/guestfs.pod:1251
2487 msgid ""
2488 "This returns the last error message that happened on C<g>.  If there has not "
2489 "been an error since the handle was created, then this returns C<NULL>."
2490 msgstr ""
2491
2492 # type: textblock
2493 #: ../src/guestfs.pod:1255
2494 msgid ""
2495 "The lifetime of the returned string is until the next error occurs, or L</"
2496 "guestfs_close> is called."
2497 msgstr ""
2498
2499 # type: =head2
2500 #: ../src/guestfs.pod:1258
2501 msgid "guestfs_last_errno"
2502 msgstr ""
2503
2504 # type: verbatim
2505 #: ../src/guestfs.pod:1260
2506 #, no-wrap
2507 msgid ""
2508 " int guestfs_last_errno (guestfs_h *g);\n"
2509 "\n"
2510 msgstr ""
2511
2512 # type: textblock
2513 #: ../src/guestfs.pod:1262
2514 msgid "This returns the last error number (errno) that happened on C<g>."
2515 msgstr ""
2516
2517 # type: textblock
2518 #: ../src/guestfs.pod:1264
2519 msgid "If successful, an errno integer not equal to zero is returned."
2520 msgstr ""
2521
2522 # type: textblock
2523 #: ../src/guestfs.pod:1266
2524 msgid ""
2525 "If no error, this returns 0.  This call can return 0 in three situations:"
2526 msgstr ""
2527
2528 # type: textblock
2529 #: ../src/guestfs.pod:1273
2530 msgid "There has not been any error on the handle."
2531 msgstr ""
2532
2533 # type: textblock
2534 #: ../src/guestfs.pod:1277
2535 msgid ""
2536 "There has been an error but the errno was meaningless.  This corresponds to "
2537 "the case where the error did not come from a failed system call, but for "
2538 "some other reason."
2539 msgstr ""
2540
2541 # type: textblock
2542 #: ../src/guestfs.pod:1283
2543 msgid ""
2544 "There was an error from a failed system call, but for some reason the errno "
2545 "was not captured and returned.  This usually indicates a bug in libguestfs."
2546 msgstr ""
2547
2548 # type: textblock
2549 #: ../src/guestfs.pod:1289
2550 msgid ""
2551 "Libguestfs tries to convert the errno from inside the applicance into a "
2552 "corresponding errno for the caller (not entirely trivial: the appliance "
2553 "might be running a completely different operating system from the library "
2554 "and error numbers are not standardized across Un*xen).  If this could not be "
2555 "done, then the error is translated to C<EINVAL>.  In practice this should "
2556 "only happen in very rare circumstances."
2557 msgstr ""
2558
2559 # type: =head2
2560 #: ../src/guestfs.pod:1297
2561 msgid "guestfs_set_error_handler"
2562 msgstr ""
2563
2564 # type: verbatim
2565 #: ../src/guestfs.pod:1299
2566 #, no-wrap
2567 msgid ""
2568 " typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
2569 "                                           void *opaque,\n"
2570 "                                           const char *msg);\n"
2571 " void guestfs_set_error_handler (guestfs_h *g,\n"
2572 "                                 guestfs_error_handler_cb cb,\n"
2573 "                                 void *opaque);\n"
2574 "\n"
2575 msgstr ""
2576
2577 # type: textblock
2578 #: ../src/guestfs.pod:1306
2579 msgid ""
2580 "The callback C<cb> will be called if there is an error.  The parameters "
2581 "passed to the callback are an opaque data pointer and the error message "
2582 "string."
2583 msgstr ""
2584
2585 # type: textblock
2586 #: ../src/guestfs.pod:1310
2587 msgid ""
2588 "C<errno> is not passed to the callback.  To get that the callback must call "
2589 "L</guestfs_last_errno>."
2590 msgstr ""
2591
2592 # type: textblock
2593 #: ../src/guestfs.pod:1313
2594 msgid ""
2595 "Note that the message string C<msg> is freed as soon as the callback "
2596 "function returns, so if you want to stash it somewhere you must make your "
2597 "own copy."
2598 msgstr ""
2599
2600 # type: textblock
2601 #: ../src/guestfs.pod:1317
2602 msgid "The default handler prints messages on C<stderr>."
2603 msgstr ""
2604
2605 # type: textblock
2606 #: ../src/guestfs.pod:1319
2607 msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
2608 msgstr ""
2609
2610 # type: =head2
2611 #: ../src/guestfs.pod:1321
2612 msgid "guestfs_get_error_handler"
2613 msgstr ""
2614
2615 # type: verbatim
2616 #: ../src/guestfs.pod:1323
2617 #, no-wrap
2618 msgid ""
2619 " guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
2620 "                                                     void **opaque_rtn);\n"
2621 "\n"
2622 msgstr ""
2623
2624 # type: textblock
2625 #: ../src/guestfs.pod:1326
2626 msgid "Returns the current error handler callback."
2627 msgstr ""
2628
2629 # type: =head2
2630 #: ../src/guestfs.pod:1328
2631 msgid "guestfs_set_out_of_memory_handler"
2632 msgstr ""
2633
2634 # type: verbatim
2635 #: ../src/guestfs.pod:1330
2636 #, no-wrap
2637 msgid ""
2638 " typedef void (*guestfs_abort_cb) (void);\n"
2639 " int guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
2640 "                                        guestfs_abort_cb);\n"
2641 "\n"
2642 msgstr ""
2643
2644 # type: textblock
2645 #: ../src/guestfs.pod:1334
2646 msgid ""
2647 "The callback C<cb> will be called if there is an out of memory situation.  "
2648 "I<Note this callback must not return>."
2649 msgstr ""
2650
2651 # type: textblock
2652 #: ../src/guestfs.pod:1337
2653 msgid "The default is to call L<abort(3)>."
2654 msgstr ""
2655
2656 # type: textblock
2657 #: ../src/guestfs.pod:1339
2658 msgid ""
2659 "You cannot set C<cb> to C<NULL>.  You can't ignore out of memory situations."
2660 msgstr ""
2661
2662 # type: =head2
2663 #: ../src/guestfs.pod:1342
2664 msgid "guestfs_get_out_of_memory_handler"
2665 msgstr ""
2666
2667 # type: verbatim
2668 #: ../src/guestfs.pod:1344
2669 #, no-wrap
2670 msgid ""
2671 " guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
2672 "\n"
2673 msgstr ""
2674
2675 # type: textblock
2676 #: ../src/guestfs.pod:1346
2677 msgid "This returns the current out of memory handler."
2678 msgstr ""
2679
2680 # type: =head1
2681 #: ../src/guestfs.pod:1348
2682 msgid "API CALLS"
2683 msgstr ""
2684
2685 # type: textblock
2686 #: ../src/guestfs.pod:1350 ../fish/guestfish.pod:907
2687 msgid "@ACTIONS@"
2688 msgstr ""
2689
2690 # type: =head1
2691 #: ../src/guestfs.pod:1352
2692 msgid "STRUCTURES"
2693 msgstr ""
2694
2695 # type: textblock
2696 #: ../src/guestfs.pod:1354
2697 msgid "@STRUCTS@"
2698 msgstr ""
2699
2700 # type: =head1
2701 #: ../src/guestfs.pod:1356
2702 msgid "AVAILABILITY"
2703 msgstr ""
2704
2705 # type: =head2
2706 #: ../src/guestfs.pod:1358
2707 msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
2708 msgstr ""
2709
2710 # type: textblock
2711 #: ../src/guestfs.pod:1360
2712 msgid ""
2713 "Using L</guestfs_available> you can test availability of the following "
2714 "groups of functions.  This test queries the appliance to see if the "
2715 "appliance you are currently using supports the functionality."
2716 msgstr ""
2717
2718 # type: textblock
2719 #: ../src/guestfs.pod:1365
2720 msgid "@AVAILABILITY@"
2721 msgstr ""
2722
2723 # type: =head2
2724 #: ../src/guestfs.pod:1367
2725 msgid "GUESTFISH supported COMMAND"
2726 msgstr ""
2727
2728 # type: textblock
2729 #: ../src/guestfs.pod:1369
2730 msgid ""
2731 "In L<guestfish(3)> there is a handy interactive command C<supported> which "
2732 "prints out the available groups and whether they are supported by this build "
2733 "of libguestfs.  Note however that you have to do C<run> first."
2734 msgstr ""
2735
2736 # type: =head2
2737 #: ../src/guestfs.pod:1374
2738 msgid "SINGLE CALLS AT COMPILE TIME"
2739 msgstr ""
2740
2741 # type: textblock
2742 #: ../src/guestfs.pod:1376
2743 msgid ""
2744 "Since version 1.5.8, C<E<lt>guestfs.hE<gt>> defines symbols for each C API "
2745 "function, such as:"
2746 msgstr ""
2747
2748 # type: verbatim
2749 #: ../src/guestfs.pod:1379
2750 #, no-wrap
2751 msgid ""
2752 " #define LIBGUESTFS_HAVE_DD 1\n"
2753 "\n"
2754 msgstr ""
2755
2756 # type: textblock
2757 #: ../src/guestfs.pod:1381
2758 msgid "if L</guestfs_dd> is available."
2759 msgstr ""
2760
2761 # type: textblock
2762 #: ../src/guestfs.pod:1383
2763 msgid ""
2764 "Before version 1.5.8, if you needed to test whether a single libguestfs "
2765 "function is available at compile time, we recommended using build tools such "
2766 "as autoconf or cmake.  For example in autotools you could use:"
2767 msgstr ""
2768
2769 # type: verbatim
2770 #: ../src/guestfs.pod:1388
2771 #, no-wrap
2772 msgid ""
2773 " AC_CHECK_LIB([guestfs],[guestfs_create])\n"
2774 " AC_CHECK_FUNCS([guestfs_dd])\n"
2775 "\n"
2776 msgstr ""
2777
2778 # type: textblock
2779 #: ../src/guestfs.pod:1391
2780 msgid ""
2781 "which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
2782 "in your program."
2783 msgstr ""
2784
2785 # type: =head2
2786 #: ../src/guestfs.pod:1394
2787 msgid "SINGLE CALLS AT RUN TIME"
2788 msgstr ""
2789
2790 # type: textblock
2791 #: ../src/guestfs.pod:1396
2792 msgid ""
2793 "Testing at compile time doesn't guarantee that a function really exists in "
2794 "the library.  The reason is that you might be dynamically linked against a "
2795 "previous I<libguestfs.so> (dynamic library)  which doesn't have the call.  "
2796 "This situation unfortunately results in a segmentation fault, which is a "
2797 "shortcoming of the C dynamic linking system itself."
2798 msgstr ""
2799
2800 # type: textblock
2801 #: ../src/guestfs.pod:1403
2802 msgid ""
2803 "You can use L<dlopen(3)> to test if a function is available at run time, as "
2804 "in this example program (note that you still need the compile time check as "
2805 "well):"
2806 msgstr ""
2807
2808 # type: verbatim
2809 #: ../src/guestfs.pod:1407
2810 #, no-wrap
2811 msgid ""
2812 " #include <stdio.h>\n"
2813 " #include <stdlib.h>\n"
2814 " #include <unistd.h>\n"
2815 " #include <dlfcn.h>\n"
2816 " #include <guestfs.h>\n"
2817 " \n"
2818 msgstr ""
2819
2820 # type: verbatim
2821 #: ../src/guestfs.pod:1413
2822 #, no-wrap
2823 msgid ""
2824 " main ()\n"
2825 " {\n"
2826 " #ifdef LIBGUESTFS_HAVE_DD\n"
2827 "   void *dl;\n"
2828 "   int has_function;\n"
2829 " \n"
2830 msgstr ""
2831
2832 # type: verbatim
2833 #: ../src/guestfs.pod:1419
2834 #, no-wrap
2835 msgid ""
2836 "   /* Test if the function guestfs_dd is really available. */\n"
2837 "   dl = dlopen (NULL, RTLD_LAZY);\n"
2838 "   if (!dl) {\n"
2839 "     fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
2840 "     exit (EXIT_FAILURE);\n"
2841 "   }\n"
2842 "   has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
2843 "   dlclose (dl);\n"
2844 " \n"
2845 msgstr ""
2846
2847 # type: verbatim
2848 #: ../src/guestfs.pod:1428
2849 #, no-wrap
2850 msgid ""
2851 "   if (!has_function)\n"
2852 "     printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
2853 "   else {\n"
2854 "     printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
2855 "     /* Now it's safe to call\n"
2856 "     guestfs_dd (g, \"foo\", \"bar\");\n"
2857 "     */\n"
2858 "   }\n"
2859 " #else\n"
2860 "   printf (\"guestfs_dd function was not found at compile time\\n\");\n"
2861 " #endif\n"
2862 "  }\n"
2863 "\n"
2864 msgstr ""
2865
2866 # type: textblock
2867 #: ../src/guestfs.pod:1441
2868 msgid ""
2869 "You may think the above is an awful lot of hassle, and it is.  There are "
2870 "other ways outside of the C linking system to ensure that this kind of "
2871 "incompatibility never arises, such as using package versioning:"
2872 msgstr ""
2873
2874 # type: verbatim
2875 #: ../src/guestfs.pod:1446
2876 #, no-wrap
2877 msgid ""
2878 " Requires: libguestfs >= 1.0.80\n"
2879 "\n"
2880 msgstr ""
2881
2882 # type: =head1
2883 #: ../src/guestfs.pod:1448
2884 msgid "CALLS WITH OPTIONAL ARGUMENTS"
2885 msgstr ""
2886
2887 # type: textblock
2888 #: ../src/guestfs.pod:1450
2889 msgid ""
2890 "A recent feature of the API is the introduction of calls which take optional "
2891 "arguments.  In C these are declared 3 ways.  The main way is as a call which "
2892 "takes variable arguments (ie. C<...>), as in this example:"
2893 msgstr ""
2894
2895 # type: verbatim
2896 #: ../src/guestfs.pod:1455
2897 #, no-wrap
2898 msgid ""
2899 " int guestfs_add_drive_opts (guestfs_h *g, const char *filename, ...);\n"
2900 "\n"
2901 msgstr ""
2902
2903 # type: textblock
2904 #: ../src/guestfs.pod:1457
2905 msgid ""
2906 "Call this with a list of optional arguments, terminated by C<-1>.  So to "
2907 "call with no optional arguments specified:"
2908 msgstr ""
2909
2910 # type: verbatim
2911 #: ../src/guestfs.pod:1460
2912 #, no-wrap
2913 msgid ""
2914 " guestfs_add_drive_opts (g, filename, -1);\n"
2915 "\n"
2916 msgstr ""
2917
2918 # type: textblock
2919 #: ../src/guestfs.pod:1462
2920 msgid "With a single optional argument:"
2921 msgstr ""
2922
2923 # type: verbatim
2924 #: ../src/guestfs.pod:1464
2925 #, no-wrap
2926 msgid ""
2927 " guestfs_add_drive_opts (g, filename,\n"
2928 "                         GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
2929 "                         -1);\n"
2930 "\n"
2931 msgstr ""
2932
2933 # type: textblock
2934 #: ../src/guestfs.pod:1468
2935 msgid "With two:"
2936 msgstr ""
2937
2938 # type: verbatim
2939 #: ../src/guestfs.pod:1470
2940 #, no-wrap
2941 msgid ""
2942 " guestfs_add_drive_opts (g, filename,\n"
2943 "                         GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
2944 "                         GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
2945 "                         -1);\n"
2946 "\n"
2947 msgstr ""
2948
2949 # type: textblock
2950 #: ../src/guestfs.pod:1475
2951 msgid ""
2952 "and so forth.  Don't forget the terminating C<-1> otherwise Bad Things will "
2953 "happen!"
2954 msgstr ""
2955
2956 # type: =head2
2957 #: ../src/guestfs.pod:1478
2958 msgid "USING va_list FOR OPTIONAL ARGUMENTS"
2959 msgstr ""
2960
2961 # type: textblock
2962 #: ../src/guestfs.pod:1480
2963 msgid ""
2964 "The second variant has the same name with the suffix C<_va>, which works the "
2965 "same way but takes a C<va_list>.  See the C manual for details.  For the "
2966 "example function, this is declared:"
2967 msgstr ""
2968
2969 # type: verbatim
2970 #: ../src/guestfs.pod:1484
2971 #, no-wrap
2972 msgid ""
2973 " int guestfs_add_drive_opts_va (guestfs_h *g, const char *filename,\n"
2974 "                                va_list args);\n"
2975 "\n"
2976 msgstr ""
2977
2978 # type: =head2
2979 #: ../src/guestfs.pod:1487
2980 msgid "CONSTRUCTING OPTIONAL ARGUMENTS"
2981 msgstr ""
2982
2983 # type: textblock
2984 #: ../src/guestfs.pod:1489
2985 msgid ""
2986 "The third variant is useful where you need to construct these calls.  You "
2987 "pass in a structure where you fill in the optional fields.  The structure "
2988 "has a bitmask as the first element which you must set to indicate which "
2989 "fields you have filled in.  For our example function the structure and call "
2990 "are declared:"
2991 msgstr ""
2992
2993 # type: verbatim
2994 #: ../src/guestfs.pod:1495
2995 #, no-wrap
2996 msgid ""
2997 " struct guestfs_add_drive_opts_argv {\n"
2998 "   uint64_t bitmask;\n"
2999 "   int readonly;\n"
3000 "   const char *format;\n"
3001 "   /* ... */\n"
3002 " };\n"
3003 " int guestfs_add_drive_opts_argv (guestfs_h *g, const char *filename,\n"
3004 "              const struct guestfs_add_drive_opts_argv *optargs);\n"
3005 "\n"
3006 msgstr ""
3007
3008 # type: textblock
3009 #: ../src/guestfs.pod:1504
3010 msgid "You could call it like this:"
3011 msgstr ""
3012
3013 # type: verbatim
3014 #: ../src/guestfs.pod:1506
3015 #, no-wrap
3016 msgid ""
3017 " struct guestfs_add_drive_opts_argv optargs = {\n"
3018 "   .bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK |\n"
3019 "              GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK,\n"
3020 "   .readonly = 1,\n"
3021 "   .format = \"qcow2\"\n"
3022 " };\n"
3023 " \n"
3024 msgstr ""
3025
3026 # type: verbatim
3027 #: ../src/guestfs.pod:1513
3028 #, no-wrap
3029 msgid ""
3030 " guestfs_add_drive_opts_argv (g, filename, &optargs);\n"
3031 "\n"
3032 msgstr ""
3033
3034 # type: textblock
3035 #: ../src/guestfs.pod:1515 ../src/guestfs-actions.pod:11
3036 #: ../src/guestfs-actions.pod:1842 ../fish/guestfish-actions.pod:9
3037 #: ../fish/guestfish-actions.pod:1255
3038 msgid "Notes:"
3039 msgstr ""
3040
3041 # type: textblock
3042 #: ../src/guestfs.pod:1521
3043 msgid "The C<_BITMASK> suffix on each option name when specifying the bitmask."
3044 msgstr ""
3045
3046 # type: textblock
3047 #: ../src/guestfs.pod:1526
3048 msgid "You do not need to fill in all fields of the structure."
3049 msgstr ""
3050
3051 # type: textblock
3052 #: ../src/guestfs.pod:1530
3053 msgid ""
3054 "There must be a one-to-one correspondence between fields of the structure "
3055 "that are filled in, and bits set in the bitmask."
3056 msgstr ""
3057
3058 # type: =head2
3059 #: ../src/guestfs.pod:1535
3060 msgid "OPTIONAL ARGUMENTS IN OTHER LANGUAGES"
3061 msgstr ""
3062
3063 # type: textblock
3064 #: ../src/guestfs.pod:1537
3065 msgid ""
3066 "In other languages, optional arguments are expressed in the way that is "
3067 "natural for that language.  We refer you to the language-specific "
3068 "documentation for more details on that."
3069 msgstr ""
3070
3071 # type: textblock
3072 #: ../src/guestfs.pod:1541
3073 msgid "For guestfish, see L<guestfish(1)/OPTIONAL ARGUMENTS>."
3074 msgstr ""
3075
3076 # type: =head2
3077 #: ../src/guestfs.pod:1543
3078 msgid "SETTING CALLBACKS TO HANDLE EVENTS"
3079 msgstr ""
3080
3081 # type: textblock
3082 #: ../src/guestfs.pod:1545
3083 msgid ""
3084 "The child process generates events in some situations.  Current events "
3085 "include: receiving a log message, the child process exits."
3086 msgstr ""
3087
3088 # type: textblock
3089 #: ../src/guestfs.pod:1548
3090 msgid ""
3091 "Use the C<guestfs_set_*_callback> functions to set a callback for different "
3092 "types of events."
3093 msgstr ""
3094
3095 # type: textblock
3096 #: ../src/guestfs.pod:1551
3097 msgid ""
3098 "Only I<one callback of each type> can be registered for each handle.  "
3099 "Calling C<guestfs_set_*_callback> again overwrites the previous callback of "
3100 "that type.  Cancel all callbacks of this type by calling this function with "
3101 "C<cb> set to C<NULL>."
3102 msgstr ""
3103
3104 # type: =head2
3105 #: ../src/guestfs.pod:1556
3106 msgid "guestfs_set_log_message_callback"
3107 msgstr ""
3108
3109 # type: verbatim
3110 #: ../src/guestfs.pod:1558
3111 #, no-wrap
3112 msgid ""
3113 " typedef void (*guestfs_log_message_cb) (guestfs_h *g, void *opaque,\n"
3114 "                                         char *buf, int len);\n"
3115 " void guestfs_set_log_message_callback (guestfs_h *g,\n"
3116 "                                        guestfs_log_message_cb cb,\n"
3117 "                                        void *opaque);\n"
3118 "\n"
3119 msgstr ""
3120
3121 # type: textblock
3122 #: ../src/guestfs.pod:1564
3123 msgid ""
3124 "The callback function C<cb> will be called whenever qemu or the guest writes "
3125 "anything to the console."
3126 msgstr ""
3127
3128 # type: textblock
3129 #: ../src/guestfs.pod:1567
3130 msgid "Use this function to capture kernel messages and similar."
3131 msgstr ""
3132
3133 # type: textblock
3134 #: ../src/guestfs.pod:1569
3135 msgid ""
3136 "Normally there is no log message handler, and log messages are just "
3137 "discarded."
3138 msgstr ""
3139
3140 # type: =head2
3141 #: ../src/guestfs.pod:1572
3142 msgid "guestfs_set_subprocess_quit_callback"
3143 msgstr ""
3144
3145 # type: verbatim
3146 #: ../src/guestfs.pod:1574
3147 #, no-wrap
3148 msgid ""
3149 " typedef void (*guestfs_subprocess_quit_cb) (guestfs_h *g, void *opaque);\n"
3150 " void guestfs_set_subprocess_quit_callback (guestfs_h *g,\n"
3151 "                                            guestfs_subprocess_quit_cb cb,\n"
3152 "                                            void *opaque);\n"
3153 "\n"
3154 msgstr ""
3155
3156 # type: textblock
3157 #: ../src/guestfs.pod:1579
3158 msgid ""
3159 "The callback function C<cb> will be called when the child process quits, "
3160 "either asynchronously or if killed by L</guestfs_kill_subprocess>.  (This "
3161 "corresponds to a transition from any state to the CONFIG state)."
3162 msgstr ""
3163
3164 # type: =head2
3165 #: ../src/guestfs.pod:1584
3166 msgid "guestfs_set_launch_done_callback"
3167 msgstr ""
3168
3169 # type: verbatim
3170 #: ../src/guestfs.pod:1586
3171 #, no-wrap
3172 msgid ""
3173 " typedef void (*guestfs_launch_done_cb) (guestfs_h *g, void *opaque);\n"
3174 " void guestfs_set_launch_done_callback (guestfs_h *g,\n"
3175 "                                        guestfs_launch_done_cb cb,\n"
3176 "                                        void *opaque);\n"
3177 "\n"
3178 msgstr ""
3179
3180 # type: textblock
3181 #: ../src/guestfs.pod:1591
3182 msgid ""
3183 "The callback function C<cb> will be called when the child process becomes "
3184 "ready first time after it has been launched.  (This corresponds to a "
3185 "transition from LAUNCHING to the READY state)."
3186 msgstr ""
3187
3188 # type: =head2
3189 #: ../src/guestfs.pod:1595
3190 msgid "guestfs_set_close_callback"
3191 msgstr ""
3192
3193 # type: verbatim
3194 #: ../src/guestfs.pod:1597
3195 #, no-wrap
3196 msgid ""
3197 " typedef void (*guestfs_close_cb) (guestfs_h *g, void *opaque);\n"
3198 " void guestfs_set_close_callback (guestfs_h *g,\n"
3199 "                                  guestfs_close_cb cb,\n"
3200 "                                  void *opaque);\n"
3201 "\n"
3202 msgstr ""
3203
3204 # type: textblock
3205 #: ../src/guestfs.pod:1602
3206 msgid ""
3207 "The callback function C<cb> will be called while the handle is being closed "
3208 "(synchronously from L</guestfs_close>)."
3209 msgstr ""
3210
3211 # type: textblock
3212 #: ../src/guestfs.pod:1605
3213 msgid ""
3214 "Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
3215 "handles that are open when the program exits.  This means that this callback "
3216 "might be called indirectly from L<exit(3)>, which can cause unexpected "
3217 "problems in higher-level languages (eg. if your HLL interpreter has already "
3218 "been cleaned up by the time this is called, and if your callback then jumps "
3219 "into some HLL function)."
3220 msgstr ""
3221
3222 # type: =head2
3223 #: ../src/guestfs.pod:1613
3224 msgid "guestfs_set_progress_callback"
3225 msgstr ""
3226
3227 # type: verbatim
3228 #: ../src/guestfs.pod:1615
3229 #, no-wrap
3230 msgid ""
3231 " typedef void (*guestfs_progress_cb) (guestfs_h *g, void *opaque,\n"
3232 "                                      int proc_nr, int serial,\n"
3233 "                                      uint64_t position, uint64_t total);\n"
3234 " void guestfs_set_progress_callback (guestfs_h *g,\n"
3235 "                                     guestfs_progress_cb cb,\n"
3236 "                                     void *opaque);\n"
3237 "\n"
3238 msgstr ""
3239
3240 # type: textblock
3241 #: ../src/guestfs.pod:1622
3242 msgid ""
3243 "Some long-running operations can generate progress messages.  If this "
3244 "callback is registered, then it will be called each time a progress message "
3245 "is generated (usually two seconds after the operation started, and three "
3246 "times per second thereafter until it completes, although the frequency may "
3247 "change in future versions)."
3248 msgstr ""
3249
3250 # type: textblock
3251 #: ../src/guestfs.pod:1628
3252 msgid ""
3253 "The callback receives two numbers: C<position> and C<total>.  The units of "
3254 "C<total> are not defined, although for some operations C<total> may relate "
3255 "in some way to the amount of data to be transferred (eg. in bytes or "
3256 "megabytes), and C<position> may be the portion which has been transferred."
3257 msgstr ""
3258
3259 # type: textblock
3260 #: ../src/guestfs.pod:1634
3261 msgid "The only defined and stable parts of the API are:"
3262 msgstr ""
3263
3264 # type: textblock
3265 #: ../src/guestfs.pod:1640
3266 msgid ""
3267 "The callback can display to the user some type of progress bar or indicator "
3268 "which shows the ratio of C<position>:C<total>."
3269 msgstr ""
3270
3271 # type: textblock
3272 #: ../src/guestfs.pod:1645
3273 msgid "0 E<lt>= C<position> E<lt>= C<total>"
3274 msgstr ""
3275
3276 # type: textblock
3277 #: ../src/guestfs.pod:1649
3278 msgid ""
3279 "If any progress notification is sent during a call, then a final progress "
3280 "notification is always sent when C<position> = C<total>."
3281 msgstr ""
3282
3283 # type: textblock
3284 #: ../src/guestfs.pod:1652
3285 msgid ""
3286 "This is to simplify caller code, so callers can easily set the progress "
3287 "indicator to \"100%\" at the end of the operation, without requiring special "
3288 "code to detect this case."
3289 msgstr ""
3290
3291 # type: textblock
3292 #: ../src/guestfs.pod:1658
3293 msgid ""
3294 "The callback also receives the procedure number and serial number of the "
3295 "call.  These are only useful for debugging protocol issues, and the callback "
3296 "can normally ignore them.  The callback may want to print these numbers in "
3297 "error messages or debugging messages."
3298 msgstr ""
3299
3300 # type: =head1
3301 #: ../src/guestfs.pod:1663
3302 msgid "PRIVATE DATA AREA"
3303 msgstr ""
3304
3305 # type: textblock
3306 #: ../src/guestfs.pod:1665
3307 msgid ""
3308 "You can attach named pieces of private data to the libguestfs handle, and "
3309 "fetch them by name for the lifetime of the handle.  This is called the "
3310 "private data area and is only available from the C API."
3311 msgstr ""
3312
3313 # type: textblock
3314 #: ../src/guestfs.pod:1669
3315 msgid "To attach a named piece of data, use the following call:"
3316 msgstr ""
3317
3318 # type: verbatim
3319 #: ../src/guestfs.pod:1671
3320 #, no-wrap
3321 msgid ""
3322 " void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
3323 "\n"
3324 msgstr ""
3325
3326 # type: textblock
3327 #: ../src/guestfs.pod:1673
3328 msgid ""
3329 "C<key> is the name to associate with this data, and C<data> is an arbitrary "
3330 "pointer (which can be C<NULL>).  Any previous item with the same name is "
3331 "overwritten."
3332 msgstr ""
3333
3334 # type: textblock
3335 #: ../src/guestfs.pod:1677
3336 msgid ""
3337 "You can use any C<key> you want, but names beginning with an underscore "
3338 "character are reserved for internal libguestfs purposes (for implementing "
3339 "language bindings).  It is recommended to prefix the name with some unique "
3340 "string to avoid collisions with other users."
3341 msgstr ""
3342
3343 # type: textblock
3344 #: ../src/guestfs.pod:1682
3345 msgid "To retrieve the pointer, use:"
3346 msgstr ""
3347
3348 # type: verbatim
3349 #: ../src/guestfs.pod:1684
3350 #, no-wrap
3351 msgid ""
3352 " void *guestfs_get_private (guestfs_h *g, const char *key);\n"
3353 "\n"
3354 msgstr ""
3355
3356 # type: textblock
3357 #: ../src/guestfs.pod:1686
3358 msgid ""
3359 "This function returns C<NULL> if either no data is found associated with "
3360 "C<key>, or if the user previously set the C<key>'s C<data> pointer to "
3361 "C<NULL>."
3362 msgstr ""
3363
3364 # type: textblock
3365 #: ../src/guestfs.pod:1690
3366 msgid ""
3367 "Libguestfs does not try to look at or interpret the C<data> pointer in any "
3368 "way.  As far as libguestfs is concerned, it need not be a valid pointer at "
3369 "all.  In particular, libguestfs does I<not> try to free the data when the "
3370 "handle is closed.  If the data must be freed, then the caller must either "
3371 "free it before calling L</guestfs_close> or must set up a close callback to "
3372 "do it (see L</guestfs_set_close_callback>, and note that only one callback "
3373 "can be registered for a handle)."
3374 msgstr ""
3375
3376 # type: textblock
3377 #: ../src/guestfs.pod:1698
3378 msgid ""
3379 "The private data area is implemented using a hash table, and should be "
3380 "reasonably efficient for moderate numbers of keys."
3381 msgstr ""
3382
3383 # type: =end
3384 #: ../src/guestfs.pod:1701 ../src/guestfs.pod:1706
3385 msgid "html"
3386 msgstr ""
3387
3388 # type: textblock
3389 #: ../src/guestfs.pod:1703
3390 msgid ""
3391 "<!-- old anchor for the next section --> <a name="
3392 "\"state_machine_and_low_level_event_api\"/>"
3393 msgstr ""
3394
3395 # type: =head1
3396 #: ../src/guestfs.pod:1708
3397 msgid "ARCHITECTURE"
3398 msgstr ""
3399
3400 # type: textblock
3401 #: ../src/guestfs.pod:1710
3402 msgid ""
3403 "Internally, libguestfs is implemented by running an appliance (a special "
3404 "type of small virtual machine) using L<qemu(1)>.  Qemu runs as a child "
3405 "process of the main program."
3406 msgstr ""
3407
3408 # type: verbatim
3409 #: ../src/guestfs.pod:1714
3410 #, no-wrap
3411 msgid ""
3412 "  ___________________\n"
3413 " /                   \\\n"
3414 " | main program      |\n"
3415 " |                   |\n"
3416 " |                   |           child process / appliance\n"
3417 " |                   |           __________________________\n"
3418 " |                   |          / qemu                     \\\n"
3419 " +-------------------+   RPC    |      +-----------------+ |\n"
3420 " | libguestfs     <--------------------> guestfsd        | |\n"
3421 " |                   |          |      +-----------------+ |\n"
3422 " \\___________________/          |      | Linux kernel    | |\n"
3423 "                                |      +--^--------------+ |\n"
3424 "                                \\_________|________________/\n"
3425 "                                          |\n"
3426 "                                   _______v______\n"
3427 "                                  /              \\\n"
3428 "                                  | Device or    |\n"
3429 "                                  | disk image   |\n"
3430 "                                  \\______________/\n"
3431 "\n"
3432 msgstr ""
3433
3434 # type: textblock
3435 #: ../src/guestfs.pod:1734
3436 msgid ""
3437 "The library, linked to the main program, creates the child process and hence "
3438 "the appliance in the L</guestfs_launch> function."
3439 msgstr ""
3440
3441 # type: textblock
3442 #: ../src/guestfs.pod:1737
3443 msgid ""
3444 "Inside the appliance is a Linux kernel and a complete stack of userspace "
3445 "tools (such as LVM and ext2 programs) and a small controlling daemon called "
3446 "L</guestfsd>.  The library talks to L</guestfsd> using remote procedure "
3447 "calls (RPC).  There is a mostly one-to-one correspondence between libguestfs "
3448 "API calls and RPC calls to the daemon.  Lastly the disk image(s) are "
3449 "attached to the qemu process which translates device access by the "
3450 "appliance's Linux kernel into accesses to the image."
3451 msgstr ""
3452
3453 # type: textblock
3454 #: ../src/guestfs.pod:1746
3455 msgid ""
3456 "A common misunderstanding is that the appliance \"is\" the virtual machine.  "
3457 "Although the disk image you are attached to might also be used by some "
3458 "virtual machine, libguestfs doesn't know or care about this.  (But you will "
3459 "care if both libguestfs's qemu process and your virtual machine are trying "
3460 "to update the disk image at the same time, since these usually results in "
3461 "massive disk corruption)."
3462 msgstr ""
3463
3464 # type: =head1
3465 #: ../src/guestfs.pod:1753
3466 msgid "STATE MACHINE"
3467 msgstr ""
3468
3469 # type: textblock
3470 #: ../src/guestfs.pod:1755
3471 msgid "libguestfs uses a state machine to model the child process:"
3472 msgstr ""
3473
3474 # type: verbatim
3475 #: ../src/guestfs.pod:1757
3476 #, no-wrap
3477 msgid ""
3478 "                         |\n"
3479 "                    guestfs_create\n"
3480 "                         |\n"
3481 "                         |\n"
3482 "                     ____V_____\n"
3483 "                    /          \\\n"
3484 "                    |  CONFIG  |\n"
3485 "                    \\__________/\n"
3486 "                     ^ ^   ^  \\\n"
3487 "                    /  |    \\  \\ guestfs_launch\n"
3488 "                   /   |    _\\__V______\n"
3489 "                  /    |   /           \\\n"
3490 "                 /     |   | LAUNCHING |\n"
3491 "                /      |   \\___________/\n"
3492 "               /       |       /\n"
3493 "              /        |  guestfs_launch\n"
3494 "             /         |     /\n"
3495 "    ______  /        __|____V\n"
3496 "   /      \\ ------> /        \\\n"
3497 "   | BUSY |         | READY  |\n"
3498 "   \\______/ <------ \\________/\n"
3499 "\n"
3500 msgstr ""
3501
3502 # type: textblock
3503 #: ../src/guestfs.pod:1779
3504 msgid ""
3505 "The normal transitions are (1) CONFIG (when the handle is created, but there "
3506 "is no child process), (2) LAUNCHING (when the child process is booting up), "
3507 "(3) alternating between READY and BUSY as commands are issued to, and "
3508 "carried out by, the child process."
3509 msgstr ""
3510
3511 # type: textblock
3512 #: ../src/guestfs.pod:1784
3513 msgid ""
3514 "The guest may be killed by L</guestfs_kill_subprocess>, or may die "
3515 "asynchronously at any time (eg. due to some internal error), and that causes "
3516 "the state to transition back to CONFIG."
3517 msgstr ""
3518
3519 # type: textblock
3520 #: ../src/guestfs.pod:1788
3521 msgid ""
3522 "Configuration commands for qemu such as L</guestfs_add_drive> can only be "
3523 "issued when in the CONFIG state."
3524 msgstr ""
3525
3526 # type: textblock
3527 #: ../src/guestfs.pod:1791
3528 msgid ""
3529 "The API offers one call that goes from CONFIG through LAUNCHING to READY.  "
3530 "L</guestfs_launch> blocks until the child process is READY to accept "
3531 "commands (or until some failure or timeout).  L</guestfs_launch> internally "
3532 "moves the state from CONFIG to LAUNCHING while it is running."
3533 msgstr ""
3534
3535 # type: textblock
3536 #: ../src/guestfs.pod:1797
3537 msgid ""
3538 "API actions such as L</guestfs_mount> can only be issued when in the READY "
3539 "state.  These API calls block waiting for the command to be carried out (ie. "
3540 "the state to transition to BUSY and then back to READY).  There are no non-"
3541 "blocking versions, and no way to issue more than one command per handle at "
3542 "the same time."
3543 msgstr ""
3544
3545 # type: textblock
3546 #: ../src/guestfs.pod:1803
3547 msgid ""
3548 "Finally, the child process sends asynchronous messages back to the main "
3549 "program, such as kernel log messages.  You can register a callback to "
3550 "receive these messages."
3551 msgstr ""
3552
3553 # type: =head1
3554 #: ../src/guestfs.pod:1807
3555 msgid "INTERNALS"
3556 msgstr ""
3557
3558 # type: =head2
3559 #: ../src/guestfs.pod:1809
3560 msgid "COMMUNICATION PROTOCOL"
3561 msgstr ""
3562
3563 # type: textblock
3564 #: ../src/guestfs.pod:1811
3565 msgid ""
3566 "Don't rely on using this protocol directly.  This section documents how it "
3567 "currently works, but it may change at any time."
3568 msgstr ""
3569
3570 # type: textblock
3571 #: ../src/guestfs.pod:1814
3572 msgid ""
3573 "The protocol used to talk between the library and the daemon running inside "
3574 "the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
3575 "1014, RFC 1832, RFC 4506)."
3576 msgstr ""
3577
3578 # type: textblock
3579 #: ../src/guestfs.pod:1818
3580 msgid ""
3581 "The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
3582 "this file is automatically generated)."
3583 msgstr ""
3584
3585 # type: textblock
3586 #: ../src/guestfs.pod:1821
3587 msgid ""
3588 "There are two broad cases, ordinary functions that don't have any C<FileIn> "
3589 "and C<FileOut> parameters, which are handled with very simple request/reply "
3590 "messages.  Then there are functions that have any C<FileIn> or C<FileOut> "
3591 "parameters, which use the same request and reply messages, but they may also "
3592 "be followed by files sent using a chunked encoding."
3593 msgstr ""
3594
3595 # type: =head3
3596 #: ../src/guestfs.pod:1828
3597 msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
3598 msgstr ""
3599
3600 # type: textblock
3601 #: ../src/guestfs.pod:1830
3602 msgid "For ordinary functions, the request message is:"
3603 msgstr ""
3604
3605 # type: verbatim
3606 #: ../src/guestfs.pod:1832
3607 #, no-wrap
3608 msgid ""
3609 " total length (header + arguments,\n"
3610 "      but not including the length word itself)\n"
3611 " struct guestfs_message_header (encoded as XDR)\n"
3612 " struct guestfs_<foo>_args (encoded as XDR)\n"
3613 "\n"
3614 msgstr ""
3615
3616 # type: textblock
3617 #: ../src/guestfs.pod:1837
3618 msgid ""
3619 "The total length field allows the daemon to allocate a fixed size buffer "
3620 "into which it slurps the rest of the message.  As a result, the total length "
3621 "is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the "
3622 "effective size of any request is limited to somewhere under this size."
3623 msgstr ""
3624
3625 # type: textblock
3626 #: ../src/guestfs.pod:1843
3627 msgid ""
3628 "Note also that many functions don't take any arguments, in which case the "
3629 "C<guestfs_I<foo>_args> is completely omitted."
3630 msgstr ""
3631
3632 # type: textblock
3633 #: ../src/guestfs.pod:1846
3634 msgid ""
3635 "The header contains the procedure number (C<guestfs_proc>) which is how the "
3636 "receiver knows what type of args structure to expect, or none at all."
3637 msgstr ""
3638
3639 # type: textblock
3640 #: ../src/guestfs.pod:1850
3641 msgid "The reply message for ordinary functions is:"
3642 msgstr ""
3643
3644 # type: verbatim
3645 #: ../src/guestfs.pod:1852
3646 #, no-wrap
3647 msgid ""
3648 " total length (header + ret,\n"
3649 "      but not including the length word itself)\n"
3650 " struct guestfs_message_header (encoded as XDR)\n"
3651 " struct guestfs_<foo>_ret (encoded as XDR)\n"
3652 "\n"
3653 msgstr ""
3654
3655 # type: textblock
3656 #: ../src/guestfs.pod:1857
3657 msgid ""
3658 "As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
3659 "functions that return no formal return values."
3660 msgstr ""
3661
3662 # type: textblock
3663 #: ../src/guestfs.pod:1860
3664 msgid ""
3665 "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
3666 msgstr ""
3667
3668 # type: textblock
3669 #: ../src/guestfs.pod:1863
3670 msgid ""
3671 "In the case of an error, a flag is set in the header, and the reply message "
3672 "is slightly changed:"
3673 msgstr ""
3674
3675 # type: verbatim
3676 #: ../src/guestfs.pod:1866
3677 #, no-wrap
3678 msgid ""
3679 " total length (header + error,\n"
3680 "      but not including the length word itself)\n"
3681 " struct guestfs_message_header (encoded as XDR)\n"
3682 " struct guestfs_message_error (encoded as XDR)\n"
3683 "\n"
3684 msgstr ""
3685
3686 # type: textblock
3687 #: ../src/guestfs.pod:1871
3688 msgid ""
3689 "The C<guestfs_message_error> structure contains the error message as a "
3690 "string."
3691 msgstr ""
3692
3693 # type: =head3
3694 #: ../src/guestfs.pod:1874
3695 msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
3696 msgstr ""
3697
3698 # type: textblock
3699 #: ../src/guestfs.pod:1876
3700 msgid ""
3701 "A C<FileIn> parameter indicates that we transfer a file I<into> the guest.  "
3702 "The normal request message is sent (see above).  However this is followed by "
3703 "a sequence of file chunks."
3704 msgstr ""
3705
3706 # type: verbatim
3707 #: ../src/guestfs.pod:1880
3708 #, no-wrap
3709 msgid ""
3710 " total length (header + arguments,\n"
3711 "      but not including the length word itself,\n"
3712 "      and not including the chunks)\n"
3713 " struct guestfs_message_header (encoded as XDR)\n"
3714 " struct guestfs_<foo>_args (encoded as XDR)\n"
3715 " sequence of chunks for FileIn param #0\n"
3716 " sequence of chunks for FileIn param #1 etc.\n"
3717 "\n"
3718 msgstr ""
3719
3720 # type: textblock
3721 #: ../src/guestfs.pod:1888
3722 msgid "The \"sequence of chunks\" is:"
3723 msgstr ""
3724
3725 # type: verbatim
3726 #: ../src/guestfs.pod:1890
3727 #, no-wrap
3728 msgid ""
3729 " length of chunk (not including length word itself)\n"
3730 " struct guestfs_chunk (encoded as XDR)\n"
3731 " length of chunk\n"
3732 " struct guestfs_chunk (encoded as XDR)\n"
3733 "   ...\n"
3734 " length of chunk\n"
3735 " struct guestfs_chunk (with data.data_len == 0)\n"
3736 "\n"
3737 msgstr ""
3738
3739 # type: textblock
3740 #: ../src/guestfs.pod:1898
3741 msgid ""
3742 "The final chunk has the C<data_len> field set to zero.  Additionally a flag "
3743 "is set in the final chunk to indicate either successful completion or early "
3744 "cancellation."
3745 msgstr ""
3746
3747 # type: textblock
3748 #: ../src/guestfs.pod:1902
3749 msgid ""
3750 "At time of writing there are no functions that have more than one FileIn "
3751 "parameter.  However this is (theoretically) supported, by sending the "
3752 "sequence of chunks for each FileIn parameter one after another (from left to "
3753 "right)."
3754 msgstr ""
3755
3756 # type: textblock
3757 #: ../src/guestfs.pod:1907
3758 msgid ""
3759 "Both the library (sender) I<and> the daemon (receiver) may cancel the "
3760 "transfer.  The library does this by sending a chunk with a special flag set "
3761 "to indicate cancellation.  When the daemon sees this, it cancels the whole "
3762 "RPC, does I<not> send any reply, and goes back to reading the next request."
3763 msgstr ""
3764
3765 # type: textblock
3766 #: ../src/guestfs.pod:1913
3767 msgid ""
3768 "The daemon may also cancel.  It does this by writing a special word "
3769 "C<GUESTFS_CANCEL_FLAG> to the socket.  The library listens for this during "
3770 "the transfer, and if it gets it, it will cancel the transfer (it sends a "
3771 "cancel chunk).  The special word is chosen so that even if cancellation "
3772 "happens right at the end of the transfer (after the library has finished "
3773 "writing and has started listening for the reply), the \"spurious\" cancel "
3774 "flag will not be confused with the reply message."
3775 msgstr ""
3776
3777 # type: textblock
3778 #: ../src/guestfs.pod:1922
3779 msgid ""
3780 "This protocol allows the transfer of arbitrary sized files (no 32 bit "
3781 "limit), and also files where the size is not known in advance (eg. from "
3782 "pipes or sockets).  However the chunks are rather small "
3783 "(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need "
3784 "to keep much in memory."
3785 msgstr ""
3786
3787 # type: =head3
3788 #: ../src/guestfs.pod:1928
3789 msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
3790 msgstr ""
3791
3792 # type: textblock
3793 #: ../src/guestfs.pod:1930
3794 msgid ""
3795 "The protocol for FileOut parameters is exactly the same as for FileIn "
3796 "parameters, but with the roles of daemon and library reversed."
3797 msgstr ""
3798
3799 # type: verbatim
3800 #: ../src/guestfs.pod:1933
3801 #, no-wrap
3802 msgid ""
3803 " total length (header + ret,\n"
3804 "      but not including the length word itself,\n"
3805 "      and not including the chunks)\n"
3806 " struct guestfs_message_header (encoded as XDR)\n"
3807 " struct guestfs_<foo>_ret (encoded as XDR)\n"
3808 " sequence of chunks for FileOut param #0\n"
3809 " sequence of chunks for FileOut param #1 etc.\n"
3810 "\n"
3811 msgstr ""
3812
3813 # type: =head3
3814 #: ../src/guestfs.pod:1941
3815 msgid "INITIAL MESSAGE"
3816 msgstr ""
3817
3818 # type: textblock
3819 #: ../src/guestfs.pod:1943
3820 msgid ""
3821 "When the daemon launches it sends an initial word (C<GUESTFS_LAUNCH_FLAG>) "
3822 "which indicates that the guest and daemon is alive.  This is what L</"
3823 "guestfs_launch> waits for."
3824 msgstr ""
3825
3826 # type: =head3
3827 #: ../src/guestfs.pod:1947
3828 msgid "PROGRESS NOTIFICATION MESSAGES"
3829 msgstr ""
3830
3831 # type: textblock
3832 #: ../src/guestfs.pod:1949
3833 msgid ""
3834 "The daemon may send progress notification messages at any time.  These are "
3835 "distinguished by the normal length word being replaced by "
3836 "C<GUESTFS_PROGRESS_FLAG>, followed by a fixed size progress message."
3837 msgstr ""
3838
3839 # type: textblock
3840 #: ../src/guestfs.pod:1953
3841 msgid ""
3842 "The library turns them into progress callbacks (see "
3843 "C<guestfs_set_progress_callback>) if there is a callback registered, or "
3844 "discards them if not."
3845 msgstr ""
3846
3847 # type: textblock
3848 #: ../src/guestfs.pod:1957
3849 msgid ""
3850 "The daemon self-limits the frequency of progress messages it sends (see "
3851 "C<daemon/proto.c:notify_progress>).  Not all calls generate progress "
3852 "messages."
3853 msgstr ""
3854
3855 # type: =head1
3856 #: ../src/guestfs.pod:1961
3857 msgid "LIBGUESTFS VERSION NUMBERS"
3858 msgstr ""
3859
3860 # type: textblock
3861 #: ../src/guestfs.pod:1963
3862 msgid ""
3863 "Since April 2010, libguestfs has started to make separate development and "
3864 "stable releases, along with corresponding branches in our git repository.  "
3865 "These separate releases can be identified by version number:"
3866 msgstr ""
3867
3868 # type: verbatim
3869 #: ../src/guestfs.pod:1968
3870 #, no-wrap
3871 msgid ""
3872 "                 even numbers for stable: 1.2.x, 1.4.x, ...\n"
3873 "       .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
3874 "       |\n"
3875 "       v\n"
3876 " 1  .  3  .  5\n"
3877 " ^           ^\n"
3878 " |           |\n"
3879 " |           `-------- sub-version\n"
3880 " |\n"
3881 " `------ always '1' because we don't change the ABI\n"
3882 "\n"
3883 msgstr ""
3884
3885 # type: textblock
3886 #: ../src/guestfs.pod:1979
3887 msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
3888 msgstr ""
3889
3890 # type: textblock
3891 #: ../src/guestfs.pod:1981
3892 msgid ""
3893 "As time passes we cherry pick fixes from the development branch and backport "
3894 "those into the stable branch, the effect being that the stable branch should "
3895 "get more stable and less buggy over time.  So the stable releases are ideal "
3896 "for people who don't need new features but would just like the software to "
3897 "work."
3898 msgstr ""
3899
3900 # type: textblock
3901 #: ../src/guestfs.pod:1987
3902 msgid "Our criteria for backporting changes are:"
3903 msgstr ""
3904
3905 # type: textblock
3906 #: ../src/guestfs.pod:1993
3907 msgid ""
3908 "Documentation changes which don't affect any code are backported unless the "
3909 "documentation refers to a future feature which is not in stable."
3910 msgstr ""
3911
3912 # type: textblock
3913 #: ../src/guestfs.pod:1999
3914 msgid ""
3915 "Bug fixes which are not controversial, fix obvious problems, and have been "
3916 "well tested are backported."
3917 msgstr ""
3918
3919 # type: textblock
3920 #: ../src/guestfs.pod:2004
3921 msgid ""
3922 "Simple rearrangements of code which shouldn't affect how it works get "
3923 "backported.  This is so that the code in the two branches doesn't get too "
3924 "far out of step, allowing us to backport future fixes more easily."
3925 msgstr ""
3926
3927 # type: textblock
3928 #: ../src/guestfs.pod:2010
3929 msgid ""
3930 "We I<don't> backport new features, new APIs, new tools etc, except in one "
3931 "exceptional case: the new feature is required in order to implement an "
3932 "important bug fix."
3933 msgstr ""
3934
3935 # type: textblock
3936 #: ../src/guestfs.pod:2016
3937 msgid ""
3938 "A new stable branch starts when we think the new features in development are "
3939 "substantial and compelling enough over the current stable branch to warrant "
3940 "it.  When that happens we create new stable and development versions 1.N.0 "
3941 "and 1.(N+1).0 [N is even].  The new dot-oh release won't necessarily be so "
3942 "stable at this point, but by backporting fixes from development, that branch "
3943 "will stabilize over time."
3944 msgstr ""
3945
3946 # type: =head1
3947 #: ../src/guestfs.pod:2024 ../fish/guestfish.pod:914
3948 #: ../test-tool/libguestfs-test-tool.pod:104 ../tools/virt-edit.pl:330
3949 #: ../tools/virt-rescue.pl:255
3950 msgid "ENVIRONMENT VARIABLES"
3951 msgstr ""
3952
3953 # type: =item
3954 #: ../src/guestfs.pod:2028 ../fish/guestfish.pod:940
3955 msgid "LIBGUESTFS_APPEND"
3956 msgstr ""
3957
3958 # type: textblock
3959 #: ../src/guestfs.pod:2030 ../fish/guestfish.pod:942
3960 msgid "Pass additional options to the guest kernel."
3961 msgstr ""
3962
3963 # type: =item
3964 #: ../src/guestfs.pod:2032 ../fish/guestfish.pod:944
3965 msgid "LIBGUESTFS_DEBUG"
3966 msgstr ""
3967
3968 # type: textblock
3969 #: ../src/guestfs.pod:2034
3970 msgid ""
3971 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages.  This has the same "
3972 "effect as calling C<guestfs_set_verbose (g, 1)>."
3973 msgstr ""
3974
3975 # type: =item
3976 #: ../src/guestfs.pod:2037 ../fish/guestfish.pod:949
3977 msgid "LIBGUESTFS_MEMSIZE"
3978 msgstr ""
3979
3980 # type: textblock
3981 #: ../src/guestfs.pod:2039 ../fish/guestfish.pod:951
3982 msgid ""
3983 "Set the memory allocated to the qemu process, in megabytes.  For example:"
3984 msgstr ""
3985
3986 # type: verbatim
3987 #: ../src/guestfs.pod:2042 ../fish/guestfish.pod:954
3988 #, no-wrap
3989 msgid ""
3990 " LIBGUESTFS_MEMSIZE=700\n"
3991 "\n"
3992 msgstr ""
3993
3994 # type: =item
3995 #: ../src/guestfs.pod:2044 ../fish/guestfish.pod:956
3996 msgid "LIBGUESTFS_PATH"
3997 msgstr ""
3998
3999 # type: textblock
4000 #: ../src/guestfs.pod:2046
4001 msgid ""
4002 "Set the path that libguestfs uses to search for kernel and initrd.img.  See "
4003 "the discussion of paths in section PATH above."
4004 msgstr ""
4005
4006 # type: =item
4007 #: ../src/guestfs.pod:2049 ../fish/guestfish.pod:961
4008 msgid "LIBGUESTFS_QEMU"
4009 msgstr ""
4010
4011 # type: textblock
4012 #: ../src/guestfs.pod:2051 ../fish/guestfish.pod:963
4013 msgid ""
4014 "Set the default qemu binary that libguestfs uses.  If not set, then the qemu "
4015 "which was found at compile time by the configure script is used."
4016 msgstr ""
4017
4018 # type: textblock
4019 #: ../src/guestfs.pod:2055
4020 msgid "See also L</QEMU WRAPPERS> above."
4021 msgstr ""
4022
4023 # type: =item
4024 #: ../src/guestfs.pod:2057 ../fish/guestfish.pod:967
4025 msgid "LIBGUESTFS_TRACE"
4026 msgstr ""
4027
4028 # type: textblock
4029 #: ../src/guestfs.pod:2059
4030 msgid ""
4031 "Set C<LIBGUESTFS_TRACE=1> to enable command traces.  This has the same "
4032 "effect as calling C<guestfs_set_trace (g, 1)>."
4033 msgstr ""
4034
4035 # type: =item
4036 #: ../src/guestfs.pod:2062 ../fish/guestfish.pod:976
4037 msgid "TMPDIR"
4038 msgstr ""
4039
4040 # type: textblock
4041 #: ../src/guestfs.pod:2064 ../fish/guestfish.pod:978
4042 msgid "Location of temporary directory, defaults to C</tmp>."
4043 msgstr ""
4044
4045 # type: textblock
4046 #: ../src/guestfs.pod:2066 ../fish/guestfish.pod:980
4047 msgid ""
4048 "If libguestfs was compiled to use the supermin appliance then the real "
4049 "appliance is cached in this directory, shared between all handles belonging "
4050 "to the same EUID.  You can use C<$TMPDIR> to configure another directory to "
4051 "use in case C</tmp> is not large enough."
4052 msgstr ""
4053
4054 # type: =head1
4055 #: ../src/guestfs.pod:2074 ../fish/guestfish.pod:1038
4056 #: ../test-tool/libguestfs-test-tool.pod:109 ../fuse/guestmount.pod:233
4057 #: ../inspector/virt-inspector.pl:536 ../tools/virt-edit.pl:350
4058 #: ../tools/virt-win-reg.pl:484 ../tools/virt-df.pl:640
4059 #: ../tools/virt-ls.pl:232 ../tools/virt-resize.pl:1486
4060 #: ../tools/virt-list-filesystems.pl:186 ../tools/virt-tar.pl:281
4061 #: ../tools/virt-rescue.pl:267 ../tools/virt-make-fs.pl:534
4062 #: ../tools/virt-list-partitions.pl:254
4063 msgid "SEE ALSO"
4064 msgstr ""
4065
4066 # type: textblock
4067 #: ../src/guestfs.pod:2076
4068 msgid ""
4069 "L<guestfish(1)>, L<guestmount(1)>, L<virt-cat(1)>, L<virt-df(1)>, L<virt-edit"