I am a newbie to VMWare plug-in development. I have written code to issue a SCSI READ 10 command to a target. After allocating memory for all the variables, I am calling vmk_CreateSCSICommand() to give me a scratch SCSI command. I then change the CDB based on the LBA I want to read and the bytes I want to read. I am using vmk_ScsiIssueAsynchPathCommand() to issue the command to the target. On the target side, I can see the read come in, and the data go out and successful status is returned to the initiator. I see the ->done callback that I set when I sent the command out being called by the VMKernel. However, how do I get the actual data that is returned by the target? I have the vmk_ScsiCommand structure available to me, but I do not see any way to get the data.
Any help on this by the guru's will be appreciated.
Thanks
Shaan
I found out the answer and I am posting it for the benefit of the next poor sap who might have this issue .
You need to use vmk_ScsiIssueSynchPathCOmmandWIthData () to actually perform data in/out using vmk api's.
Hi Shaan,
Can you please point to the programming guide from VMware ? I want to initiate a scsi inquiry command on the host against a LUN. Please help.
Thejas,
VMware provides those as a part of the development kit - for a not-so-small fee. I am not aware of any other way you can get it. Also, are you planning on implementing a plugin that would issue an inquiry command? If you present a LU to the ESX box, the ESX box will automatically issue an inquiry command. So I am not sure what you are trying to achieve.
Shaan