Index: /trunk/doc/manual/en_US/user_VBoxManage.xml
===================================================================
--- /trunk/doc/manual/en_US/user_VBoxManage.xml	(revision 73663)
+++ /trunk/doc/manual/en_US/user_VBoxManage.xml	(revision 73664)
@@ -2665,5 +2665,5 @@
         <para>
           <computeroutput>--options
-          link|keepallmacs|keepnatmacs|keepdisknames</computeroutput>:
+          link|keepallmacs|keepnatmacs|keepdisknames|keephwuuids</computeroutput>:
           Allows additional fine tuning of the clone operation. The
           first option defines that a linked clone should be created,
@@ -2677,5 +2677,6 @@
           <computeroutput>keepdisknames</computeroutput> all new disk
           images are called like the original ones, otherwise they are
-          renamed.
+          renamed. If you add <computeroutput>keephwuuids</computeroutput>
+          source hardware IDs will be preserved.
         </para>
       </listitem>
@@ -2761,10 +2762,8 @@
     <para>
       Use of the <computeroutput>--options
-      link|keepallmacs|keepnatmacs|keepdisknames</computeroutput>:
+      keepallmacs|keepnatmacs|keepdisknames</computeroutput>:
       option enables additional fine tuning of the clone operation. The
-      first option defines that a linked clone should be created, which
-      is only possible for a machine clone from a snapshot. The next two
-      options enable specification of how the MAC addresses of every
-      virtual network card should be handled. They can either be
+      first two options enable specification of how the MAC addresses of
+      every virtual network card should be handled. They can either be
       reinitialized (the default), left unchanged
       (<computeroutput>keepallmacs</computeroutput>) or left unchanged
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp	(revision 73663)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp	(revision 73664)
@@ -730,5 +730,5 @@
                      "                            [--mode machine|machineandchildren|all]\n"
                      "                            [--options link|keepallmacs|keepnatmacs|\n"
-                     "                                       keepdisknames]\n"
+                     "                                       keepdisknames|keephwuuids]\n"
                      "                            [--name <name>]\n"
                      "                            [--groups <group>, ...]\n"
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageMisc.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageMisc.cpp	(revision 73663)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageMisc.cpp	(revision 73664)
@@ -453,4 +453,7 @@
                      || !RTStrNICmp(psz, "Linked", len))
                 options->push_back(CloneOptions_Link);
+            else if (   !RTStrNICmp(psz, "KeepHwUUIDs", len)
+                     || !RTStrNICmp(psz, "KeepHwUUID", len))
+                options->push_back(CloneOptions_KeepHwUUIDs);
             else
                 rc = VERR_PARSE_ERROR;
Index: /trunk/src/VBox/Main/idl/VirtualBox.xidl
===================================================================
--- /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 73663)
+++ /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 73664)
@@ -4834,4 +4834,7 @@
       <desc>Don't change the disk names.</desc>
     </const>
+    <const name="KeepHwUUIDs"       value="5">
+      <desc>Don't change UUID of the machine hardware.</desc>
+    </const>
 
   </enum>
Index: /trunk/src/VBox/Main/src-server/MachineImplCloneVM.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/MachineImplCloneVM.cpp	(revision 73663)
+++ /trunk/src/VBox/Main/src-server/MachineImplCloneVM.cpp	(revision 73664)
@@ -124,4 +124,5 @@
                                      ComObjPtr<Medium> *ppDiff) const;
     static DECLCALLBACK(int) copyStateFileProgress(unsigned uPercentage, void *pvUser);
+    static void updateSnapshotHardwareUUIDs(settings::SnapshotsList &snapshot_list, const Guid &id);
 
     /* Private q and parent pointer */
@@ -765,4 +766,16 @@
 }
 
+void MachineCloneVMPrivate::updateSnapshotHardwareUUIDs(settings::SnapshotsList &snapshot_list, const Guid &id)
+{
+    for (settings::SnapshotsList::iterator snapshot_it = snapshot_list.begin();
+         snapshot_it != snapshot_list.end();
+         ++snapshot_it)
+    {
+        if (!snapshot_it->hardware.uuid.isValid() || snapshot_it->hardware.uuid.isZero())
+            snapshot_it->hardware.uuid = id;
+        updateSnapshotHardwareUUIDs(snapshot_it->llChildSnapshots, id);
+    }
+}
+
 // The public class
 /////////////////////////////////////////////////////////////////////////////
@@ -1008,4 +1021,17 @@
          * configuration dataset. */
         settings::MachineConfigFile trgMCF = *d->pSrcMachine->mData->pMachineConfigFile;
+
+        /* keep source machine hardware UUID if enabled*/
+        if (d->options.contains(CloneOptions_KeepHwUUIDs))
+        {
+            /* because HW UUIDs must be preserved including snapshots by the option,
+             * just fill zero UUIDs with corresponding machine UUID before any snapshot
+             * processing will take place, while all uuids are from source machine */
+            if (!trgMCF.hardwareMachine.uuid.isValid() || trgMCF.hardwareMachine.uuid.isZero())
+                trgMCF.hardwareMachine.uuid = trgMCF.uuid;
+
+            MachineCloneVMPrivate::updateSnapshotHardwareUUIDs(trgMCF.llFirstSnapshot, trgMCF.uuid);
+        }
+
 
         /* Reset media registry. */
