hi,all:
I use VDDK to backup a vm on a iscsi lun,all things are ok with nbd transport mode,but when i use san transport mode,it reports the error "You do not have access rights to this file" .I have searched several days from internet to resolve this problem,but didn't get it.
1. I used VixDiskLib_InitEx and specified the libDir and configFilePath.
2. when i use VixDiskLib_ListTransportModes,it lists "file:san:hotadd:nbdssl,nbd"
3.I used VixDiskLib_ConnectEx and specified the snapshot's MoRef
i cannot make sure that i have access right to the iscsi lun,because my program is on windows,and cannot identify the vmfs fs;but use the same method i create a scsi target and make it to ntfs,it can be accessed from my windows,so i guess i should have access right to the lun
here is my code:
vixError = VixDiskLib_InitEx(VIXDISKLIB_VERSION_MAJOR,
VIXDISKLIB_VERSION_MINOR,
NULL, NULL, NULL, // Log, warn, panic
"C:\\Program Files (x86)\\VMware\\VMware Virtual Disk Development Kit",
"C:\\Program Files (x86)\\VMware\\VMware Virtual Disk Development Kit\\vix-disklib.conf");
CHECK_AND_THROW(vixError);
cnxParams.vmxSpec = _strdup ("moref=123");
cnxParams.serverName = _strdup ("192.168.240.205");
cnxParams.credType = VIXDISKLIB_CRED_UID;
cnxParams.creds.uid.userName = _strdup ("root");
cnxParams.creds.uid.password = _strdup ("passwd");
cnxParams.port = 902;
vixError = VixDiskLib_ConnectEx(&cnxParams, true, "123-snapshot-19",
"san",
&_connection);
CHECK_AND_THROW(vixError);
vixError = VixDiskLib_Open(connection, [iscsi]iscsivm/iscsivm.vmdk, VIXDISKLIB_FLAG_OPEN_READ_ONLY, &_handle);
can anybody helps me?i will be very appreciate
excuse me for my english is not good.