Changeset 49446 in vbox for trunk/src/VBox
- Timestamp:
- Nov 12, 2013 10:56:39 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp
r49416 r49446 2992 2992 stack.fSessionOpen = true; 2993 2993 2994 /* get VM name from virtual system description. Only one record is possible (size of list is equal 1). */ 2995 std::list<VirtualSystemDescriptionEntry*> vmName = vsdescThis->findByType(VirtualSystemDescriptionType_Name); 2996 std::list<VirtualSystemDescriptionEntry*>::iterator vmNameIt = vmName.begin(); 2997 VirtualSystemDescriptionEntry* vmNameEntry = *vmNameIt; 2998 2994 2999 ovf::DiskImagesMap::const_iterator oit = stack.mapDisks.begin(); 2995 3000 std::set<RTCString> disksResolvedNames; 2996 3001 2997 while(oit != stack.mapDisks.end()) 3002 uint32_t cImportedDisks = 0; 3003 3004 while(oit != stack.mapDisks.end() && cImportedDisks != avsdeHDs.size()) 2998 3005 { 2999 3006 ovf::DiskImage diCurrent = oit->second; … … 3023 3030 } 3024 3031 if (!vsdeTargetHD) 3025 throw setError(E_FAIL, 3026 tr("Internal inconsistency looking up disk image '%s'"), 3027 diCurrent.strHref.c_str()); 3032 { 3033 /* possible case if a disk image belongs to other virtual system (OVF package with multiple VMs inside) */ 3034 LogWarning(("OVA/OVF import: Disk image %s was missed during import of VM %s\n", 3035 oit->first.c_str(), vmNameEntry->strOvf.c_str())); 3036 ++oit; 3037 continue; 3038 } 3028 3039 3029 3040 //diCurrent.strDiskId contains the disk identifier (e.g. "vmdisk1"), which should exist … … 3109 3120 } 3110 3121 if (!vsdeTargetHD) 3122 { 3123 /* 3124 * in this case it's an error because something wrong with OVF description file. 3125 * May be VB imports OVA package with wrong file sequence inside the archive. 3126 */ 3111 3127 throw setError(E_FAIL, 3112 3128 tr("Internal inconsistency looking up disk image '%s'"), 3113 3129 diCurrent.strHref.c_str()); 3130 } 3114 3131 3115 3132 itVDisk = vsysThis.mapVirtualDisks.find(diCurrent.strDiskId); … … 3214 3231 vsdeTargetHD->strVboxCurrent = savedVboxCurrent; 3215 3232 3233 ++cImportedDisks; 3234 3216 3235 } // end while(oit != stack.mapDisks.end()) 3236 3237 /* 3238 * quantity of the imported disks isn't equal to the size of the avsdeHDs list. 3239 */ 3240 if(cImportedDisks < avsdeHDs.size()) 3241 { 3242 LogWarning(("Not all disk images were imported for VM %s. Check OVF description file.", 3243 vmNameEntry->strOvf.c_str())); 3244 } 3217 3245 3218 3246 // only now that we're done with all disks, close the session … … 3495 3523 ++oit; 3496 3524 continue; 3497 3498 3525 } 3499 3526 }
Note:
See TracChangeset
for help on using the changeset viewer.