Changeset 73664 in vbox for trunk/src/VBox/Main/src-server
- Timestamp:
- Aug 14, 2018 4:40:00 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 124339
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/MachineImplCloneVM.cpp
r73003 r73664 124 124 ComObjPtr<Medium> *ppDiff) const; 125 125 static DECLCALLBACK(int) copyStateFileProgress(unsigned uPercentage, void *pvUser); 126 static void updateSnapshotHardwareUUIDs(settings::SnapshotsList &snapshot_list, const Guid &id); 126 127 127 128 /* Private q and parent pointer */ … … 765 766 } 766 767 768 void MachineCloneVMPrivate::updateSnapshotHardwareUUIDs(settings::SnapshotsList &snapshot_list, const Guid &id) 769 { 770 for (settings::SnapshotsList::iterator snapshot_it = snapshot_list.begin(); 771 snapshot_it != snapshot_list.end(); 772 ++snapshot_it) 773 { 774 if (!snapshot_it->hardware.uuid.isValid() || snapshot_it->hardware.uuid.isZero()) 775 snapshot_it->hardware.uuid = id; 776 updateSnapshotHardwareUUIDs(snapshot_it->llChildSnapshots, id); 777 } 778 } 779 767 780 // The public class 768 781 ///////////////////////////////////////////////////////////////////////////// … … 1008 1021 * configuration dataset. */ 1009 1022 settings::MachineConfigFile trgMCF = *d->pSrcMachine->mData->pMachineConfigFile; 1023 1024 /* keep source machine hardware UUID if enabled*/ 1025 if (d->options.contains(CloneOptions_KeepHwUUIDs)) 1026 { 1027 /* because HW UUIDs must be preserved including snapshots by the option, 1028 * just fill zero UUIDs with corresponding machine UUID before any snapshot 1029 * processing will take place, while all uuids are from source machine */ 1030 if (!trgMCF.hardwareMachine.uuid.isValid() || trgMCF.hardwareMachine.uuid.isZero()) 1031 trgMCF.hardwareMachine.uuid = trgMCF.uuid; 1032 1033 MachineCloneVMPrivate::updateSnapshotHardwareUUIDs(trgMCF.llFirstSnapshot, trgMCF.uuid); 1034 } 1035 1010 1036 1011 1037 /* Reset media registry. */
Note:
See TracChangeset
for help on using the changeset viewer.