Quantcast
Channel: VMware Communities : Unanswered Discussions - Virtual Disk Development Kit
Viewing all articles
Browse latest Browse all 872

How to use Clone (VixDiskLib_Clone) with SAN?

$
0
0

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
}
VixDiskLib_ConnectEx(connectParams = &cnxParams, readOnly = false , snapshotRef = "snapshot-73359", transportModes = NULL, &srcConnection)

 

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;

static Bool CloneProgressFunc(void * /*progressData*/, int percentCompleted) {

 

  if (percentCompleted % 10 == 0) {

    CVLOG(2) << "Cloning : " << percentCompleted << "% Done";

  }

  return TRUE;

}


VixDiskLib_Clone(dstConnection = dstConnection, dstPath="/tmp/foo.vmdk", srcConnection = srcConnection, srcPatch=' [storage1_iscsi_basic] sharva-iscsi-target/sharva-iscsi-target_2.vmdk', &vixCreateParams, &CloneProgressFunc, progressCallbackData=NULL, overWrite=true);

Viewing all articles
Browse latest Browse all 872

Trending Articles



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