vohra
Contributor
Contributor

Query about correct usage of VixDiskLib_ConnectEx?

Hi

I am using VDDK 1.1.1 on linux platform. My application is using dynamic loading for VDDK and gSoap for vSphere SDK calls.

After the call to "VixDiskLib_InitEx" the log messages clear state that the advanced transport modes are available, but when I do actual

virtual disk read/write the log messages state that advanced transport modes cannot be used for virtual machine.

For calling "VixDiskLib_ConnectEX" for the parameter <snapshotRef> I am using a string like "snapshot-ABCD" which I got

from the snapshot managed object, for the <vmRef> parameter I am using a string like "moref=vm-QWER", and for the transport mode

priority list I am supplying NULL as recommended in the documentation. Further printing the available transport modes shows me all

the modes. I have all the hardware setup for hotadd mode to work as documented in the programming guide but it always uses nbd.

Any ideas in the regard will be highly appreciated. Thanks.

0 Kudos
5 Replies
SonalJain
VMware Employee
VMware Employee

Can you please share the VDDK log for the scenario you are facing.

Thanks,

Sonal

0 Kudos
vohra
Contributor
Contributor

Hi Sonal

Thanks for replying. Here is the log excerpt.

VixDiskLib: config options: libdir '/usr/local/DS-Client/vmware_vix/', tmpDir '/tmp/vmware-root'.

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 90807F

50E9C940 error 'App' Cannot use advanced transport modes for 10.10.10.10/moref=vm-5611/ : Snapshot with MoRef " " does not belong to

Virtual Machine with MoRef "vm-5611"..

VixDiskLib: Advanced transport modes not available for opening moref=vm-5611.

TicketResolveHostName: Resolving IP address for hostname 10.10.10.10.

TicketResolveHostName: Resolved to 10.10.10.10.

VixDiskLibVim: TicketLogin

VixDiskLibVim: TicketFindVMByMoRef: vmxPath = -vm-5611-

VixDiskLibVim: TicketLoadVM

VixDiskLibVim: Root Snapshot list has 1 elements.

0 Kudos
SonalJain
VMware Employee
VMware Employee

Hi,

Thanks for sharing the logs.

In the logs, I have found that your temp directory which was created with different snapshot ref has not been deleted from temp directory and when you try to use advanced transport mode, it first create a temp directory with ref of Moref but it could not create due to old directory existance and it fails to use advanced transport mode.

You need to go to temp directory where vix logs and directory is being created for advanced transport mode usage and delete the existing directory manually or by using VixDiskLib_Cleanup API and try again.

Hope this helps.

--Sonal

0 Kudos
vohra
Contributor
Contributor

Hi Sonal Jain,

Thanks a lot for replying. I cleaned up of all feasible locations in /tmp and /usr directories of my linux machine where my application is running.

The error messages still remain the same. Further I am doing a VixDisLib_Disconnect and VixDiskLib_Cleanup in my code for

every connection and I have double checked it. Also I am not sure if I have to cleanup something on the ESX itself. Also I did a small

test when instead of supplying NULL for transport modes I supplied "ndbssl" and this is the result I got:

VixDiskLib: config

options: libdir '/usr/local/DS-Client/vmware_vix/', tmpDir

'/tmp/vmware-root'.

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 90807F

50E9C940 error 'App' Cannot use advanced transport modes for

10.10.10.10/moref=vm-5611/nbdssl: Snapshot with MoRef "nbdssl" does not belong to

Virtual Machine with MoRef "vm-5611"..

VixDiskLib: Advanced transport modes not available for opening

moref=vm-5611.

TicketResolveHostName: Resolving IP address for hostname 10.10.10.10.

TicketResolveHostName: Resolved to 10.10.10.10.

VixDiskLibVim: TicketLogin

VixDiskLibVim: TicketFindVMByMoRef: vmxPath = -vm-5611-

VixDiskLibVim: TicketLoadVM

VixDiskLibVim: Root Snapshot list has 1 elements.

This seems I am doing something very basic as wrong. Please suggest what to do now.

Further is there a way to make the VixDiskLib Logs more verbose I know they have log level paramter

but what should be its level for maximum verbosity and does it take a string value or a number.

vohra

0 Kudos
SonalJain
VMware Employee
VMware Employee

Hi,

As per the logs:

50E9C940 error 'App' Cannot use advanced transport modes for

10.10.10.10/moref=vm-5611/nbdssl: Snapshot with MoRef "nbdssl" does not belong to

Virtual Machine with MoRef "vm-5611"..

VixDiskLib: Advanced transport modes not available for opening

moref=vm-5611.

It seems that snapshot ref passed in the code is not latest according to the inventory, Also, please cross check the tmp directory as well and make sure there is no directory exist corresponding to moref "vm-5611" with old snapshot ref. Which creates a problem while creating temp directory for mount points for the advanced transport mode.

Regarding log level, it takes number.

Regards,

Sonal

0 Kudos