VirtualBox

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


Ignore:
Timestamp:
Apr 20, 2010 4:22:41 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
60336
Message:

Main/OVF: fix import of IDE controllers (export currently broken)

Location:
trunk/src/VBox/Main
Files:
5 edited

Legend:

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

    r28195 r28531  
    165165                           strMemory);
    166166
    167         int32_t lIDEControllerIndex = 0;
     167        // the one VirtualBox IDE controller has two channels with two ports each, which is
     168        // considered two IDE controllers with two ports each by OVF, so export it as two
     169        int32_t lIDEControllerPrimaryIndex = 0;
     170        int32_t lIDEControllerSecondaryIndex = 0;
    168171        int32_t lSATAControllerIndex = 0;
    169172        int32_t lSCSIControllerIndex = 0;
     
    217220            if (strVbox.length())
    218221            {
    219                 lIDEControllerIndex = (int32_t)pNewDesc->m->llDescriptions.size();
     222                lIDEControllerPrimaryIndex = (int32_t)pNewDesc->m->llDescriptions.size();
    220223                pNewDesc->addEntry(VirtualSystemDescriptionType_HardDiskControllerIDE,
    221                                    Utf8StrFmt("%d", lIDEControllerIndex),
     224                                   Utf8StrFmt("%d", lIDEControllerPrimaryIndex),
     225                                   strVbox,
     226                                   strVbox);
     227                lIDEControllerSecondaryIndex = lIDEControllerPrimaryIndex + 1;
     228                pNewDesc->addEntry(VirtualSystemDescriptionType_HardDiskControllerIDE,
     229                                   Utf8StrFmt("%d", lIDEControllerSecondaryIndex),
    222230                                   strVbox,
    223231                                   strVbox);
     
    354362                    // this is the exact reverse to what we're doing in Appliance::taskThreadImportMachines,
    355363                    // and it must be updated when that is changed!
     364                    // Before 3.2 we exported one IDE controller with channel 0-3, but we now maintain
     365                    // compatibility with what VMware does and export two IDE controllers with two channels each
    356366
    357367                    if (lChannel == 0 && lDevice == 0)      // primary master
     368                    {
     369                        lControllerVsys = lIDEControllerPrimaryIndex;
    358370                        lChannelVsys = 0;
     371                    }
    359372                    else if (lChannel == 0 && lDevice == 1) // primary slave
     373                    {
     374                        lControllerVsys = lIDEControllerPrimaryIndex;
    360375                        lChannelVsys = 1;
     376                    }
    361377                    else if (lChannel == 1 && lDevice == 0) // secondary master; by default this is the CD-ROM but as of VirtualBox 3.1 that can change
    362                         lChannelVsys = 2;
     378                    {
     379                        lControllerVsys = lIDEControllerSecondaryIndex;
     380                        lChannelVsys = 0;
     381                    }
    363382                    else if (lChannel == 1 && lDevice == 1) // secondary slave
    364                         lChannelVsys = 3;
     383                    {
     384                        lControllerVsys = lIDEControllerSecondaryIndex;
     385                        lChannelVsys = 1;
     386                    }
    365387                    else
    366388                        throw setError(VBOX_E_NOT_SUPPORTED,
    367389                                    tr("Cannot handle medium attachment: channel is %d, device is %d"), lChannel, lDevice);
    368 
    369                     lControllerVsys = lIDEControllerIndex;
    370390                break;
    371391
     
    825845    // assigning them first
    826846
    827     uint32_t idIDEController = 0;
    828     int32_t lIDEControllerIndex = 0;
     847    uint32_t idIDEPrimaryController = 0;
     848    int32_t lIDEPrimaryControllerIndex = 0;
     849    uint32_t idIDESecondaryController = 0;
     850    int32_t lIDESecondaryControllerIndex = 0;
    829851    uint32_t idSATAController = 0;
    830852    int32_t lSATAControllerIndex = 0;
     
    919941                    {
    920942                        strDescription = "IDE Controller";
    921                         strCaption = "ideController0";
    922943                        type = ovf::ResourceType_IDEController; // 5
    923944                        strResourceSubType = desc.strVbox;
    924                         // it seems that OVFTool always writes these two, and since we can only
    925                         // have one IDE controller, we'll use this as well
    926                         lAddress = 1;
    927                         lBusNumber = 1;
    928 
    929                         // remember this ID
    930                         idIDEController = ulInstanceID;
    931                         lIDEControllerIndex = lIndexThis;
     945
     946                        if (desc.strRef != "1")
     947                        {
     948                            // first IDE controller:
     949                            strCaption = "ideController0";
     950                            lAddress = 0;
     951                            lBusNumber = 0;
     952                            // remember this ID
     953                            idIDEPrimaryController = ulInstanceID;
     954                            lIDEPrimaryControllerIndex = lIndexThis;
     955                        }
     956                        else
     957                        {
     958                            // second IDE controller:
     959                            strCaption = "ideController1";
     960                            lAddress = 1;
     961                            lBusNumber = 1;
     962                            // remember this ID
     963                            idIDESecondaryController = ulInstanceID;
     964                            lIDESecondaryControllerIndex = lIndexThis;
     965                        }
    932966                    }
    933967                break;
     
    10331067                            int32_t lControllerIndex = -1;
    10341068                            RTStrToInt32Ex(desc.strExtraConfig.c_str() + pos1 + 11, NULL, 0, &lControllerIndex);
    1035                             if (lControllerIndex == lIDEControllerIndex)
    1036                                 ulParent = idIDEController;
     1069                            if (lControllerIndex == lIDEPrimaryControllerIndex)
     1070                                ulParent = idIDEPrimaryController;
     1071                            else if (lControllerIndex == lIDESecondaryControllerIndex)
     1072                                ulParent = idIDESecondaryController;
    10371073                            else if (lControllerIndex == lSCSIControllerIndex)
    10381074                                ulParent = idSCSIController;
     
    10441080
    10451081                        if (    !ulParent
    1046                                 || lAddressOnParent == -1
    1047                             )
     1082                             || lAddressOnParent == -1
     1083                           )
    10481084                            throw setError(VBOX_E_NOT_SUPPORTED,
    10491085                                            tr("Missing or bad extra config string in hard disk image: \"%s\""), desc.strExtraConfig.c_str());
     
    10681104                    {
    10691105                        // we can't have a CD without an IDE controller
    1070                         if (!idIDEController)
     1106                        if (!idIDESecondaryController)
    10711107                            throw setError(VBOX_E_NOT_SUPPORTED,
    1072                                             tr("Can't have CD-ROM without IDE controller"));
     1108                                            tr("Can't have CD-ROM without secondary IDE controller"));
    10731109
    10741110                        strDescription = "CD-ROM Drive";
     
    10761112                        type = ovf::ResourceType_CDDrive; // 15
    10771113                        lAutomaticAllocation = 1;
    1078                         ulParent = idIDEController;
     1114                        ulParent = idIDESecondaryController;
    10791115                        lAddressOnParent = 0;           // this is what OVFTool writes
    10801116                    }
  • trunk/src/VBox/Main/ApplianceImplImport.cpp

    r28189 r28531  
    838838 * Throws HRESULT values on errors!
    839839 *
    840  * @param hdc
    841  * @param vd
    842  * @param mhda
     840 * @param hdc in: the HardDiskController structure to attach to.
     841 * @param ulAddressOnParent in: the AddressOnParent parameter from OVF.
     842 * @param controllerType out: the name of the hard disk controller to attach to (e.g. "IDE Controller").
     843 * @param lChannel out: the channel (controller port) of the controller to attach to.
     844 * @param lDevice out: the device number to attach to.
    843845 */
    844846void Appliance::convertDiskAttachmentValues(const ovf::HardDiskController &hdc,
     
    859861            switch (ulAddressOnParent)
    860862            {
    861                 case 0:     // interpret this as primary master
    862                     lChannel = (long)0;
    863                     lDevice = (long)0;
     863                case 0: // master
     864                    if (hdc.ulAddress == 1)
     865                    {
     866                        // IDE controller has address 1: then it was exported from VMware and is the secondary controller
     867                        lChannel = (long)1;
     868                        lDevice = (long)0;
     869                    }
     870                    else // interpret this as primary master
     871                    {
     872                        lChannel = (long)0;
     873                        lDevice = (long)0;
     874                    }
    864875                break;
    865876
    866                 case 1:     // interpret this as primary slave
    867                     lChannel = (long)0;
    868                     lDevice = (long)1;
     877                case 1: // slave
     878                    if (hdc.ulAddress == 1)
     879                    {
     880                        // IDE controller has address 1: then it was exported from VMware and is the secondary controller
     881                        lChannel = (long)1;
     882                        lDevice = (long)1;
     883                    }
     884                    else // interpret this as primary slave
     885                    {
     886                        lChannel = (long)0;
     887                        lDevice = (long)1;
     888                    }
    869889                break;
    870890
     891                // used by older VBox exports
    871892                case 2:     // interpret this as secondary master
    872893                    lChannel = (long)1;
     
    874895                break;
    875896
     897                // used by older VBox exports
    876898                case 3:     // interpret this as secondary slave
    877899                    lChannel = (long)1;
     
    16031625    }
    16041626
    1605     /* Hard disk controller IDE */
     1627    // IDE Hard disk controller
    16061628    std::list<VirtualSystemDescriptionEntry*> vsdeHDCIDE = vsdescThis->findByType(VirtualSystemDescriptionType_HardDiskControllerIDE);
    1607     if (vsdeHDCIDE.size() > 1)
     1629    // In OVF (at least VMware's version of it), an IDE controller has two ports, so VirtualBox's single IDE controller
     1630    // with two channels and two ports each counts as two OVF IDE controllers -- so we accept one or two such IDE controllers
     1631    uint32_t cIDEControllers = vsdeHDCIDE.size();
     1632    if (cIDEControllers > 2)
    16081633        throw setError(VBOX_E_FILE_ERROR,
    1609                        tr("Too many IDE controllers in OVF; import facility only supports one"));
    1610     if (vsdeHDCIDE.size() == 1)
    1611     {
     1634                       tr("Too many IDE controllers in OVF; import facility only supports two"));
     1635    if (vsdeHDCIDE.size() > 0)
     1636    {
     1637        // one or two IDE controllers present in OVF: add one VirtualBox controller
    16121638        ComPtr<IStorageController> pController;
    16131639        rc = pNewMachine->AddStorageController(Bstr("IDE Controller"), StorageBus_IDE, pController.asOutParam());
     
    17011727        try
    17021728        {
    1703             /* In order to attach things we need to open a session
    1704              * for the new machine */
     1729            // to attach things we need to open a session for the new machine
    17051730            rc = mVirtualBox->OpenSession(stack.pSession, bstrNewMachineId);
    17061731            if (FAILED(rc)) throw rc;
     
    17491774                // for now always attach to secondary master on IDE controller;
    17501775                // there seems to be no useful information in OVF where else to
    1751                 // attach jt (@todo test with latest versions of OVF software)
     1776                // attach it (@todo test with latest versions of OVF software)
    17521777
    17531778                // find the IDE controller
     
    18081833    }
    18091834
    1810     /* Create the hard disks & connect them to the appropriate controllers. */
     1835    // create the hard disks & connect them to the appropriate controllers
    18111836    std::list<VirtualSystemDescriptionEntry*> avsdeHDs = vsdescThis->findByType(VirtualSystemDescriptionType_HardDiskImage);
    18121837    if (avsdeHDs.size() > 0)
     
    18161841        try
    18171842        {
    1818             /* In order to attach hard disks we need to open a session
    1819              * for the new machine */
     1843            // to attach things we need to open a session for the new machine
    18201844            rc = mVirtualBox->OpenSession(stack.pSession, bstrNewMachineId);
    18211845            if (FAILED(rc)) throw rc;
     
    18391863                   )
    18401864                    throw setError(E_FAIL,
    1841                                    tr("Internal inconsistency looking up disk images."));
    1842 
    1843                 const ovf::DiskImage &di = itDiskImage->second;
    1844                 const ovf::VirtualDisk &vd = itVirtualDisk->second;
     1865                                   tr("Internal inconsistency looking up disk image '%s'"),
     1866                                   vsdeHD->strRef.c_str());
     1867
     1868                const ovf::DiskImage &ovfDiskImage = itDiskImage->second;
     1869                const ovf::VirtualDisk &ovfVdisk = itVirtualDisk->second;
    18451870
    18461871                ComPtr<IMedium> pTargetHD;
    1847                 importOneDiskImage(di,
     1872                importOneDiskImage(ovfDiskImage,
    18481873                                   vsdeHD->strVbox,
    18491874                                   pTargetHD,
    18501875                                   stack);
    18511876
    1852                 /* Now use the new uuid to attach the disk image to our new machine */
     1877                // now use the new uuid to attach the disk image to our new machine
    18531878                ComPtr<IMachine> sMachine;
    18541879                rc = stack.pSession->COMGETTER(Machine)(sMachine.asOutParam());
     
    18581883                if (FAILED(rc)) throw rc;
    18591884
    1860                 /* For now we assume we have one controller of every type only */
    1861                 ovf::HardDiskController hdc = (*vsysThis.mapControllers.find(vd.idController)).second;
     1885                // find the hard disk controller to which we should attach
     1886                ovf::HardDiskController hdc = (*vsysThis.mapControllers.find(ovfVdisk.idController)).second;
    18621887
    18631888                // this is for rollback later
     
    18671892
    18681893                convertDiskAttachmentValues(hdc,
    1869                                             vd.ulAddressOnParent,
     1894                                            ovfVdisk.ulAddressOnParent,
    18701895                                            mhda.controllerType,        // Bstr
    18711896                                            mhda.lChannel,
     
    18741899                Log(("Attaching disk %s to channel %d on device %d\n", vsdeHD->strVbox.c_str(), mhda.lChannel, mhda.lDevice));
    18751900
    1876                 rc = sMachine->AttachDevice(mhda.controllerType,
    1877                                             mhda.lChannel,
    1878                                             mhda.lDevice,
    1879                                             DeviceType_HardDisk,
    1880                                             hdId);
     1901                rc = sMachine->AttachDevice(mhda.controllerType,    // wstring name
     1902                                            mhda.lChannel,          // long controllerPort
     1903                                            mhda.lDevice,           // long device
     1904                                            DeviceType_HardDisk,    // DeviceType_T type
     1905                                            hdId);                  // uuid id
    18811906                if (FAILED(rc)) throw rc;
    18821907
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r28485 r28531  
    34943494
    34953495      The list below identifies the value sets that are possible depending on the
    3496       <link to="VirtualSystemDescriptionType" /> enum value in the array item in aTypes[]. In each case,
    3497       the array item with the same index in aOvfValues[] will contain the original value as contained
    3498       in the OVF file (just for informational purposes), and the corresponding item in aVBoxValues[]
     3496      <link to="VirtualSystemDescriptionType" /> enum value in the array item in @a aTypes[]. In each case,
     3497      the array item with the same index in @a aOvfValues[] will contain the original value as contained
     3498      in the OVF file (just for informational purposes), and the corresponding item in @a aVBoxValues[]
    34993499      will contain a suggested value to be used for VirtualBox. Depending on the description type,
    3500       the aExtraConfigValues[] array item may also be used.
     3500      the @a aExtraConfigValues[] array item may also be used.
    35013501
    35023502      <ul>
    35033503      <li>
    35043504        "OS": the guest operating system type. There must be exactly one such array item on import. The
    3505         corresponding item in aVBoxValues[] contains the suggested guest operating system for VirtualBox.
     3505        corresponding item in @a  aVBoxValues[] contains the suggested guest operating system for VirtualBox.
    35063506        This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
    3507         item in aOvfValues[] will contain a numerical value that described the operating system in the OVF.
     3507        item in @a aOvfValues[] will contain a numerical value that described the operating system in the OVF.
    35083508      </li>
    35093509      <li>
    35103510        "Name": the name to give to the new virtual machine. There can be at most one such array item;
    35113511        if none is present on import, then an automatic name will be created from the operating system
    3512         type. The correponding item im aOvfValues[] will contain the suggested virtual machine name
    3513         from the OVF file, and aVBoxValues[] will contain a suggestion for a unique VirtualBox
     3512        type. The correponding item im @a aOvfValues[] will contain the suggested virtual machine name
     3513        from the OVF file, and @a aVBoxValues[] will contain a suggestion for a unique VirtualBox
    35143514        <link to="IMachine" /> name that does not exist yet.
    35153515      </li>
     
    35333533      </li>
    35343534      <li>
    3535         "HarddiskControllerIDE": an IDE hard disk controller. There can be at most one such item. This
    3536         has no value in aOvfValues[] or aVBoxValues[].
    3537         The matching item in the aRefs[] array will contain an integer that items of the "Harddisk"
     3535        "HardDiskControllerIDE": an IDE hard disk controller. There can be at most two such items.
     3536        This has no value in @a aOvfValues[] or @a aVBoxValues[].
     3537        The matching item in the @a aRefs[] array will contain an integer that items of the "Harddisk"
    35383538        type can use to specify which hard disk controller a virtual disk should be connected to.
     3539        Note that in OVF, an IDE controller has two channels, corresponding to "master" and "slave"
     3540        in traditional terminology, whereas the IDE storage controller that VirtualBox supports in
     3541        its virtual machines supports four channels (primary master, primary slave, secondary master,
     3542        secondary slave) and thus maps to two IDE controllers in the OVF sense.
    35393543      </li>
    35403544      <li>
    3541         "HarddiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This
    3542         has no value in aOvfValues[] or aVBoxValues[].
    3543         The matching item in the aRefs[] array will be used as with IDE controllers (see above).
     3545        "HardDiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This
     3546        has no value in @a aOvfValues[] or @a aVBoxValues[].
     3547        The matching item in the @a aRefs[] array will be used as with IDE controllers (see above).
    35443548      </li>
    35453549      <li>
    3546         "HarddiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
    3547         The items in aOvfValues[] and aVBoxValues[] will either be "LsiLogic" or "BusLogic".
    3548         The matching item in the aRefs[] array will be used as with IDE controllers (see above).
     3550        "HardDiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
     3551        The items in @a aOvfValues[] and @a aVBoxValues[] will either be "LsiLogic" or "BusLogic".
     3552        The matching item in the @a aRefs[] array will be used as with IDE controllers (see above).
    35493553      </li>
    35503554      <li>
     
    35523556        arbitrary number of these items, one for each virtual disk image that accompanies the OVF.
    35533557
    3554         The array item in aOvfValues[] will contain the file specification from the OVF file (without
     3558        The array item in @a aOvfValues[] will contain the file specification from the OVF file (without
    35553559        a path since the image file should be in the same location as the OVF file itself), whereas the
    3556         item in aVBoxValues[] will contain a qualified path specification to where VirtualBox uses the
     3560        item in @a aVBoxValues[] will contain a qualified path specification to where VirtualBox uses the
    35573561        hard disk image. This means that on import the image will be copied and converted from the
    35583562        "ovf" location to the "vbox" location; on export, this will be handled the other way round.
    35593563        On import, the target image will also be registered with VirtualBox.
    35603564
    3561         The matching item in the aExtraConfigValues[] array must contain a string of the following
     3565        The matching item in the @a aExtraConfigValues[] array must contain a string of the following
    35623566        format: "controller=&lt;index&gt;;channel=&lt;c&gt;"
    35633567        In this string, &lt;index&gt; must be an integer specifying the hard disk controller to connect
    35643568        the image to. That number must be the index of an array item with one of the hard disk controller
    3565         types (HarddiskControllerSCSI, HarddiskControllerSATA, HarddiskControllerIDE).
     3569        types (HardDiskControllerSCSI, HardDiskControllerSATA, HardDiskControllerIDE).
    35663570        In addition, &lt;c&gt; must specify the channel to use on that controller. For IDE controllers,
    3567         this can range from 0-3 (which VirtualBox will interpret as primary master, primary slave, secondary master and
    3568         secondary slave. For SATA and SCSI controllers, the channel can range from 0-29.
     3571        this can be 0 or 1 for master or slave, respectively. For compatibility with VirtualBox versions
     3572        before 3.2, the values 2 and 3 (for secondary master and secondary slave) are also supported, but
     3573        no longer exported. For SATA and SCSI controllers, the channel can range from 0-29.
    35693574      </li>
    35703575      <li>
    3571          "CDROM": a virtual CD-ROM drive. The matching item in aExtraConfigValue[] contains the same
     3576         "CDROM": a virtual CD-ROM drive. The matching item in @a aExtraConfigValue[] contains the same
    35723577         attachment information as with "HardDiskImage" items.
    35733578      </li>
    35743579      <li>
    3575         "CDROM": a virtual floppy drive. The matching item in aExtraConfigValue[] contains the same
     3580        "CDROM": a virtual floppy drive. The matching item in @a aExtraConfigValue[] contains the same
    35763581        attachment information as with "HardDiskImage" items.
    35773582      </li>
    35783583      <li>
    3579         "NetworkAdapter": a network adapter. The array item in aVBoxValues[] will specify the hardware
    3580         for the network adapter, whereas the array item in aExtraConfigValues[] will have a string
     3584        "NetworkAdapter": a network adapter. The array item in @a aVBoxValues[] will specify the hardware
     3585        for the network adapter, whereas the array item in @a aExtraConfigValues[] will have a string
    35813586        of the "type=&lt;X&gt;" format, where &lt;X&gt; must be either "NAT" or "Bridged".
    35823587      </li>
  • trunk/src/VBox/Main/include/ovfreader.h

    r28165 r28531  
    256256struct HardDiskController
    257257{
    258     uint32_t            idController;           // instance ID (Item/InstanceId); this gets referenced from HardDisk
     258    uint32_t                idController;       // instance ID (Item/InstanceId); this gets referenced from VirtualDisk
     259
    259260    enum ControllerSystemType { IDE, SATA, SCSI };
    260     ControllerSystemType system;                 // one of IDE, SATA, SCSI
    261     iprt::MiniString    strControllerType;      // controller subtype (Item/ResourceSubType); e.g. "LsiLogic"; can be empty (esp. for IDE)
    262     iprt::MiniString    strAddress;             // for IDE
    263     uint32_t            ulBusNumber;            // for IDE
     261    ControllerSystemType    system;             // one of IDE, SATA, SCSI
     262
     263    iprt::MiniString        strControllerType;  // controller subtype (Item/ResourceSubType); e.g. "LsiLogic"; can be empty (esp. for IDE)
     264
     265    uint32_t                ulAddress;          // controller index; this is determined heuristically by the OVF reader and will
     266                                                // be 0 for the first controller of this type (e.g. IDE primary ctler), 1 for the
     267                                                // next (e.g. IDE secondary ctler)
    264268
    265269    HardDiskController()
    266270        : idController(0),
    267           ulBusNumber(0)
    268     {
    269     }
     271          ulAddress(0)
     272    { }
    270273};
    271274
     
    275278{
    276279    uint32_t            idController;           // SCSI (or IDE) controller this disk is connected to;
     280                                                // this must match HardDiskController.idController and
    277281                                                // points into VirtualSystem.mapControllers
    278282    uint32_t            ulAddressOnParent;      // parsed strAddressOnParent of hardware item; will be 0 or 1 for IDE
  • trunk/src/VBox/Main/xml/ovfreader.cpp

    r28165 r28531  
    424424                    else if (!strcmp(pcszItemChildName, "PoolID"))
    425425                        i.strPoolID = pelmItemChild->getValue();
    426                     else if (!strcmp(pcszItemChildName, "BusNumber"))
     426                    else if (!strcmp(pcszItemChildName, "BusNumber"))       // seen in some old OVF, but it's not listed in the OVF specs
    427427                        pelmItemChild->copyValue(i.ulBusNumber);
    428428                    else
     
    494494                        hdc.idController = i.ulInstanceID;
    495495                        hdc.strControllerType = i.strResourceSubType;
    496                         hdc.strAddress = i.strAddress;
    497                         hdc.ulBusNumber = i.ulBusNumber;
     496
     497                        // if there is a numeric address tag for the IDE controller, use that;
     498                        // VMware uses "0" and "1" to keep the two OVF IDE controllers apart;
     499                        // otherwise use the "bus number" field which was specified in some old
     500                        // OVF files (but not the standard)
     501                        if (i.strAddress == "0")
     502                            hdc.ulAddress = 0;
     503                        else if (i.strAddress == "1")
     504                            hdc.ulAddress = 1;
     505                        else if (i.strAddress == "2")     // just to be sure, this doesn't seem to be used by VMware
     506                            hdc.ulAddress = 2;
     507                        else if (i.strAddress == "3")
     508                            hdc.ulAddress = 3;
     509                        else
     510                            hdc.ulAddress = i.ulBusNumber;
    498511
    499512                        vsys.mapControllers[i.ulInstanceID] = hdc;
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