Quantcast
Channel: VMware Communities : Discussion List - Virtual Disk Development Kit
Viewing all articles
Browse latest Browse all 2039

VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file

$
0
0

 

Hello

 

 

 

Currenly I'm struggling with the snapshot reference.

 

 

 

This is fragment of the code I'm using:

 

 

 

cnxParams.vmxSpec = "moref=vm-3724";

               cnxParams.serverName = "hh-vms";

               cnxParams.credType = VIXDISKLIB_CRED_UID;

               cnxParams.creds.uid.userName = "userName";

               cnxParams.creds.uid.password = "password";

               cnxParams.port = 0;

 

               VixError vixError = VixDiskLib_InitEx(1, 1, NULL, NULL, NULL, "bin", "config.vddk");

               out << VixDiskLib_ListTransportModes() << endl;

               vixError = VixDiskLib_ConnectEx(&cnxParams, FALSE, "snapshot-3841", NULL, &appGlobals.connection);

               VixError vixError = VixDiskLib_Open(connection, "HFR_XP_Mini_2/HFR_XP_Mini_2_2-000001.vmdk", 0, &_handle)

 

When executing this, the following available transport modes where shown: file:san:hotadd:nbdssl:nbd

 

 

The log shows, that the vmdk would be tried to connect via san, ndbssl and nbd but all connections fails with  "You do not have access rights to this file".

 

 

 

 

VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Using system libcrypto, version 9070AF

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Vmacore::InitSSL: doVersionCheck = true, handshakeTimeoutUs = 20000000

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Connecting to host hh-vms on port 443 using protocol https

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Initializing SSL context

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Connected using API Namespace vim.version.version5.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Authenticating user administrator

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Logged in!

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Performing SearchIndex find.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file MoRef vm-3724 is a valid virtual machine.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Found vm moref=vm-3724

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Examining special transport modes.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Checking transport mode san.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file BIOS UUID obtained: 44454c4c-3000-1050-8057-c4c04f56304a

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Performing SearchIndex find.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Could not find virtual machine.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Transport mode san passed pre-flight checks. Adding to list of available transports.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Checking transport mode hotadd.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file BIOS UUID obtained: 44454c4c-3000-1050-8057-c4c04f56304a

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Performing SearchIndex find.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Could not find virtual machine.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Transport mode hotadd failed pre-flight check. Ignoring.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Checking transport mode nbdssl.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Transport mode nbdssl passed pre-flight checks. Adding to list of available transports.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Checking transport mode nbd.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Transport mode nbd passed pre-flight checks. Adding to list of available transports.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Creating mount directory C:\DOKUME1\holger\LOKALE1\Temp\vmware-holger\4220a60a-93a8-bdf2-f197-f922e2e1dbb3-vm-3724\san.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Starting to write unmount info.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Mount operation obtained backup info.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Successfully mounted snapshot ssid:snapshot-3841 on mount point C:\DOKUME1\holger\LOKALE1\Temp\vmware-holger\4220a60a-93a8-bdf2-f197-f922e2e1dbb3-vm-3724\san

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Got credentials to access disk VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file HFR_XP_Mini_2/HFR_XP_Mini_2_2-000001.vmdk using mode san.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Obtained list of SCSI disk devices.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Establishing new connection for hh-vms:administrator

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Connecting to host hh-vms on port 443 using protocol https

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Connected using API Namespace vim.version.version5.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Authenticating user administrator

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Logged in!

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Starting to fetch block map.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Performing SearchIndex find.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file VM Hosted by VMware ESX, version 4.0.0

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Trying to open new LUN LVID:4b025e16-05da754e-d68b-00212800629e/499e95bd-33bc1e15-c5d3-00144feb150a/1.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Attempting to open LVID:4b025e16-05da754e-d68b-00212800629e/499e95bd-33bc1e15-c5d3-00144feb150a/1.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file No path to device LVID:4b025e16-05da754e-d68b-00212800629e/499e95bd-33bc1e15-c5d3-00144feb150a/1 found.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Failed to open new LUN LVID:4b025e16-05da754e-d68b-00212800629e/499e95bd-33bc1e15-c5d3-00144feb150a/1.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Cannot access LUN LVID:4b025e16-05da754e-d68b-00212800629e/499e95bd-33bc1e15-c5d3-00144feb150a/1, cannot open disk snapshot-3841[VMStorage1] HFR_XP_Mini_2/HFR_XP_Mini_2_2-000001.vmdk. Giving up.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Closing connection hh-vms:administrator

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Creating mount directory C:\DOKUME1\holger\LOKALE1\Temp\vmware-holger\4220a60a-93a8-bdf2-f197-f922e2e1dbb3-vm-3724\nbdssl.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Starting to write unmount info.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Mount operation obtained backup info.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Successfully mounted snapshot ssid:snapshot-3841 on mount point C:\DOKUME1\holger\LOKALE1\Temp\vmware-holger\4220a60a-93a8-bdf2-f197-f922e2e1dbb3-vm-3724\nbdssl

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Sending soap request to VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file: randomAccessOpenReadonly

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Received soap response from VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file: randomAccessOpenReadonly

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Got credentials to access disk VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file HFR_XP_Mini_2/HFR_XP_Mini_2_2-000001.vmdk using mode nbdssl.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file NfcFssrvr_DiskOpen: received NFC error 11 from server: NfcFssrvrOpen: permission check failed for file VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file HFR_XP_Mini_2/HFR_XP_Mini_2_2-000001.vmdk, access = 3

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Creating mount directory C:\DOKUME1\holger\LOKALE1\Temp\vmware-holger\4220a60a-93a8-bdf2-f197-f922e2e1dbb3-vm-3724\nbd.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Starting to write unmount info.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Mount operation obtained backup info.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Successfully mounted snapshot ssid:snapshot-3841 on mount point C:\DOKUME1\holger\LOKALE1\Temp\vmware-holger\4220a60a-93a8-bdf2-f197-f922e2e1dbb3-vm-3724\nbd

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Sending soap request to VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file: randomAccessOpenReadonly

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Received soap response from VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file: randomAccessOpenReadonly

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Got credentials to access disk VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file HFR_XP_Mini_2/HFR_XP_Mini_2_2-000001.vmdk using mode nbd.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file NfcFssrvr_DiskOpen: received NFC error 11 from server: NfcFssrvrOpen: permission check failed for file VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file HFR_XP_Mini_2/HFR_XP_Mini_2_2-000001.vmdk, access = 3

               Error: VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file  d You do not have access rights to this file

 

I know that in my case only nbdssl or nbd are available, but on other machines SAN may be possible also so I prefer to use the automatic transport mode selection.

 

 

I was able to write to the virtual disk  when I don't suppliy the snapshot reference as shown as follows:

 

 

vixError = VixDiskLib_ConnectEx(&cnxParams, FALSE, NULL,

NULL, &appGlobals.connection);

 

VixDiskLib: config options: libdir 'd:\workspace\VMware\vmware\Debug\libdir', tmpDir 'C:\DOKUME1\holger\LOKALE1\Temp\vmware-holger'.

               VixDiskLib: Advanced transport plugin was successfully loaded into vixDiskLib. Accelerated transport modes available.

               VixDiskLib: Enabling advanced transport modes.

               VMware VixDiskLib (1.1) Release build-207031

               Using system libcrypto, version 9070AF

               NBD_Clientopen: attempting to create connection to vpxa-nfc://[VMStorage1] HFR_XP_Mini_2/HFR_XP_Mini_2_2.vmdk@esx001.hh.novastor.local:902!52 a0 1f 83 c8 f6 cd 44-bd dc e7 4c 4b f6 a7 58

               Started up WSA

               SSLVerifyCertAgainstSystemStore: The remote host certificate has these problems:

 

                

  • A certificate in the host's chain is based on an untrusted root.

               SSLVerifyIsEnabled: failed to read registry value. Assuming verification is disabled. LastError = 0

               SSLVerifyCertAgainstSystemStore: Certificate verification is disabled, so connection will proceed despite the error

               Opening file VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file HFR_XP_Mini_2/HFR_XP_Mini_2_2.vmdk (vpxa-nfc://[VMStorage1] HFR_XP_Mini_2/HFR_XP_Mini_2_2.vmdk@esx001.hh.novastor.local:902!52 a0 1f 83 c8 f6 cd 44-bd dc e7 4c 4b f6 a7 58)

               DISKLIB-LINK  : Opened 'vpxa-nfc://[VMStorage1] HFR_XP_Mini_2/HFR_XP_Mini_2_2.vmdk@esx001.hh.novastor.local:902!52 a0 1f 83 c8 f6 cd 44-bd dc e7 4c 4b f6 a7 58' (0x1a): custom, 16777216 sectors / 8 GB.

               DISKLIB-LIB   : Opened "vpxa-nfc://[VMStorage1] HFR_XP_Mini_2/HFR_XP_Mini_2_2.vmdk@esx001.hh.novastor.local:902!52 a0 1f 83 c8 f6 cd 44-bd dc e7 4c 4b f6 a7 58" (flags 0x1a).

 

So my actual problem is:

 

 

The API reference says that it is necessary to supply the snapshot reference when using SAN transport mode. But if I give that reference, the opening of the disk fails for all transport modes. If I don't give the snapshot reference I can open and write to the virtual disk (choosen tranpsort mode: NBD), but SAN transport won't be available.

 

 

In other words: When opening a disk via VixDiskLib_Open the transport mode is choosen automatically. If SAN is possible, I had had to give the snapshot reference to VixDiskLib_ConnectEx before using VixDiskLib_Open. If SAN isn't possible, the snapshot reference has to be omitted to VixDiskLib_Open as otherwise I'll got the permission error.

 

 

Regards,

 

 

Holger

 

 


Viewing all articles
Browse latest Browse all 2039

Trending Articles



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