Changeset 28189 in vbox for trunk/src/VBox/Main
- Timestamp:
- Apr 12, 2010 9:39:49 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ApplianceImplImport.cpp
r28165 r28189 1934 1934 Assert(vsdescThis->m->pConfig); 1935 1935 1936 // make a deep copy of the machine settings here because we will tinker 1937 // with it by replacing disk UUIDs 1938 settings::MachineConfigFile config = *vsdescThis->m->pConfig; 1936 settings::MachineConfigFile &config = *vsdescThis->m->pConfig; 1939 1937 1940 1938 Utf8Str strDefaultHardDiskFolder; … … 1942 1940 if (FAILED(rc)) throw rc; 1943 1941 1944 // step 1): scan the machine config for UUIDs1942 // step 1): scan the machine config for attachments 1945 1943 for (settings::StorageControllersList::iterator sit = config.storageMachine.llStorageControllers.begin(); 1946 1944 sit != config.storageMachine.llStorageControllers.end(); … … 1977 1975 searchUniqueDiskImageFilePath(strTargetPath); 1978 1976 1979 // step 2): import disks and map the old and new UUIDs1977 // step 2): for each attachment, import the disk... 1980 1978 ComPtr<IMedium> pTargetHD; 1981 1979 importOneDiskImage(di, … … 1984 1982 stack); 1985 1983 1984 // ... and replace the old UUID in the machine config with the one of 1985 // the imported disk that was just created 1986 1986 Bstr hdId; 1987 1987 rc = pTargetHD->COMGETTER(Id)(hdId.asOutParam()); 1988 1988 if (FAILED(rc)) throw rc; 1989 1989 1990 // replace the old UUID in the machine config with the new one1991 1990 d.uuid = hdId; 1991 1992 1992 fFound = true; 1993 1993 break;
Note:
See TracChangeset
for help on using the changeset viewer.