Index: /trunk/doc/manual/en_US/user_VBoxManage.xml
===================================================================
--- /trunk/doc/manual/en_US/user_VBoxManage.xml	(revision 37899)
+++ /trunk/doc/manual/en_US/user_VBoxManage.xml	(revision 37900)
@@ -1118,11 +1118,15 @@
        </listitem>
        <listitem>
-           <para><computeroutput>--options keepallmacs|keepnatmacs</computeroutput>: 
-           With this option you define how the MAC addresses of every virtual
+           <para><computeroutput>--options keepallmacs|keepnatmacs|keepdisknames</computeroutput>: 
+           Allows additional fine tuning of the clone operation. The first two
+           options allow to define how the MAC addresses of every virtual
            network card should be handled. They can either be reinitialized
            (the default), leaved unchanged
            (<computeroutput>keepallmacs</computeroutput>) or leaved unchanged
-           when the network type is NAT (<computeroutput>keepnatmacs</computeroutput>).
-           </para>
+           when the network type is NAT
+           (<computeroutput>keepnatmacs</computeroutput>). If you add
+           <computeroutput>keepdisknames</computeroutput> all new disk images
+           are called like the original once, otherwise they are
+           renamed.</para>
        </listitem>
        <listitem>
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp	(revision 37899)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp	(revision 37900)
@@ -336,5 +336,5 @@
                      "                            [--snapshot <uuid>|<name>]\n"
                      "                            [--mode machine|machineandchilds|all]\n"
-                     "                            [--options keepallmacs|keepnatmacs]\n"
+                     "                            [--options keepallmacs|keepnatmacs|keepdisknames]\n"
                      "                            [--name <name>]\n"
                      "                            [--basefolder <basefolder>]\n"
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageMisc.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageMisc.cpp	(revision 37899)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageMisc.cpp	(revision 37900)
@@ -309,6 +309,8 @@
             else if (!RTStrNICmp(psz, "KeepNATMACs", len))
                 options->push_back(CloneOptions_KeepNATMACs);
+            else if (!RTStrNICmp(psz, "KeepDiskNames", len))
+                options->push_back(CloneOptions_KeepDiskNames);
 //            else if (!RTStrNICmp(psz, "Link", len))
-//                *options.push_back(CloneOptions_Link)
+//                options->push_back(CloneOptions_Link)
             else
                 rc = VERR_PARSE_ERROR;
Index: /trunk/src/VBox/Main/idl/VirtualBox.xidl
===================================================================
--- /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 37899)
+++ /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 37900)
@@ -3600,5 +3600,5 @@
   <enum
     name="CloneOptions" extends="$unknown"
-    uuid="1be61ee1-c0ea-4942-b733-7496f27d4f28"
+    uuid="22243f8e-96ab-497c-8cf0-f40a566c630b"
     >
 
@@ -3615,4 +3615,7 @@
     <const name="KeepNATMACs"        value="3">
       <desc>Don't generate new MAC addresses of the attached network adapters when they are using NAT.</desc>
+    </const>
+    <const name="KeepDiskNames"      value="4">
+      <desc>Don't change the disk names.</desc>
     </const>
 
Index: /trunk/src/VBox/Main/include/MediumImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/MediumImpl.h	(revision 37899)
+++ /trunk/src/VBox/Main/include/MediumImpl.h	(revision 37900)
@@ -205,4 +205,5 @@
 
     bool isReadOnly();
+    void updateId(const Guid &id);
 
     HRESULT saveSettings(settings::Medium &data,
Index: /trunk/src/VBox/Main/src-server/MachineImplCloneVM.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/MachineImplCloneVM.cpp	(revision 37899)
+++ /trunk/src/VBox/Main/src-server/MachineImplCloneVM.cpp	(revision 37900)
@@ -464,8 +464,4 @@
     /*
      * Todo:
-     * - Snapshot diffs (can) have the uuid as name. After cloning this isn't
-     *   right anymore. Is it worth to change to the new uuid? Or should the
-     *   cloned disks called exactly as the original one or should all new disks
-     *   get a new name with the new VM name in it.
      * - What about log files?
      */
@@ -541,4 +537,7 @@
         strTrgSnapshotFolder = Utf8StrFmt("%s%c%s", strTrgMachineFolder.c_str(), RTPATH_DELIMITER, trgMCF.machineUserData.strSnapshotFolder.c_str());
 
+        /* Should we rename the disk names. */
+        bool fKeepDiskNames = d->options.contains(CloneOptions_KeepDiskNames);
+
         /* We need to create a map with the already created medias. This is
          * necessary, cause different snapshots could have the same
@@ -548,4 +547,5 @@
         typedef std::pair<Utf8Str, ComObjPtr<Medium> > TStrMediumPair;
         TStrMediumMap map;
+        size_t cDisks = 0;
         for (size_t i = 0; i < d->llMedias.size(); ++i)
         {
@@ -596,16 +596,39 @@
                     }
 
+                    /* If the old disk name was in {uuid} format we also want
+                     * the new name in this format, but with the updated id of
+                     * course. For all other disks we rename them with this
+                     * template: "new name-disk1.vdi". */
+                    Guid newId;
+                    newId.create();
+                    Utf8Str strNewName(bstrSrcName);
+                    if (!fKeepDiskNames)
+                    {
+                        strNewName = Utf8StrFmt("%s-disk%d%s", trgMCF.machineUserData.strName.c_str(), ++cDisks, RTPathExt(Utf8Str(bstrSrcName).c_str()));
+                        Utf8Str strSrcTest = Utf8Str(bstrSrcName).stripExt();
+                        if (strSrcTest.startsWith("{") &&
+                            strSrcTest.endsWith("}"))
+                        {
+                            strSrcTest = strSrcTest.substr(1, strSrcTest.length() - 2);
+                            if (isValidGuid(strSrcTest))
+                            {
+                                strNewName = Utf8StrFmt("%s%s", newId.toStringCurly().c_str(), RTPathExt(strNewName.c_str()));
+                                --cDisks;
+                            }
+                        }
+                    }
+
                     /* Check if this medium comes from the snapshot folder, if
                      * so, put it there in the cloned machine as well.
                      * Otherwise it goes to the machine folder. */
-                    Utf8Str strFile = Utf8StrFmt("%s%c%lS", strTrgMachineFolder.c_str(), RTPATH_DELIMITER, bstrSrcName.raw());
                     Bstr bstrSrcPath;
+                    Utf8Str strFile = Utf8StrFmt("%s%c%s", strTrgMachineFolder.c_str(), RTPATH_DELIMITER, strNewName.c_str());
                     rc = pMedium->COMGETTER(Location)(bstrSrcPath.asOutParam());
                     if (FAILED(rc)) throw rc;
                     if (   !bstrSrcPath.isEmpty()
                         &&  RTPathStartsWith(Utf8Str(bstrSrcPath).c_str(), Utf8Str(bstrSrcSnapshotFolder).c_str()))
-                        strFile = Utf8StrFmt("%s%c%lS", strTrgSnapshotFolder.c_str(), RTPATH_DELIMITER, bstrSrcName.raw());
+                        strFile = Utf8StrFmt("%s%c%s", strTrgSnapshotFolder.c_str(), RTPATH_DELIMITER, strNewName.c_str());
                     else
-                        strFile = Utf8StrFmt("%s%c%lS", strTrgMachineFolder.c_str(), RTPATH_DELIMITER, bstrSrcName.raw());
+                        strFile = Utf8StrFmt("%s%c%s", strTrgMachineFolder.c_str(), RTPATH_DELIMITER, strNewName.c_str());
 
                     /* Start creating the clone. */
@@ -620,4 +643,7 @@
                                        NULL          /* llRegistriesThatNeedSaving */);
                     if (FAILED(rc)) throw rc;
+
+                    /* Update the new uuid. */
+                    pTarget->updateId(newId);
 
                     srcLock.release();
Index: /trunk/src/VBox/Main/src-server/MediumImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/MediumImpl.cpp	(revision 37899)
+++ /trunk/src/VBox/Main/src-server/MediumImpl.cpp	(revision 37900)
@@ -3640,4 +3640,13 @@
 
     AssertFailedReturn(false);
+}
+
+/**
+ * Internal method to return the medium's size. Must have caller + locking!
+ * @return
+ */
+void Medium::updateId(const Guid &id)
+{
+    unconst(m->id) = id;
 }
 
