Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 251313

Re: CreateVM_Task fails if harddisks are connected to Scsi Ctrls

$
0
0

Hi Siva,

 

The whole file attached.

 

Great, thanks. OK now to illustrate what I mean here a shortened snippet from the file:

 

<vw1:device xsi:type="vw1:VirtualPCIController">
    <vw1:key>100</vw1:key>
</vw1:device>
 
<vw1:device xsi:type="vw1:VirtualBusLogicController">
    <vw1:key>1000</vw1:key>
    ...
    <vw1:controllerKey>100</vw1:controllerKey>
    ...
</vw1:device>
   
<vw1:device xsi:type="vw1:VirtualDisk">
    <vw1:key>2000</vw1:key>
    ...
    <vw1:controllerKey>1000</vw1:controllerKey>
    ...
</vw1:device>

 

The VirtualBusLogicController is associated with the VirtualPCIController via its controllerKey property=100, thus pointing to the PCIController

The VirtualDisk is associated with the BusLogicController via its controllerKey property=1000, thus pointing to the BusLogicController

 

Now if I read your original code right:

 

    vmConfigSpec.deviceChange[currIndex]->device = vd[devIndex];

 

    int cKey = -(*scsiCtrl->controllerKey);

 

    vmConfigSpec.deviceChange[currIndex]->device->controllerKey = &(cKey);
    vmConfigSpec.deviceChange[currIndex]->device->key = -(scsiCtrl->key);

 

then the value of cKey should be -100 and the fact that you set -100 as the value of the controllerKey property of your disk makes the disk point to the PCIController not the BusLogicController which would be achieved with cKey == -1000.

 

In other words to resemble the original setup the controllerKey and the key property of the virtual disk should be set as follows:

 

    vmConfigSpec.deviceChange[currIndex]->device->controllerKey = -1000;
    vmConfigSpec.deviceChange[currIndex]->device->key = -2000;

 

See what I mean. This is why I am buffled that the machine creates with the hard coded 100, but maybe this is because of the messed up SOAP input ...


Viewing all articles
Browse latest Browse all 251313

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>