X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=generator%2Fgenerator_actions.ml;h=ce3382fa41e3db1c035695110b17666605ee2d48;hp=87c934aa22a5d4a0a36c366d62e9be01dfa5ceab;hb=47412f137f2b09dbc2b44b78ba84c0b348e3f402;hpb=f173543fd207bdc254a5eb75180d82ef25eacae9 diff --git a/generator/generator_actions.ml b/generator/generator_actions.ml index 87c934a..ce3382f 100644 --- a/generator/generator_actions.ml +++ b/generator/generator_actions.ml @@ -743,6 +743,10 @@ Any Microsoft Windows operating system. FreeBSD. +=item \"netbsd\" + +NetBSD. + =item \"unknown\" The operating system type could not be determined. @@ -802,6 +806,10 @@ Gentoo. Linux Mint. +=item \"mageia\" + +Mageia. + =item \"mandriva\" Mandriva. @@ -810,6 +818,10 @@ Mandriva. MeeGo. +=item \"opensuse\" + +OpenSUSE. + =item \"pardus\" Pardus. @@ -830,6 +842,10 @@ Scientific Linux. Slackware. +=item \"ttylinux\" + +ttylinux. + =item \"ubuntu\" Ubuntu. @@ -991,7 +1007,7 @@ be mountable but require special options. Filesystems may not all belong to a single logical operating system (use C to look for OSes)."); - ("add_drive_opts", (RErr, [String "filename"], [Bool "readonly"; String "format"; String "iface"]), -1, [FishAlias "add"], + ("add_drive_opts", (RErr, [String "filename"], [Bool "readonly"; String "format"; String "iface"; String "name"]), -1, [FishAlias "add"], [], "add an image to examine or modify", "\ @@ -1034,6 +1050,11 @@ this security hole. This rarely-used option lets you emulate the behaviour of the deprecated C call (q.v.) +=item C + +The name the drive had in the original guest, e.g. /dev/sdb. This is used as a +hint to the guest inspection process if it is available. + =back"); ("inspect_get_windows_systemroot", (RString "systemroot", [Device "root"], []), -1, [], @@ -1069,6 +1090,13 @@ Please read L for more details."); This returns the internal QEMU command line. 'debug' commands are not part of the formal API and can be removed or changed at any time."); + ("debug_drives", (RStringList "cmdline", [], []), -1, [NotInDocs], + [], + "debug the drives (internal use only)", + "\ +This returns the internal list of drives. 'debug' commands are +not part of the formal API and can be removed or changed at any time."); + ("add_domain", (RInt "nrdisks", [String "dom"], [String "libvirturi"; Bool "readonly"; String "iface"; Bool "live"; Bool "allowuuid"]), -1, [FishAlias "domain"], [], "add the disk(s) from a named libvirt domain", @@ -1161,7 +1189,8 @@ This returns the string C if we could not determine the package format I if the operating system does not have a real packaging system (eg. Windows). -Possible strings include: C, C, C, C, C. +Possible strings include: +C, C, C, C, C, C. Future versions of libguestfs may return other strings. Please read L for more details."); @@ -1182,7 +1211,7 @@ a real packaging system (eg. Windows). Possible strings include: C, C, C (for all Debian derivatives), -C, C, C, C. +C, C, C, C, C. Future versions of libguestfs may return other strings. Please read L for more details."); @@ -1545,6 +1574,22 @@ C<^C> to kill the subprocess."); "\ This returns the process group flag."); + ("set_smp", (RErr, [Int "smp"], []), -1, [FishAlias "smp"], + [], + "set number of virtual CPUs in appliance", + "\ +Change the number of virtual CPUs assigned to the appliance. The +default is C<1>. Increasing this may improve performance, though +often it has no effect. + +This function must be called before C."); + + ("get_smp", (RInt "smp", [], []), -1, [], + [], + "get number of virtual CPUs in appliance", + "\ +This returns the number of virtual CPUs assigned to the appliance."); + ] (* daemon_functions are any functions which cause some action @@ -1552,7 +1597,7 @@ This returns the process group flag."); *) let daemon_functions = [ - ("mount", (RErr, [Device "device"; String "mountpoint"], []), 1, [DeprecatedBy "mount_options"], + ("mount", (RErr, [Device "device"; String "mountpoint"], []), 1, [], [InitEmpty, Always, TestOutput ( [["part_disk"; "/dev/sda"; "mbr"]; ["mkfs"; "ext2"; "/dev/sda1"]; @@ -1575,15 +1620,12 @@ exist. The mounted filesystem is writable, if we have sufficient permissions on the underlying device. -B -When you use this call, the filesystem options C and C -are set implicitly. This was originally done because we thought it -would improve reliability, but it turns out that I<-o sync> has a -very large negative performance impact and negligible effect on -reliability. Therefore we recommend that you avoid using -C in any code that needs performance, and instead -use C (use an empty string for the first -parameter if you don't want any options)."); +Before libguestfs 1.13.16, this call implicitly added the options +C and C. The C option greatly slowed +writes and caused many problems for users. If your program +might need to work with older versions of libguestfs, use +C instead (using an empty string for the +first parameter if you don't want any options)."); ("sync", (RErr, [], []), 2, [], [ InitEmpty, Always, TestRun [["sync"]]], @@ -1821,7 +1863,12 @@ do not overwrite original. Overrides C. =item C = 4 -Typecheck lenses (can be expensive). +Typecheck lenses. + +This option is only useful when debugging Augeas lenses. Use +of this option may require additional memory for the libguestfs +appliance. You may need to set the C +environment variable or call C. =item C = 8 @@ -3001,10 +3048,14 @@ How many blocks are zeroed isn't specified (but it's I enough to securely wipe the device). It should be sufficient to remove any partition tables, filesystem superblocks and so on. +If blocks are already zero, then this command avoids writing +zeroes. This prevents the underlying device from becoming non-sparse +or growing unnecessarily. + See also: C, C, C"); - ("grub_install", (RErr, [Pathname "root"; Device "device"], []), 86, [], + ("grub_install", (RErr, [Pathname "root"; Device "device"], []), 86, [Optional "grub"], (* See: * https://bugzilla.redhat.com/show_bug.cgi?id=484986 * https://bugzilla.redhat.com/show_bug.cgi?id=479760 @@ -3014,12 +3065,32 @@ C"); ["write"; "/boot/grub/device.map"; "(hd0) /dev/vda"]; ["grub_install"; "/"; "/dev/vda"]; ["is_dir"; "/boot"]])], - "install GRUB", + "install GRUB 1", "\ -This command installs GRUB (the Grand Unified Bootloader) on +This command installs GRUB 1 (the Grand Unified Bootloader) on C, with the root directory being C. -Note: If grub-install reports the error +Notes: + +=over 4 + +=item * + +There is currently no way in the API to install grub2, which +is used by most modern Linux guests. It is possible to run +the grub2 command from the guest, although see the +caveats in L. + +=item * + +This uses C from the host. Unfortunately grub is +not always compatible with itself, so this only works in rather +narrow circumstances. Careful testing with each guest version +is advisable. + +=item * + +If grub-install reports the error \"No suitable drive was found in the generated device map.\" it may be that you need to create a C file first that contains the mapping between grub device names @@ -3028,7 +3099,9 @@ a file containing: (hd0) /dev/vda -replacing C with the name of the installation device."); +replacing C with the name of the installation device. + +=back"); ("cp", (RErr, [Pathname "src"; Pathname "dest"], []), 87, [], [InitScratchFS, Always, TestOutput ( @@ -4843,7 +4916,9 @@ Possible values for C are: =over 4 -=item B | B +=item B + +=item B Intel EFI / GPT partition table. @@ -4851,7 +4926,9 @@ This is recommended for >= 2 TB partitions that will be accessed from Linux and Intel-based Mac OS X. It also has limited backwards compatibility with the C format. -=item B | B +=item B + +=item B The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and Windows. This partition type will B work @@ -4869,7 +4946,9 @@ supported include: AIX disk labels. -=item B | B +=item B + +=item B Amiga \"Rigid Disk Block\" format. @@ -5218,7 +5297,11 @@ is not large enough."); "\ This command writes zeroes over the entire C. Compare with C which just zeroes the first few blocks of -a device."); +a device. + +If blocks are already zero, then this command avoids writing +zeroes. This prevents the underlying device from becoming non-sparse +or growing unnecessarily."); ("txz_in", (RErr, [FileIn "tarball"; Pathname "directory"], []), 229, [Optional "xz"], [InitScratchFS, Always, TestOutput ( @@ -5767,7 +5850,9 @@ removes the partition number, returning the device name (eg. \"/dev/sdb\"). The named partition must exist, for example as a string returned -from C."); +from C. + +See also C."); ("upload_offset", (RErr, [FileIn "filename"; Dev_or_Path "remotefilename"; Int64 "offset"], []), 273, [Progress], (let md5 = Digest.to_hex (Digest.file "COPYING.LIB") in @@ -6101,6 +6186,47 @@ C does not exist, then a new file is created. See also C."); + ("compress_out", (RErr, [String "ctype"; Pathname "file"; FileOut "zfile"], [Int "level"]), 291, [], + [], + "output compressed file", + "\ +This command compresses C and writes it out to the local +file C. + +The compression program used is controlled by the C parameter. +Currently this includes: C, C, C, C or C. +Some compression types may not be supported by particular builds of +libguestfs, in which case you will get an error containing the +substring \"not supported\". + +The optional C parameter controls compression level. The +meaning and default for this parameter depends on the compression +program being used."); + + ("compress_device_out", (RErr, [String "ctype"; Device "device"; FileOut "zdevice"], [Int "level"]), 292, [], + [], + "output compressed device", + "\ +This command compresses C and writes it out to the local +file C. + +The C and optional C parameters have the same meaning +as in C."); + + ("part_to_partnum", (RInt "partnum", [Device "partition"], []), 293, [], + [InitPartition, Always, TestOutputInt ( + [["part_to_partnum"; "/dev/sda1"]], 1); + InitEmpty, Always, TestLastFail ( + [["part_to_partnum"; "/dev/sda"]])], + "convert partition name to partition number", + "\ +This function takes a partition name (eg. \"/dev/sdb1\") and +returns the partition number (eg. C<1>). + +The named partition must exist, for example as a string returned +from C. + +See also C."); ] let all_functions = non_daemon_functions @ daemon_functions @@ -6289,6 +6415,17 @@ Close and reopen the libguestfs handle. It is not necessary to use this normally, because the handle is closed properly when guestfish exits. However this is occasionally useful for testing."); + ("setenv", (RErr,[], []), -1, [], [], + "set an environment variable", + " setenv VAR value + +Set the environment variable C to the string C. + +To print the value of an environment variable use a shell command +such as: + + !echo $VAR"); + ("sparse", (RErr,[], []), -1, [], [], "create a sparse disk image and add", " sparse filename size @@ -6323,4 +6460,10 @@ See also L."); Run the command as usual, but print the elapsed time afterwards. This can be useful for benchmarking operations."); + ("unsetenv", (RErr,[], []), -1, [], [], + "unset an environment variable", + " unsetenv VAR + +Remove C from the environment."); + ]