VirtualBox

Changeset 17718 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Mar 11, 2009 6:57:27 PM (16 years ago)
Author:
vboxsync
Message:

OVF: fix missing VM name on export

File:
1 edited

Legend:

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

    r17699 r17718  
    24452445
    24462446            std::list<VirtualSystemDescriptionEntry*> llName = vsdescThis->findByType(VirtualSystemDescriptionType_Name);
     2447            if (llName.size() != 1)
     2448                throw setError(VBOX_E_NOT_SUPPORTED,
     2449                               tr("Missing VM name"));
     2450            pelmVirtualSystem->setAttribute("ovf:id", llName.front()->strVbox);
    24472451
    24482452            std::list<VirtualSystemDescriptionEntry*> llOS = vsdescThis->findByType(VirtualSystemDescriptionType_OS);
     
    28682872            rc = pVirtualBox->CreateHardDisk(bstrSrcFormat, Bstr(strTargetFilePath), pTargetDisk.asOutParam());
    28692873            if (FAILED(rc)) throw rc;
    2870             /* Clone the source disk image */
     2874            // clone the source disk image
    28712875            rc = pSourceDisk->CloneTo(pTargetDisk, pProgress2.asOutParam());
    28722876            if (FAILED(rc)) throw rc;
    28732877
    2874             /* Advance to the next operation */
     2878            // advance to the next operation
    28752879            if (!task->progress.isNull())
    28762880                task->progress->advanceOperation(BstrFmt(tr("Exporting virtual disk image '%s'"), strSrcFilePath.c_str()));
     
    28882892                if (fCompleted)
    28892893                    break;
    2890                 /* Make sure the loop is not too tight */
     2894                // make sure the loop is not too tight
    28912895                rc = pProgress2->WaitForCompletion(100);
    28922896                if (FAILED(rc)) throw rc;
     
    29092913
    29102914            /* Make sure the target disk get detached */
    2911             rc = pTargetDisk->Close();
     2915            rc = pTargetDisk->Close();          // @todo  close this also if an error is thrown above
    29122916            if (FAILED(rc)) throw rc;
    29132917
     
    32903294        bstrName = mUserData->mName;
    32913295        // get description
    3292         bstrName = mUserData->mDescription;
     3296        bstrDescription = mUserData->mDescription;
    32933297        // get guest OS
    32943298        bstrGuestOSType = mUserData->mOSTypeId;
     
    33453349                           "",
    33463350                           strVMName,
    3347                            Utf8Str(bstrName));
     3351                           strVMName);
    33483352
    33493353        /* CPU count*/
Note: See TracChangeset for help on using the changeset viewer.

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