Changeset 73664 in vbox
- Timestamp:
- Aug 14, 2018 4:40:00 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 124339
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/manual/en_US/user_VBoxManage.xml
r73538 r73664 2665 2665 <para> 2666 2666 <computeroutput>--options 2667 link|keepallmacs|keepnatmacs|keepdisknames </computeroutput>:2667 link|keepallmacs|keepnatmacs|keepdisknames|keephwuuids</computeroutput>: 2668 2668 Allows additional fine tuning of the clone operation. The 2669 2669 first option defines that a linked clone should be created, … … 2677 2677 <computeroutput>keepdisknames</computeroutput> all new disk 2678 2678 images are called like the original ones, otherwise they are 2679 renamed. 2679 renamed. If you add <computeroutput>keephwuuids</computeroutput> 2680 source hardware IDs will be preserved. 2680 2681 </para> 2681 2682 </listitem> … … 2761 2762 <para> 2762 2763 Use of the <computeroutput>--options 2763 link|keepallmacs|keepnatmacs|keepdisknames</computeroutput>:2764 keepallmacs|keepnatmacs|keepdisknames</computeroutput>: 2764 2765 option enables additional fine tuning of the clone operation. The 2765 first option defines that a linked clone should be created, which 2766 is only possible for a machine clone from a snapshot. The next two 2767 options enable specification of how the MAC addresses of every 2768 virtual network card should be handled. They can either be 2766 first two options enable specification of how the MAC addresses of 2767 every virtual network card should be handled. They can either be 2769 2768 reinitialized (the default), left unchanged 2770 2769 (<computeroutput>keepallmacs</computeroutput>) or left unchanged -
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.