VirtualBox

Changeset 16587 in vbox


Ignore:
Timestamp:
Feb 9, 2009 1:48:57 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
42551
Message:

OVF: minor updates

File:
1 edited

Legend:

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

    r16568 r16587  
    12821282            uint64_t ullMemSizeVBox = vsysThis.ullMemorySize / _1M;
    12831283            /* Check for the constrains */
    1284             if (ullMemSizeVBox != 0 && 
     1284            if (ullMemSizeVBox != 0 &&
    12851285                (ullMemSizeVBox < static_cast<uint64_t>(SchemaDefs::MinGuestRAM) ||
    12861286                 ullMemSizeVBox > static_cast<uint64_t>(SchemaDefs::MaxGuestRAM)))
     
    13961396                                if (cIDEused == 1)
    13971397                                    pNewDesc->addWarning(tr("The virtual system claims support for more than one IDE controller, but VirtualBox has support for only one."));
    1398                                                      
     1398
    13991399                            }
    14001400                            ++cIDEused;
     
    14201420                                if (cSATAused == 1)
    14211421                                    pNewDesc->addWarning(tr("The virtual system claims support for more than one SATA controller, but VirtualBox has support for only one."));
    1422                                                      
     1422
    14231423                            }
    14241424                            ++cSATAused;
     
    14491449                                if (cSCSIused == 1)
    14501450                                    pNewDesc->addWarning(tr("The virtual system claims support for more than one SCSI controller, but VirtualBox has support for only one."));
    1451                                                      
     1451
    14521452                            }
    14531453                            ++cSCSIused;
     
    15421542
    15431543    ComObjPtr<Progress> progress;
    1544 
    15451544    try
    15461545    {
     
    18801879                   the machine, so make an extra try/catch block. */
    18811880                ComPtr<ISession> session;
     1881                ComPtr<IHardDisk2> srcHdVBox;
    18821882                try
    18831883                {
    1884                     // in order to attach hard disks we need to open a session for the new machine
     1884                    /* In order to attach hard disks we need to open a session
     1885                     * for the new machine */
    18851886                    rc = session.createInprocObject(CLSID_Session);
    18861887                    CheckComRCThrowRC(rc);
     
    19121913                                              pcszDstFilePath));
    19131914
    1914                         // find the disk from the OVF's disk list
     1915                        /* Find the disk from the OVF's disk list */
    19151916                        DiskImagesMap::const_iterator itDiskImage = app->m->mapDisks.find(vsdeHD->strRef);
    1916                         // vsdeHD->strRef contains the disk identifier (e.g. "vmdisk1", which should exist
    1917                         // in the virtual system's disks map under that ID and also in the global images map
     1917                        /* vsdeHD->strRef contains the disk identifier (e.g. "vmdisk1"), which should exist
     1918                           in the virtual system's disks map under that ID and also in the global images map. */
    19181919                        VirtualDisksMap::const_iterator itVirtualDisk = vsysThis.mapVirtualDisks.find(vsdeHD->strRef);
    19191920
     
    19331934                        {
    19341935                            /* @todo: we have to create a new one */
     1936                            throw setError(E_FAIL,
     1937                                           tr("Creation of new disk images not supported yet."));
    19351938                        }
    19361939                        else
     
    19431946                             * attached already from a previous import) */
    19441947                            /* First open the existing disk image */
    1945                             ComPtr<IHardDisk2> srcHdVBox;
    19461948                            rc = app->mVirtualBox->OpenHardDisk2(Bstr(strSrcFilePath), srcHdVBox.asOutParam());
    19471949                            CheckComRCThrowRC(rc);
     
    19661968                            ComPtr<IMachine> sMachine;
    19671969                            rc = session->COMGETTER(Machine)(sMachine.asOutParam());
     1970                            CheckComRCThrowRC(rc);
    19681971                            Guid hdId;
    19691972                            rc = dstHdVBox->COMGETTER(Id)(hdId.asOutParam());;
     
    19761979                                case HardDiskController::IDE: sbt = StorageBus_IDE; break;
    19771980                                case HardDiskController::SATA: sbt = StorageBus_SATA; break;
    1978                                            //case HardDiskController::SCSI: sbt = StorageBus_SCSI; break; // @todo: not available yet
     1981                                //case HardDiskController::SCSI: sbt = StorageBus_SCSI; break; // @todo: not available yet
    19791982                                default: break;
    19801983                            }
     
    19901993                catch(HRESULT aRC)
    19911994                {
    1992                     /* Unregister/Delete the failed machine */
    1993                     /* @todo: Not sure what to do when there are succesfully
     1995                    /* @todo: Not sure what to do when there are successfully
    19941996                       added disk images. Delete them also? For now we leave
    19951997                       them. */
     1998                    if (!srcHdVBox.isNull())
     1999                    {
     2000                        /* Close any open src disks */
     2001                        rc = srcHdVBox->Close();
     2002                        CheckComRCThrowRC(rc);
     2003                    }
    19962004                    if (!session.isNull())
    19972005                    {
     
    20012009                        CheckComRCThrowRC(rc);
    20022010                    }
     2011                    /* Unregister/Delete the failed machine */
    20032012                    ComPtr<IMachine> failedMachine;
    20042013                    rc = app->mVirtualBox->UnregisterMachine(newMachineId, failedMachine.asOutParam());
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