VirtualBox

Changeset 94199 in vbox for trunk


Ignore:
Timestamp:
Mar 12, 2022 7:18:11 PM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
150455
Message:

doc/manual,FE/VBoxManage: Convert clonemedium command to refentry documentation, ​bugref:9186

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/doc/manual/Config.kmk

    r94198 r94199  
    6868        man_VBoxManage-bandwidthctl.xml \
    6969        man_VBoxManage-showmediuminfo.xml \
    70         man_VBoxManage-createmedium.xml
     70        man_VBoxManage-createmedium.xml \
     71        man_VBoxManage-clonemedium.xml
    7172
    7273## List of user manual XML files.
  • TabularUnified trunk/doc/manual/en_US/man_VBoxManage-clonemedium.xml

    r82969 r94199  
    2020<refentry id="vboxmanage-clonemedium" lang="en">
    2121  <refentryinfo>
    22     <pubdate>August 2019</pubdate>
     22    <pubdate>$Date$</pubdate>
    2323    <title>VBoxManage clonemedium</title>
    2424  </refentryinfo>
     
    3232    <refname>VBoxManage-clonemedium</refname>
    3333    <refpurpose>create a clone of a medium</refpurpose>
    34     <refclass>Oracle VM VirtualBox</refclass>
     34    <refclass>&product-name;</refclass>
    3535  </refnamediv>
    3636
  • TabularUnified trunk/doc/manual/en_US/user_VBoxManage.xml

    r94198 r94199  
    10891089  </sect1>
    10901090
    1091   <sect1 id="vboxmanage-clonemedium">
    1092 
    1093     <title>VBoxManage clonemedium</title>
    1094 
    1095     <para>
    1096       This command duplicates a virtual disk, DVD, or floppy medium to a
    1097       new medium, usually an image file, with a new unique identifier
    1098       (UUID). The new image can be transferred to another host system or
    1099       reimported into &product-name; using the Virtual Media Manager.
    1100       See <xref linkend="vdis" /> and <xref linkend="cloningvdis" />.
    1101       The syntax is as follows:
    1102     </para>
    1103 
    1104 <screen>VBoxManage clonemedium      [disk|dvd|floppy] &lt;uuid|inputfile&gt; &lt;uuid|outputfile&gt;
    1105 
    1106                             [--format VDI|VMDK|VHD|RAW|&lt;other&gt;]
    1107                             [--variant Standard,Fixed,Split2G,Stream,ESX]
    1108                             [--existing]</screen>
    1109 
    1110     <para>
    1111       The medium to clone as well as the target image must be described
    1112       either by its UUIDs, if the mediums are registered, or by its
    1113       filename. Registered images can be listed by <command>VBoxManage
    1114       list hdds</command>. See <xref linkend="vboxmanage-list" />. A
    1115       filename must be specified as valid path, either as an absolute
    1116       path or as a relative path starting from the current directory.
    1117     </para>
    1118 
    1119     <para>
    1120       The following options are available:
    1121     </para>
    1122 
    1123     <variablelist>
    1124 
    1125       <varlistentry>
    1126         <term>
    1127           <computeroutput>--format</computeroutput>
    1128         </term>
    1129 
    1130         <listitem>
    1131           <para>
    1132             Set a file format for the output file different from the
    1133             file format of the input file.
    1134           </para>
    1135         </listitem>
    1136       </varlistentry>
    1137 
    1138       <varlistentry>
    1139         <term>
    1140           <computeroutput>--variant</computeroutput>
    1141         </term>
    1142 
    1143         <listitem>
    1144           <para>
    1145             Set a file format variant for the output file. This is a
    1146             comma-separated list of variant flags. Not all combinations
    1147             are supported, and specifying inconsistent flags will result
    1148             in an error message.
    1149           </para>
    1150         </listitem>
    1151       </varlistentry>
    1152 
    1153       <varlistentry>
    1154         <term>
    1155           <computeroutput>--existing</computeroutput>
    1156         </term>
    1157 
    1158         <listitem>
    1159           <para>
    1160             Perform the clone operation to an already existing
    1161             destination medium. Only the portion of the source medium
    1162             which fits into the destination medium is copied. This means
    1163             if the destination medium is smaller than the source only a
    1164             part of it is copied, and if the destination medium is
    1165             larger than the source the remaining part of the destination
    1166             medium is unchanged.
    1167           </para>
    1168         </listitem>
    1169       </varlistentry>
    1170 
    1171     </variablelist>
    1172 
    1173     <note>
    1174       <para>
    1175         For compatibility with earlier versions of &product-name;, the
    1176         <command>clonevdi</command> and <command>clonehd</command>
    1177         commands are still supported and mapped internally to the
    1178         <command>clonemedium</command> command.
    1179       </para>
    1180     </note>
    1181 
    1182   </sect1>
     1091  <xi:include href="user_man_VBoxManage-clonemedium.xml"   xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" />
    11831092
    11841093  <sect1 id="vboxmanage-mediumproperty">
  • TabularUnified trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp

    r94198 r94199  
    206206    { "modifyhd",           USAGE_MODIFYMEDIUM,     VBMG_CMD_TODO, handleModifyMedium,         0 }, /* backward compatibility */
    207207    { "modifyvdi",          USAGE_MODIFYMEDIUM,     VBMG_CMD_TODO, handleModifyMedium,         0 }, /* backward compatibility */
    208     { "clonemedium",        USAGE_CLONEMEDIUM,      VBMG_CMD_TODO, handleCloneMedium,          0 },
    209     { "clonehd",            USAGE_CLONEMEDIUM,      VBMG_CMD_TODO, handleCloneMedium,          0 }, /* backward compatibility */
    210     { "clonevdi",           USAGE_CLONEMEDIUM,      VBMG_CMD_TODO, handleCloneMedium,          0 }, /* backward compatibility */
     208    { "clonemedium",        USAGE_S_NEWCMD,  HELP_CMD_CLONEMEDIUM, handleCloneMedium,          0 },
     209    { "clonehd",            USAGE_S_NEWCMD,  HELP_CMD_CLONEMEDIUM, handleCloneMedium,          0 }, /* backward compatibility */
     210    { "clonevdi",           USAGE_S_NEWCMD,  HELP_CMD_CLONEMEDIUM, handleCloneMedium,          0 }, /* backward compatibility */
    211211    { "encryptmedium",      USAGE_ENCRYPTMEDIUM,    VBMG_CMD_TODO, handleEncryptMedium,        0 },
    212212    { "checkmediumpwd",     USAGE_MEDIUMENCCHKPWD,  VBMG_CMD_TODO, handleCheckMediumPassword,  0 },
  • TabularUnified trunk/src/VBox/Frontends/VBoxManage/VBoxManage.h

    r94198 r94199  
    9999    USAGE_INVALID = 0,
    100100    USAGE_MODIFYMEDIUM,
    101     USAGE_CLONEMEDIUM,
    102101    USAGE_CREATEHOSTIF,
    103102    USAGE_REMOVEHOSTIF,
  • TabularUnified trunk/src/VBox/Frontends/VBoxManage/VBoxManageDisk.cpp

    r94198 r94199  
    10251025            case 'd':   // disk
    10261026                if (cmd != CMD_NONE)
    1027                     return errorSyntax(USAGE_CLONEMEDIUM, Disk::tr("Only one command can be specified: '%s'"), ValueUnion.psz);
     1027                    return errorSyntax(Disk::tr("Only one command can be specified: '%s'"), ValueUnion.psz);
    10281028                cmd = CMD_DISK;
    10291029                break;
     
    10311031            case 'D':   // DVD
    10321032                if (cmd != CMD_NONE)
    1033                     return errorSyntax(USAGE_CLONEMEDIUM, Disk::tr("Only one command can be specified: '%s'"), ValueUnion.psz);
     1033                    return errorSyntax(Disk::tr("Only one command can be specified: '%s'"), ValueUnion.psz);
    10341034                cmd = CMD_DVD;
    10351035                break;
     
    10371037            case 'f':   // floppy
    10381038                if (cmd != CMD_NONE)
    1039                     return errorSyntax(USAGE_CLONEMEDIUM, Disk::tr("Only one command can be specified: '%s'"), ValueUnion.psz);
     1039                    return errorSyntax(Disk::tr("Only one command can be specified: '%s'"), ValueUnion.psz);
    10401040                cmd = CMD_FLOPPY;
    10411041                break;
     
    10691069                    pszDst = ValueUnion.psz;
    10701070                else
    1071                     return errorSyntax(USAGE_CLONEMEDIUM, Disk::tr("Invalid parameter '%s'"), ValueUnion.psz);
     1071                    return errorSyntax(Disk::tr("Invalid parameter '%s'"), ValueUnion.psz);
    10721072                break;
    10731073
     
    10761076                {
    10771077                    if (RT_C_IS_GRAPH(c))
    1078                         return errorSyntax(USAGE_CLONEMEDIUM, Disk::tr("unhandled option: -%c"), c);
     1078                        return errorSyntax(Disk::tr("unhandled option: -%c"), c);
    10791079                    else
    1080                         return errorSyntax(USAGE_CLONEMEDIUM, Disk::tr("unhandled option: %i"), c);
     1080                        return errorSyntax(Disk::tr("unhandled option: %i"), c);
    10811081                }
    10821082                else if (c == VERR_GETOPT_UNKNOWN_OPTION)
    1083                     return errorSyntax(USAGE_CLONEMEDIUM, Disk::tr("unknown option: %s"), ValueUnion.psz);
     1083                    return errorSyntax(Disk::tr("unknown option: %s"), ValueUnion.psz);
    10841084                else if (ValueUnion.pDef)
    1085                     return errorSyntax(USAGE_CLONEMEDIUM, "%s: %Rrs", ValueUnion.pDef->pszLong, c);
     1085                    return errorSyntax("%s: %Rrs", ValueUnion.pDef->pszLong, c);
    10861086                else
    1087                     return errorSyntax(USAGE_CLONEMEDIUM, Disk::tr("error: %Rrs"), c);
     1087                    return errorSyntax(Disk::tr("error: %Rrs"), c);
    10881088        }
    10891089    }
     
    10921092        cmd = CMD_DISK;
    10931093    if (!pszSrc)
    1094         return errorSyntax(USAGE_CLONEMEDIUM, Disk::tr("Mandatory UUID or input file parameter missing"));
     1094        return errorSyntax(Disk::tr("Mandatory UUID or input file parameter missing"));
    10951095    if (!pszDst)
    1096         return errorSyntax(USAGE_CLONEMEDIUM, Disk::tr("Mandatory output file parameter missing"));
     1096        return errorSyntax(Disk::tr("Mandatory output file parameter missing"));
    10971097    if (fExisting && (!format.isEmpty() || enmMediumVariant != MediumVariant_Standard))
    1098         return errorSyntax(USAGE_CLONEMEDIUM, Disk::tr("Specified options which cannot be used with --existing"));
     1098        return errorSyntax(Disk::tr("Specified options which cannot be used with --existing"));
    10991099
    11001100    ComPtr<IMedium> pSrcMedium;
  • TabularUnified trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp

    r94198 r94199  
    639639                     "\n", SEP);
    640640
    641     if (enmCommand == USAGE_CLONEMEDIUM || enmCommand == USAGE_S_ALL)
    642         RTStrmPrintf(pStrm,
    643                            "%s clonemedium %s     [disk|dvd|floppy] <uuid|inputfile> <uuid|outputfile>\n"
    644                      "                            [--format VDI|VMDK|VHD|RAW|<other>]\n"
    645                      "                            [--variant Standard,Fixed,Split2G,Stream,ESX]\n"
    646                      "                            [--existing]\n"
    647                      "\n", SEP);
    648 
    649641    if (enmCommand == USAGE_MEDIUMPROPERTY || enmCommand == USAGE_S_ALL)
    650642        RTStrmPrintf(pStrm,
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette