VirtualBox

Changeset 17832 in vbox


Ignore:
Timestamp:
Mar 13, 2009 3:01:46 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
44373
Message:

OVF: export SCSI controller only if there is one; make stream optimized vmdk export default

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/ApplianceImpl.cpp

    r17830 r17832  
    29002900            if (FAILED(rc)) throw rc;
    29012901
    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";
    29072904
    29082905            // create a new hard disk interface for the destination disk image
     
    29162913            {
    29172914                // clone the source disk image
    2918                 rc = pSourceDisk->CloneTo(pTargetDisk, HardDiskVariant_Standard, pProgress2.asOutParam());
     2915                rc = pSourceDisk->CloneTo(pTargetDisk, HardDiskVariant_VmdkStreamOptimized, pProgress2.asOutParam());
    29192916                if (FAILED(rc)) throw rc;
    29202917
     
    34293426//     <const name="HardDiskControllerSCSI" value="8" />
    34303427        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))
    34353429        {
    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            }
    34463446        }
    34473447
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette