Changeset 98351 in vbox
- Timestamp:
- Jan 30, 2023 7:26:27 PM (2 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/idl/VirtualBox.xidl
r98103 r98351 6539 6539 </const> 6540 6540 <const name="DetachAllReturnHardDisksAndVMRemovable" value="5"> 6541 <desc>Delete all snapshots, detach all media and return hard disks and removable locating in the folder of the machine to be deleted and referenced only to this machine, for closing.</desc> 6541 <desc>Delete all snapshots, detach all media and return hard disks and removable 6542 media located in the folder of the machine to be deleted and referenced only 6543 by this machine, for closing.</desc> 6542 6544 </const> 6543 6545 </enum> -
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r98341 r98351 1146 1146 * "cannot be closed because it is still attached to 1 virtual machines" 1147 1147 * because at this point we did not call uninitDataAndChildObjects() yet 1148 * and therefore also removeBackReference() for all these medi umswas not called! */1148 * and therefore also removeBackReference() for all these media was not called! */ 1149 1149 1150 1150 if (uuidMachine.isValid() && !uuidMachine.isZero()) // can be empty if we're called from a failure of Machine::init … … 11838 11838 * adds hard disks to the list. If it is CleanupMode_Full, this adds all 11839 11839 * media to the list. 11840 * CleanupMode_DetachAllReturnHardDisksAndVMRemovable adds hard disk and11841 * also removable media sif they are located in the VM folder and referenced11840 * CleanupMode_DetachAllReturnHardDisksAndVMRemovable adds hard disks and 11841 * also removable media if they are located in the VM folder and referenced 11842 11842 * only by this VM (media prepared by unattended installer). 11843 11843 * … … 11907 11907 lock.release(); 11908 11908 /* 11909 * Search for media swhich are not attached to any machine, but11910 * in the chain to an attached disk. Medi umsare only consided11909 * Search for media which are not attached to any machine, but 11910 * in the chain to an attached disk. Media are only consided 11911 11911 * if they are: 11912 11912 * - have only one child … … 16588 16588 Bstr bstrNewPassword(task.mstrNewPassword); 16589 16589 Bstr bstrNewPasswordId(task.mstrNewPasswordId); 16590 /* encrypt medi ums*/16590 /* encrypt media */ 16591 16591 alock.release(); 16592 16592 for (MediaList::iterator it = task.mllMedia.begin(); … … 16695 16695 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 16696 16696 16697 /* define medi umsto be change encryption */16697 /* define media to be change encryption */ 16698 16698 16699 16699 MediaList llMedia; -
trunk/src/VBox/Main/src-server/MachineImplCloneVM.cpp
r98288 r98351 387 387 bool fAttachLinked, ULONG &uCount, ULONG &uTotalWeight) 388 388 { 389 /* This is basically a three step approach. First select all media s389 /* This is basically a three step approach. First select all media 390 390 * directly or indirectly involved in the clone. Second create a histogram 391 * of the usage of all that media s. Third select the mediaswhich are391 * of the usage of all that media. Third select the media which are 392 392 * directly attached or have more than one directly/indirectly used child 393 393 * in the new clone. Step one and two are done in the first loop. … … 419 419 Assert(!fAttachLinked); 420 420 HRESULT hrc = S_OK; 421 std::map<ComPtr<IMedium>, uint32_t> mediaHist; /* Our usage histogram for the media s*/421 std::map<ComPtr<IMedium>, uint32_t> mediaHist; /* Our usage histogram for the media */ 422 422 for (size_t i = 0; i < machineList.size(); ++i) 423 423 { … … 458 458 while (!pSrcMedium.isNull()) 459 459 { 460 /* Build a histogram of used media sand the parent chain. */460 /* Build a histogram of used media and the parent chain. */ 461 461 ++mediaHist[pSrcMedium]; 462 462 … … 1000 1000 } 1001 1001 1002 /* We have different approaches for getting the media swhich needs to1002 /* We have different approaches for getting the media which needs to 1003 1003 * be replicated based on the clone mode the user requested (this is 1004 1004 * mostly about the full clone mode). … … 1182 1182 bool fKeepDiskNames = d->options.contains(CloneOptions_KeepDiskNames); 1183 1183 1184 /* We need to create a map with the already created media s. This is1184 /* We need to create a map with the already created media. This is 1185 1185 * necessary, cause different snapshots could have the same 1186 1186 * parents/parent chain. If a medium is in this map already, it isn't … … 1646 1646 tr("Could not delete file '%s' (%Rrc)"), newFiles.at(i).c_str(), vrc); 1647 1647 } 1648 /* Delete all already created media s. (Reverse, cause there could be1648 /* Delete all already created media. (Reverse, cause there could be 1649 1649 * parent->child relations.) */ 1650 1650 for (size_t i = newMedia.size(); i > 0; --i) -
trunk/src/VBox/Main/src-server/MachineImplMoveVM.cpp
r98289 r98351 959 959 Machine::Data *machineData = machine->mData.data(); 960 960 961 /* Restoring the original medi ums*/961 /* Restoring the original media */ 962 962 try 963 963 { … … 1081 1081 { 1082 1082 hrc = aRc; 1083 Log2(("Rollback scenario: restoration the original medi ums werefailed. Machine can be corrupted.\n"));1083 Log2(("Rollback scenario: restoration the original media failed. Machine can be corrupted.\n")); 1084 1084 } 1085 1085 catch (...) 1086 1086 { 1087 Log2(("Rollback scenario: restoration the original medi ums werefailed. Machine can be corrupted.\n"));1087 Log2(("Rollback scenario: restoration the original media failed. Machine can be corrupted.\n")); 1088 1088 hrc = VirtualBoxBase::handleUnexpectedExceptions(machine, RT_SRC_POS); 1089 1089 } -
trunk/src/VBox/Main/src-server/MediumImpl.cpp
r98292 r98351 1064 1064 ) 1065 1065 { 1066 /* Storage for medi umsof this format can neither be explicitly1066 /* Storage for media of this format can neither be explicitly 1067 1067 * created by VirtualBox nor deleted, so we place the medium to 1068 1068 * Inaccessible state here and also add it to the registry. The … … 5446 5446 * @param aWait @c true if this method should block instead of 5447 5447 * creating an asynchronous thread. 5448 * @param aNotify Notify about medi ums which metadatа arechanged5448 * @param aNotify Notify about media for which metadata is changed 5449 5449 * during execution of the function. 5450 5450 * … … 5730 5730 * @param aWait @c true if this method should block instead of creating 5731 5731 * an asynchronous thread. 5732 * @param aNotify Notify about medi ums which metadatа arechanged5732 * @param aNotify Notify about media for which metadata is changed 5733 5733 * during execution of the function. 5734 5734 * … … 6549 6549 * @param aWait @c true if this method should block instead of creating 6550 6550 * an asynchronous thread. 6551 * @param aNotify Notify about medi ums which metadatа arechanged6551 * @param aNotify Notify about media for which metadata is changed 6552 6552 * during execution of the function. 6553 6553 * … … 6730 6730 * @param aWait @c true if this method should block instead of creating 6731 6731 * an asynchronous thread. 6732 * @param aNotify Notify about medi ums which metadatа arechanged6732 * @param aNotify Notify about media for which metadata is changed 6733 6733 * during execution of the function. 6734 6734 * … … 7083 7083 * @param aParent Parent medium. May be NULL. 7084 7084 * @param aProgress Progress object to use. 7085 * @param aNotify Notify about medi ums which metadatа arechanged7085 * @param aNotify Notify about media for which metadata is changed 7086 7086 * during execution of the function. 7087 7087 * @return … … 7197 7197 * same content as the given image in the source chain. 7198 7198 * Use UINT32_MAX to disable this optimization. 7199 * @param aNotify Notify about medi ums which metadatа arechanged7199 * @param aNotify Notify about media for which metadata is changed 7200 7200 * during execution of the function. 7201 7201 * @return … … 9317 9317 if (i_isMediumFormatFile()) 9318 9318 { 9319 // Have to make own lock list, because "resize" method resizes only last image 9320 // in the lock chain. The lock chain already in the task.mpMediumLockList, so 9321 // just make new lock list based on it. In fact the own lock list neither makes 9322 // double locking of mediums nor unlocks them during delete, because medium 9323 // already locked by task.mpMediumLockList and own list is used just to specify 9324 // what "resize" method should resize. 9325 9319 /// @todo r=klaus Can this use the standard code for creating a medium lock list? 9320 // Have to make own lock list, because "resize" method resizes the last image 9321 // in the lock chain only. The lock chain is already in the task.mpMediumLockList, 9322 // so just make new lock list based on it, with the right last medium. The own 9323 // lock list skips double locking and therefore does not affect the general lock 9324 // state after the "resize" method. 9326 9325 MediumLockList* pMediumLockListForResize = new MediumLockList(); 9327 9326 … … 9337 9336 9338 9337 // just to switch internal state of the lock list to avoid errors during list deletion, 9339 // because all med uimsin the list already locked by task.mpMediumLockList9338 // because all media in the list already locked by task.mpMediumLockList 9340 9339 HRESULT hrc = pMediumLockListForResize->Lock(true /* fSkipOverLockedMedia */); 9341 9340 if (FAILED(hrc)) -
trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp
r98289 r98351 2728 2728 * 2729 2729 * So far we only have encrypted iSCSI initiator secrets so we just go through 2730 * all hard disk medi umsand determine the plain 'InitiatorSecret' from2730 * all hard disk media and determine the plain 'InitiatorSecret' from 2731 2731 * 'InitiatorSecretEncrypted. The latter is stored as Base64 because medium 2732 2732 * properties need to be null-terminated strings.
Note:
See TracChangeset
for help on using the changeset viewer.