Changeset 17832 in vbox
- Timestamp:
- Mar 13, 2009 3:01:46 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 44373
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ApplianceImpl.cpp
r17830 r17832 2900 2900 if (FAILED(rc)) throw rc; 2901 2901 2902 /* Based on the file extensions we choose the right format for the 2903 * disk */ 2904 Bstr bstrSrcFormat = L"VDI"; 2905 if (strTargetFilePath.endsWith(".vmdk", Utf8Str::CaseInsensitive)) 2906 bstrSrcFormat = L"VMDK"; 2902 /* We are always exporting to vmdfk stream optimized for now */ 2903 Bstr bstrSrcFormat = L"VMDK"; 2907 2904 2908 2905 // create a new hard disk interface for the destination disk image … … 2916 2913 { 2917 2914 // clone the source disk image 2918 rc = pSourceDisk->CloneTo(pTargetDisk, HardDiskVariant_ Standard, pProgress2.asOutParam());2915 rc = pSourceDisk->CloneTo(pTargetDisk, HardDiskVariant_VmdkStreamOptimized, pProgress2.asOutParam()); 2919 2916 if (FAILED(rc)) throw rc; 2920 2917 … … 3429 3426 // <const name="HardDiskControllerSCSI" value="8" /> 3430 3427 rc = GetStorageControllerByName(Bstr("SCSI"), pController.asOutParam()); 3431 rc = pController->COMGETTER(ControllerType)(&ctlr); 3432 if (FAILED(rc)) throw rc; 3433 strVbox = "LsiLogic"; // the default in VBox 3434 switch(ctlr) 3428 if (SUCCEEDED (rc)) 3435 3429 { 3436 case StorageControllerType_LsiLogic: strVbox = "LsiLogic"; break; 3437 case StorageControllerType_BusLogic: strVbox = "BusLogic"; break; 3438 } 3439 if (SUCCEEDED(rc)) 3440 { 3441 lSCSIControllerIndex = (int32_t)pNewDesc->m->llDescriptions.size(); 3442 pNewDesc->addEntry(VirtualSystemDescriptionType_HardDiskControllerSCSI, 3443 Utf8StrFmt("%d", lSCSIControllerIndex), 3444 strVbox, 3445 ""); 3430 rc = pController->COMGETTER(ControllerType)(&ctlr); 3431 if (FAILED(rc)) throw rc; 3432 strVbox = "LsiLogic"; // the default in VBox 3433 switch(ctlr) 3434 { 3435 case StorageControllerType_LsiLogic: strVbox = "LsiLogic"; break; 3436 case StorageControllerType_BusLogic: strVbox = "BusLogic"; break; 3437 } 3438 if (SUCCEEDED(rc)) 3439 { 3440 lSCSIControllerIndex = (int32_t)pNewDesc->m->llDescriptions.size(); 3441 pNewDesc->addEntry(VirtualSystemDescriptionType_HardDiskControllerSCSI, 3442 Utf8StrFmt("%d", lSCSIControllerIndex), 3443 strVbox, 3444 ""); 3445 } 3446 3446 } 3447 3447
Note:
See TracChangeset
for help on using the changeset viewer.