Changeset 29981 in vbox
- Timestamp:
- Jun 2, 2010 12:11:39 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 62275
- Location:
- trunk/src/VBox/Main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ApplianceImplExport.cpp
r29925 r29981 265 265 Utf8Str strVbox = "LsiLogicSas"; 266 266 lSCSIControllerIndex = (int32_t)pNewDesc->m->llDescriptions.size(); 267 pNewDesc->addEntry(VirtualSystemDescriptionType_HardDiskControllerS CSI,267 pNewDesc->addEntry(VirtualSystemDescriptionType_HardDiskControllerSAS, 268 268 Utf8StrFmt("%d", lSCSIControllerIndex), 269 269 strVbox, … … 1019 1019 1020 1020 case VirtualSystemDescriptionType_HardDiskControllerSCSI: 1021 case VirtualSystemDescriptionType_HardDiskControllerSAS: 1021 1022 /* <Item> 1022 1023 <rasd:Caption>scsiController0</rasd:Caption> … … 1049 1050 else 1050 1051 throw setError(VBOX_E_NOT_SUPPORTED, 1051 tr("Invalid config string \"%s\" in SCSI controller"), desc.strVboxCurrent.c_str());1052 tr("Invalid config string \"%s\" in SCSI/SAS controller"), desc.strVboxCurrent.c_str()); 1052 1053 1053 1054 // remember this ID -
trunk/src/VBox/Main/ApplianceImplImport.cpp
r29925 r29981 444 444 if (cSCSIused < 1) 445 445 { 446 VirtualSystemDescriptionType_T vsdet = VirtualSystemDescriptionType_HardDiskControllerSCSI; 446 447 Utf8Str hdcController = "LsiLogic"; 447 448 if (!hdc.strControllerType.compare("lsilogicsas", Utf8Str::CaseInsensitive)) 449 { 450 // OVF considers SAS a variant of SCSI but VirtualBox considers it a class of its own 451 vsdet = VirtualSystemDescriptionType_HardDiskControllerSAS; 448 452 hdcController = "LsiLogicSas"; 453 } 449 454 else if (!hdc.strControllerType.compare("BusLogic", Utf8Str::CaseInsensitive)) 450 455 hdcController = "BusLogic"; 451 pNewDesc->addEntry( VirtualSystemDescriptionType_HardDiskControllerSCSI,452 453 454 456 pNewDesc->addEntry(vsdet, 457 strControllerID, 458 hdc.strControllerType, 459 hdcController); 455 460 } 456 461 else … … 1714 1719 } 1715 1720 1721 /* Hard disk controller SAS */ 1722 std::list<VirtualSystemDescriptionEntry*> vsdeHDCSAS = vsdescThis->findByType(VirtualSystemDescriptionType_HardDiskControllerSAS); 1723 if (vsdeHDCSAS.size() > 1) 1724 throw setError(VBOX_E_FILE_ERROR, 1725 tr("Too many SAS controllers in OVF; import facility only supports one")); 1726 if (vsdeHDCSAS.size() > 0) 1727 { 1728 ComPtr<IStorageController> pController; 1729 rc = pNewMachine->AddStorageController(Bstr(L"SAS Controller"), StorageBus_SAS, pController.asOutParam()); 1730 if (FAILED(rc)) throw rc; 1731 rc = pController->COMSETTER(ControllerType)(StorageControllerType_LsiLogicSas); 1732 if (FAILED(rc)) throw rc; 1733 } 1734 1716 1735 /* Now its time to register the machine before we add any hard disks */ 1717 1736 rc = mVirtualBox->RegisterMachine(pNewMachine); … … 2022 2041 */ 2023 2042 2043 // for each storage controller... 2024 2044 for (settings::StorageControllersList::iterator sit = config.storageMachine.llStorageControllers.begin(); 2025 2045 sit != config.storageMachine.llStorageControllers.end(); … … 2028 2048 settings::StorageController &sc = *sit; 2029 2049 2050 // find the OVF virtual system description entry for this storage controller 2051 switch (sc.storageBus) 2052 { 2053 case StorageBus_SATA: 2054 break; 2055 2056 case StorageBus_SCSI: 2057 break; 2058 2059 case StorageBus_IDE: 2060 break; 2061 2062 case StorageBus_SAS: 2063 break; 2064 } 2065 2066 // for each medium attachment to this controller... 2030 2067 for (settings::AttachedDevicesList::iterator dit = sc.llAttachedDevices.begin(); 2031 2068 dit != sc.llAttachedDevices.end();
Note:
See TracChangeset
for help on using the changeset viewer.