We are trying to use the VDDK API with the SAN protocol (iSCSI). We set up an iSCSI target on an Ubuntu box, and performed read operations on a disks which is stored on a datastore backed by this target. We verified that the handle we got for this disk was using the SAN mode using the "VixDiskLib_GetTransportMode" method. We also checked the raw network traffic using tcpdump and found that a traffic worth of disk size was flowing between the iSCSI target and the caller.
The problem we are encountering is that we cannot make the "VixDiskLib_Clone" call to use the SAN transport. We are using the same setup and connection arguments as for the read case. We verified that no communication is happening between the iSCSI host and the caller (apart from some regular communication that keeps happening since we have mounted the target) using tcpdump.
The iSCI target is unauthenticated, and we used iSCSI LIO. For mounting the iSCSI target we used the following commands:
sudo iscsiadm -m discovery -t st -p 192.168.2.111:3260
sudo iscsiadm -m node --login
Attached is the archived log from the run for clone setup, which includes the vixdisk logs. Following are some details on the API calls we are making:
cnxParams has {
serverName = 192.168.2.106 , port = 443, credtype=1, creds.uid.username=root, creds.uid.username.pass=****, vmxSpec="moref=vm-73133", thumbPrint= NULL
}
cnxParams1 has localhost values.
VixDiskLib_ConnectEx(connectParams = &cnxParams1, readOnly = false , snapshotRef = "", transportModes = NULL, &dstConnection)
VixDiskLibCreateParams createParams;
createParams.diskType = VIXDISKLIB_DISK_MONOLITHIC_FLAT;
createParams.adapterType = VIXDISKLIB_ADAPTER_SCSI_LSILOGIC;
createParams.hwVersion = VIXDISKLIB_HWVERSION_ESX55;
createParams.capacity = 0;
if (percentCompleted % 10 == 0) {
CVLOG(2) << "Cloning : " << percentCompleted << "% Done";
}
return TRUE;
}