- Timestamp:
- Aug 14, 2018 4:40:00 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 124339
- Location:
- trunk/src/VBox
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r72883 r73664 730 730 " [--mode machine|machineandchildren|all]\n" 731 731 " [--options link|keepallmacs|keepnatmacs|\n" 732 " keepdisknames ]\n"732 " keepdisknames|keephwuuids]\n" 733 733 " [--name <name>]\n" 734 734 " [--groups <group>, ...]\n" -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageMisc.cpp
r71998 r73664 453 453 || !RTStrNICmp(psz, "Linked", len)) 454 454 options->push_back(CloneOptions_Link); 455 else if ( !RTStrNICmp(psz, "KeepHwUUIDs", len) 456 || !RTStrNICmp(psz, "KeepHwUUID", len)) 457 options->push_back(CloneOptions_KeepHwUUIDs); 455 458 else 456 459 rc = VERR_PARSE_ERROR; -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r73571 r73664 4834 4834 <desc>Don't change the disk names.</desc> 4835 4835 </const> 4836 <const name="KeepHwUUIDs" value="5"> 4837 <desc>Don't change UUID of the machine hardware.</desc> 4838 </const> 4836 4839 4837 4840 </enum> -
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.