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

How to adjust cache size of vixDiskLib?

$
0
0

Hello~

 

I'm writing a python program which will R/W VMDKfile by using vixDiskLib.dll.

 

I'd like to speed up R/W spped because some files will be read/wrote many times, these file's size might be very huge.

How do I ensure that these files be cached as many as possible?

Or can I adjust the buffer size?

 

Thank you very much

 

Best regards,

Wood


RE: Looking for some advice

$
0
0

Hi folks,

 

We are a Cloud Provider who uses CommVault as the primary backup solution for our virtualized and physical workloads.  Out whole backup environment is virtual as well including Media Agents and VSA Proxies.  These VSA Proxies are just a W2K8 R2 server that is used to HotAdd snapshots for the backup process.

 

We have always had issues with the VSA Proxies around the HotAdd process with typical issues in having random HotAdd failures.  Our original issue revolved around the fact that when HotAdd is required to mount disks past the 1st controller it would fail with the HotAdd.  Our VSA Proxies right now have 3 controllers so I would assume we should be able to mount 45 disks.  We had solved the issue in the past without really knowing how but after a recent upgrade/migration, it appears we have issues again.

 

CommVault support has not really been very helpful with this issue and after much searching I am basically at the end of my rope.

 

I suspect that the issue may be centered around the order or binding of the adapters being different than how they are represented in VMware.  I have come to this forum as this all revolves around VDDK and the interworkings of VMware.

 

Technically I should be able to use 4 controllers but to be honest, if we could get 3 working without issues I would be happy.

 

We are running vSphere 5.0 U1 with all datastores now being Version 5.

 

What I would really love is an explaination of the events that are logged in the VixDisk log in CommVault with the hopes that it sheds some light on this issue.  SImple things like:

 

1.. 2444 474 12/05 01:09:30 ### diskLibPlugin: 2012-12-05T01:09:30.516-05:00 [01140 verbose 'Default'] ScsiEnum_GetAdapterPort: scsi port \\.\Scsi0: bus type is 3


2444 474 12/05 01:09:30 ### diskLibPlugin: 2012-12-05T01:09:30.516-05:00 [01140 verbose 'Default'] ScsiEnum_GetAdapterPort: scsi port \\.\Scsi1: bus type is 3


2444 474 12/05 01:09:30 ### diskLibPlugin: 2012-12-05T01:09:30.516-05:00 [01140 verbose 'Default'] ScsiEnum_GetAdapterPort: scsi port \\.\Scsi2: bus type is 10

 

Why is the 3rd Adapter showing with bus type 10 when they are the same?

 

2.. CreateFile \\.\PhysicalDrive15 failed 2

 

Are these normal?  We will have 15 through 64 typically here for this failure

 

3.. TryReleaseDevice: DynLinkApi_SetupDiRemoveDeviceInterface failed. Error = 0xe000021b.

 

We have groups of 3 of these in the logs as well.  Could this be part of the problem?

 

4.. Mounting VM vim.VirtualMachine:vm-85249 using transport hotadd failed : Failed to hot-add SCSI targets: Vmomi::MethodFault::Exception: vim.fault.GenericVmConfigFault.

 

This is a HotAdd failure.  It was trying to mount the drives at 1:3 1:4 1:5  but failed.  If I run this job manually after te fact by itself, no issues.  I seems to be due the fact that I am HotAdding many VM drives to the VSA Proxy.

 

At this point in time, any advice would be helpful.

 

Cheers,

linux vmware-mount command error

$
0
0

Hi everyone,

 

I want to mount .vmdk file of centos machine. I tried vmware-mount command, but i have a trouble.

 

I could mount partiton 1, but when i tried mount partition 3, I got below error even though this partition isn't swap partition. How can i fix this..

 

 

# vmware-mount -p mavenrepo.vmdk

Nr      Start       Size Type Id Sytem                  
-- ---------- ---------- ---- -- ------------------------
1       2048     512000 BIOS 83 Linux
2     514048    8388608 BIOS 82 Linux swap
3    8902656   74983424 BIOS 83 Linux
# vmware-mount mavenrepo.vmdk 1 /mnt
# ls /mnt

config-2.6.32-220.17.1.el6.x86_64  grub                                      initrd-2.6.32-220.17.1.el6.x86_64kdump.img  symvers-2.6.32-279.2.1.el6.x86_64.gz   System.map-2.6.32-279.9.1.el6.x86_64  vmlinuz-2.6.32-71.el6.x86_64
config-2.6.32-279.14.1.el6.x86_64  initramfs-2.6.32-220.17.1.el6.x86_64.img  initrd-2.6.32-279.14.1.el6.x86_64kdump.img  symvers-2.6.32-279.9.1.el6.x86_64.gz   System.map-2.6.32-71.el6.x86_64
config-2.6.32-279.2.1.el6.x86_64   initramfs-2.6.32-279.14.1.el6.x86_64.img  initrd-2.6.32-279.2.1.el6.x86_64kdump.img   symvers-2.6.32-71.el6.x86_64.gz        vmlinuz-2.6.32-220.17.1.el6.x86_64
config-2.6.32-279.9.1.el6.x86_64   initramfs-2.6.32-279.2.1.el6.x86_64.img   lost+found                                  System.map-2.6.32-220.17.1.el6.x86_64  vmlinuz-2.6.32-279.14.1.el6.x86_64
config-2.6.32-71.el6.x86_64        initramfs-2.6.32-279.9.1.el6.x86_64.img   symvers-2.6.32-220.17.1.el6.x86_64.gz       System.map-2.6.32-279.14.1.el6.x86_64  vmlinuz-2.6.32-279.2.1.el6.x86_64
efi                                initramfs-2.6.32-71.el6.x86_64.img        symvers-2.6.32-279.14.1.el6.x86_64.gz       System.map-2.6.32-279.2.1.el6.x86_64   vmlinuz-2.6.32-279.9.1.el6.x86_64
# vmware-mount -d /mnt
# vmware-mount mavenrepo.vmdk 3 /mnt

/dev/loop0 looks like swapspace - not mounted
mount: you must specify the filesystem type
Failed to mount partition 3 of disk 'mavenrepo.vmdk' on '/mnt': A loop device operation failed

VDDK 5.1 comes with outdated vmware-mount

$
0
0

Download VDDK 5.1 and try to mount a remote vmdk on ESXi - it will fail.
If you have a look at the binary for vmware-mount.exe you will see that it is version

 

VMware DiskMount Utility version 4.2.0 build-751582
Copyright (c) 1998-2008 VMware, Inc.All rights reserved.

 

Probably/hopefully not the one that should be included.

 

Download 5.0 and remote mounts will work again

Questions about quiesce flag during snapshot creation when guest OS is Linux

$
0
0

Hi Guys,

 

I got a little confused about quiesce flag during snapshot creation when guest OS is Linux, as I read the VDDK documents.

 

Per "Driver Type and Quiescing Mechanisms Used According to Guest Operating Systems" in the following page:

http://pubs.vmware.com/vsphere-51/index.jsp?topic=%2Fcom.vmware.vddk.pg.doc%2FvddkBkupVadp.9.6.html&resultof=%22VDDK%22%20%22vddk%22%20%22Sync%22%20%22sync%22%20%22Driver%22%20%22driver%22

 

only Crash-consistent quiescing is supported for Linux Guest OS.

 

Q1. Does this mean I can not set quiesce flag as true when I call CreateSnapshot_Task against a Linux VM ?

      My understanding is, quiesce level (crash, guest filesystem, application) can be aotomatically adjusted according to information like guest os type and other configuration. So there is no problem for me to set set quiesce flag as true even when I call CreateSnapshot_Task against a Linux VM. Am I understanding right ?

 

Q2. I saw the following page is discussing the quiesce flag when creating snapshot:

http://pubs.vmware.com/vsphere-51/index.jsp?topic=%2Fcom.vmware.wssdk.pg.doc%2FPG_VM_Manage.13.3.html

--------------------------------
quiesce– If true  and the virtual machine is powered on when the snapshot is taken,  VMware Tools is used to quiesce the file system in the virtual machine.  This ensures that a disk snapshot represents a consistent state of the  guest file systems. If the virtual machine is powered off or VMware  Tools is not available, the quiesce flag is ignored.
--------------------------------
So what's "VMware Tools" mean in the above sentence in Linux guest OS , does it mean Sync Driver ?
If I installed "VMware Tools" on Linux Guest OS, but disabled SYNC Driver, then quiesce flag get ignored even when I set it as true in CreateSnapshot_Task, am I understanding right ?
Thanks & Regards,
Bing

Change Transport mode from NBDSSL to NBD VDDK 1.2.1

$
0
0

Hi All,

 

I'm in real need of help!

 

Going back a month our VM backups were completing in quite good time. We wanted to test adding the SAN to the backup proxy that is using CA ARCserver r15 SP1 and VDDK 1.2.1 to see if the speed would increase.

 

When testing a quick read of the logs showed that the transport mode had moved from NBD to SAN. The backup speeds were not that much faster so we changed it back as it was working fine.

 

Since then the VDDK has been using NBDSSL which has been cutting the backup speeds of my VM's by half.

 

I've had a case open with CA for over a month now as I don’t have SDK support with VMware. Nobody can seem to work out how to get the transport mode back to NBD.

 

If anyone knows how to do that using VDDK 1.2.1 that would be such a great help.

 

Thanks

VixDiskLib_Open fails only for Esx 4.x

$
0
0

Hi,

 

I have a code which opens a VMware disk for read. The code is working properly in 5.x now. But the code is failing in 4.x - failing here is not returning an error, but crashing and I have no clue what is happening.

 

1. This was a tested code on 4.x and 5.x before have no idea what changed.

2. For debugging I took the VixDiskSample.exe that comes as part of the VDDK and that too crashes in the same call(VixDiskLib_Open).

 

Following is the sequence of steps I followed for the disk open:


  std::string strVmxSpec;
   VixDiskLibConnectParams vixDiskLibConnectParams;
   ::memset(&vixDiskLibConnectParams,0,sizeof(VixDiskLibConnectParams));


   vixDiskLibConnectParams.serverName = const_cast<char*>(strServerName.c_str());
   vixDiskLibConnectParams.creds.uid.userName = const_cast<char*>(strUserName.c_str());
   vixDiskLibConnectParams.creds.uid.password = const_cast<char*>(strPassword.c_str());
   vixDiskLibConnectParams.credType = VIXDISKLIB_CRED_UID;


    // vmxSpec is of the format [datastore]vmname/vmdkfilename.vmdk
    vixDiskLibConnectParams.vmxSpec = const_cast<char*>(strVmxSpec.c_str());
    vixDiskLibConnectParams.port = iPortNumber;
  

   VixError vixError = ::VixDiskLib_Connect((const VixDiskLibConnectParams *)&vixDiskLibConnectParams,&_DiskLibConnection);

   CHECK_AND_THROW(vixError);


  // The crash happens in the below line

         VixError vixError = ::VixDiskLib_Open(_DiskLibConnection, strDiskPath.c_str(), iOpenFlags, pDiskHandle);
         RETURN_VIXERROR_IF_FAILED(vixError);

 

The VixDiskLibSample.exe code too crashes in the same function call, but works with 5.x. So I modified the code like this to take the VMmoref and snapshomofer like this (both VMMoref and snapshotmoref are correct and verified from the web interface)

 

    strVmxSpec = "moref=" + strVMName;
     vixDiskLibConnectParams.vmxSpec = const_cast<char*>(strVmxSpec.c_str());
     vixDiskLibConnectParams.port = iPortNumber;
  


   Bool ro = (appGlobals.openFlags & VIXDISKLIB_FLAG_OPEN_READ_ONLY);


   VixError vixError = VixDiskLib_ConnectEx(&vixDiskLibConnectParams, ro, const_cast<char*>(snapmoref.c_str()),
       NULL, &_DiskLibConnection);
   CHECK_AND_THROW(vixError);

 

Can someone tell me what could be the problem? Since VixDiskSample.exe is not my code I am assuming that other people might have noticed this problem.

 

Thanks,

./Siva.

VixMntapi_Init returned error code 6

$
0
0

I am using the latest VDDK ver 5.0 on windows 7 64-bit against ESXi host.

Prior to this call, I called the VixDiskLib_Init which returned successfully.

 

Here is the code snippet:

 

 

vixError=VixDiskLib_Init(VIXDISKLIB_VERSION_MAJOR,

VIXDISKLIB_VERSION_MINOR,

NULL,NULL,NULL,// Log, warn, panic

appGlobals.libdir);

CHECK_AND_THROW(vixError);

   // this succeeded

 

vixError=VixMntapi_Init(VIXDISKLIB_VERSION_MAJOR,

VIXDISKLIB_VERSION_MINOR,

&LogFunc,&WarnFunc,&PanicFunc,

appGlobals.libdir,

appGlobals.cfgFile);

 

 

 

 

 

 

 

 

 

 

 

 

     // this failed with error code 6

 

Your help is grealy appreciated

ahalimz


Issue with VDDK Logging

$
0
0

 

Hi,

 

 

I am facing some issues with VDDK logging. We are calling VixDiskLib_InitEx, passing callback funtions for panic/warn/errorlogs.

 

 

What i observe is that, there are some of the messages that VDDK throws on console (stdout), but these messages do not get logged by using these callback functions. These messages have some important information and i want to capture them in logs.

 

 

I have also tried using config file as last parameter to InitEx call, but that doesn't help either.

 

 

My question is, Is there anyway to get those messages thrown to stdout in the logs ?

 

 

Tia

 

 

mount a read-only vmdk

$
0
0

Hi!

 

How can I (read-only) mount a read-only vmdk with vmware-mount?

 

More details:

I have a read-only nfs-export, where 40 GB .vmdks are inside. When I try to mount them with vmware-mount from the vddk, it requests write access to the .vmdk.

 

Things I already tried:

  • A possible solution would be to copy the vmdk to a local disk, which I try to avoid for performance reasons.
  • Another solution I thought about was to create a unionfs or aufs over the nfs-share. However, the problem is that unionfs/aufs tries to copy the whole file when the first write access is done (does not work on changed blocks).
  • A third solution I thought of was to create a diff-VM but this would mean that I need to boot a VM just for mounting the files…

 

Ben

VidDiskLib crash in Multithread environment

$
0
0

I was going crazy over a crash issue with a module which uses VixDiskLib. The module is a DLL and multiple threads creates an instance of the DLL which does, Init, Connect, Open, Read, write, Close, Disconnect, Exit. The crash is happening when the thread is exiting in the VixDiskLib.dll. After some search I came across the thread

 

http://communities.vmware.com/message/1266395#1266395

 

Which is not similar to the crash I am seeing, but I had violated all the mutithreading rules.

 

  • VixDiskLib_InitEx() or VixDiskLib_Init() should be called only once per process. VMware

recommends that you call them from the main thread.

 

  • In the VixDiskLib_InitEx() or VixDiskLib_Init() call, you can leave the logging callbacks as NULL.

This causes VixDiskLib to provide default logging functions, which are not thread safe. If you are using

VDDK in a multithreaded environment, you should provide your own thread safe logging functions.

 

  • When you call VixDiskLib_Open() and VixDiskLib_Close(), VDDK initializes and uninitializes a

number of libraries. Some of these libraries fail to work if called from multiple threads. For example, the

following call sequence does not work:

 

Thread 1: VixDiskLib_Open ...... VixDiskLib_Close

Thread 2: ................................... VixDiskLib_Open ...... VixDiskLib_Close

 

My application structure is like this - All my VDDK and vStorageAPI implementation is done inside a DLL. VDDK is never exposed to the exe calling the DLL. If a backup of VM has to be done, all the exe has to do is to call a function in the DLL which does the following

 

1. VixDiskLib_init

2. VixDiskLib_Connect

3. VixDiskLib_Open

4. VixDiskLib_Read / VixDiskLib_Write

5. VixDiskLib_Close

6. VixDiskLib_Disconnect

7. VixDiskLib_Exit

 

I was doing this for each thread that is getting called everytime. But according the documentation, I am supposed to call VixDiskLib_Init from the main thread, that may not work for me as it is a DLL. Say if I restrict the simultaneous DLL call to only one - can I call VixDiskLib_Init each time I instantiante the DLL ? Any help is greatly apperitiated !

 

 

Thanks,

./Siva.

How to delete a directory without the prompt annoyance?

$
0
0

I am using vifs to delete a whole directory (contained files). It works perfectly except it gives me prompt to force me to type "y" to delete it.

Like this,

vifs --server ip --username root --password password --rm '[datastore1] VM33'
Remove 'VM33'? (y/n) : y

 

Are there any ways to ignore this prompt to delete the directory directly, without typing the "y", or typing the "y" automatically?

Thank you.

Reading changed blocks ?

$
0
0

I'm stuck on how to read the actual changed blocks from a host/vC.

 

 

I've called QueryChangedDiskAreas and got back a list of (start, length)s - these appears to be actual byte offsets.

 

 

Looking at VixDiskLib_Read() it seems to want sector based inputs.

 

/**
* Reads a sector range.
* @param diskHandle [in] Handle to an open virtual disk.
* @param startSector [in] Absolute offset.
* @param numSectors [in] Number of sectors to read.
* @param readBuffer [out] Buffer to read into.
* @return VIX_OK if success, suitable VIX error code otherwise.
*/
VixError
VixDiskLib_Read(VixDiskLibHandle diskHandle,
                VixDiskLibSectorType startSector,
                VixDiskLibSectorType numSectors,
                uint8 *readBuffer);

 

How to I merge these two concepts into the ability to get the actual changed bytes from the VM ?

 

Is it just bad API design/documentation and the "sector" is really a byte (VixDiskLibSectorType is uint64 afterall) ?

 


 

Thanks,

 

richard.

How to dismount the volumes if the application crashes.

$
0
0

Hi,

 

I am opening a vmdk file and mounting the volumes by using the below code

 

    m_vixError = VixDiskLib_Open(
        m_vixDiskLibCon,
        fileName,
        VIXDISKLIB_FLAG_OPEN_UNBUFFERED,
        &m_vixDiskLibHandle);
  
    m_vixError = VixMntapi_OpenDiskSet(
        &m_vixDiskLibHandle,
        1,
        0,
        &m_vixDiskSetHandle);

 

    m_vixError = VixMntapi_GetVolumeHandles(
        m_vixDiskSetHandle,
        &m_numberOfVolumes,
        &m_vixVolumeHandle);

 

  
    for ( int i = 0; i < m_numberOfVolumes; i++ )
    {
        m_vixError = VixMntapi_MountVolume(m_vixVolumeHandle[i], FALSE);
    }

 

Doing some operation here.............


....... How to dismount the volumes and close the disk handles if the application CRASHEShere.......

 

Normally i'm using the below functions for unmounting the volumes and closing the disk handles

 

            VixMntapi_DismountVolume(m_vixVolumeHandle[i], TRUE);
            VixMntapi_FreeVolumeHandles(m_vixVolumeHandle);
            VixMntapi_CloseDiskSet(m_vixDiskSetHandle);
            VixDiskLib_Close(CVMDKFileRestore::vmdkVixDiskLibHandle.find(it->first)->second);

 

 

Thanks

Manickam

SAN transport mode issue

$
0
0

When I am trying to use SAN transport mode during restore I get following error.

SAN mode works first time correctly but when I am trying 2nd time I always get following error in vixdisklib.logs.

I am guessing ESX server keeping some kind of lock\lease on the disk and which further not allowing to use SAN transport mode.

Any help on this?

5632  196c  03/11 21:50:39 ### diskLibPlugin: 2013-03-11T21:50:39.398-04:00 [06508 verbose 'Default'] Trying to open new LUN LVID:513e8105-87cb14c6-db4a-00219b8c1fa3/5123cd9b-54c4b022-3b73-00219b8c1fa3/551716ac.
-->
5632  196c  03/11 21:50:39 ### diskLibPlugin: 2013-03-11T21:50:39.398-04:00 [06508 trivia 'Default'] Attempting to open LVID:513e8105-87cb14c6-db4a-00219b8c1fa3/5123cd9b-54c4b022-3b73-00219b8c1fa3/551716ac.
5632  196c  03/11 21:50:39 ### diskLibPlugin: 2013-03-11T21:50:39.398-04:00 [06508 error 'Default'] No path to device LVID:513e8105-87cb14c6-db4a-00219b8c1fa3/5123cd9b-54c4b022-3b73-00219b8c1fa3/551716ac found.
5632  196c  03/11 21:50:39 ### diskLibPlugin: 2013-03-11T21:50:39.413-04:00 [06508 error 'Default'] Failed to open new LUN LVID:513e8105-87cb14c6-db4a-00219b8c1fa3/5123cd9b-54c4b022-3b73-00219b8c1fa3/551716ac.
-->
5632  196c  03/11 21:50:39 ### diskLibPlugin: 2013-03-11T21:50:39.413-04:00 [06508 verbose 'Default'] Cannot access LUN LVID:513e8105-87cb14c6-db4a-00219b8c1fa3/5123cd9b-54c4b022-3b73-00219b8c1fa3/551716ac, cannot open disk snapshot-11909[TestDatastoreWithLen_GX_BACKUP_2796_2_2546] SNAP1/SNAP1.vmdk. Giving up.
5632  196c  03/11 21:50:39 ### diskLibPlugin: 2013-03-11T21:50:39.429-04:00 [06508 error 'BlockList']
5632  196c  03/11 21:50:39 ### diskLibPlugin: 2013-03-11T21:50:39.429-04:00 [06508 error 'Default'] Could not initialize block map.
5632  196c  03/11 21:50:39 ### diskLibPlugin: 2013-03-11T21:50:39.429-04:00 [06508 info 'BlockList'] Closing connection devvsvc:testlab\admin
5632  196c  03/11 21:50:39 ### diskLibPlugin: 2013-03-11T21:50:39.444-04:00 [06508 trivia 'vmomi.soapStub[20]'] Sending soap request to [TCP:devvsvc:443]: logout {}
5632  196c  03/11 21:50:39 ### diskLibPlugin: 2013-03-11T21:50:39.444-04:00 [06508 trivia 'HttpConnectionPool'] [PopPendingConnection] Pending connection returned for scheduling
5632  196c  03/11 21:50:39 ### diskLibPlugin: 2013-03-11T21:50:39.444-04:00 [06508 trivia 'vmomi.soapStub[20]'] Request started [class Vmacore::Http::UserAgentImpl::AsyncSendRequestHelper:000000001487C4C8]
5632  196c  03/11 21:50:39 ### diskLibPlugin: 2013-03-11T21:50:39.476-04:00 [06508 trivia 'vmomi.soapStub[20]'] Received soap response from [TCP:devvsvc:443]: logout
5632  196c  03/11 21:50:39 ### diskLibPlugin: 2013-03-11T21:50:39.476-04:00 [06508 trivia 'HttpConnectionPool'] [PopPendingConnection] Nothing to reschedule
5632  196c  03/11 21:50:39 ### diskLibPlugin: 2013-03-11T21:50:39.476-04:00 [06508 info 'vmomi.soapStub[20]'] Resetting stub adapter for server TCP:devvsvc:443 : Closed
5632  196c  03/11 21:50:39 ### diskLibPlugin: 2013-03-11T21:50:39.476-04:00 [06508 warning 'vmomi.soapStub[20]'] Terminating invocation: server=TCP:devvsvc:443, moref=vim.SessionManager:SessionManager, method=logout
5632  196c  03/11 21:50:39 ### diskLibPlugin: 2013-03-11T21:50:39.476-04:00 [06508 trivia 'Default'] Ignoring secondary error: class Vmacore::CanceledException(Operation was canceled)
5632  196c  03/11 21:50:39 ### diskLibPlugin: 2013-03-11T21:50:39.476-04:00 [06508 trivia 'Default'] Setting error in state 1 : class Vmacore::CanceledException(Operation was canceled)
5632  196c  03/11 21:50:39 ### diskLibPlugin: 2013-03-11T21:50:39.476-04:00 [06508 error 'Default'] San transport error: Cannot access a SAN/iSCSI LUN backing this virtual disk..
5632  196c  03/11 21:50:39 ### DISKLIB-LINK  : "san://snapshot-11909[TestDatastoreWithLen_GX_BACKUP_2796_2_2546] SNAP1/SNAP1.vmdk@devvsvc?testlab\admin/XXX" : failed to open (You do not have access rights to this file). 
5632  196c  03/11 21:50:39 ### DISKLIB-CHAIN : "san://snapshot-11909[TestDatastoreWithLen_GX_BACKUP_2796_2_2546] SNAP1/SNAP1.vmdk@devvsvc?testlab\admin/XXX" : failed to open (You do not have access rights to this file).
5632  196c  03/11 21:50:39 ### DISKLIB-LIB   : Failed to open 'san://snapshot-11909[TestDatastoreWithLen_GX_BACKUP_2796_2_2546] SNAP1/SNAP1.vmdk@devvsvc?testlab\admin/XXX' with flags 0x1e You do not have access rights to this file (3390).

vixDiskLibSample failed when running in a VM

$
0
0

Hi All,

 

I'm recently playing the sample code shipped with vixDiskLib 5.1. I made small changes (i.e. switch the srcConnection with dstConnection, and swith the srcPath with diskPath) in doClone() method to make it clone a vmdk from a remote site to a local environment.

 

It works well in my local machine (Windows 7). I'm able to download a whole vmdk from a vSphere server.

 

But when I move the modified sample code to a VM running in the vSphere server, it fails with this error message:

 

DISKLIB-LIB   : CREATE: "c:\dump\dump.vmdk" -- vmfs capacity=83886080 (40 GB) adapter=buslogic cowGran=128 allocType=3

Object backing type is invalid. Figuring out the most suitable backing type...

CREATE: Creating disk backed by 'default'

DISKLIB-DSCPTR: "c:\dump\dump.vmdk" : creation successful.

DeviceCreateHost_DiskDeviceToUniqueID: c:\dump\dump-flat.vmdk not in \\.\PhysicalDriveX format.

UUID: SMBIOS UUID is reported as '42 13 e4 b6 4f fd 61 88-1c f6 86 c7 ca 55 91 d7'.

FILE: FileLockDynaLink: Further process validation tools are: available

DISKLIB-DSCPTR: Opened [0]: "dump-flat.vmdk" 0 (0x21a)

DISKLIB-LINK  : Opened 'c:\dump\dump.vmdk' (0x21a): vmfs, 83886080 sectors / 40 GB.

DISKLIB-LIB   : Opened "c:\dump\dump.vmdk" (flags 0x21a, type vmfs).


[NFC ERROR] NfcNetTcpRead: bRead: -1

[NFC ERROR] NfcNet_Recv: requested 264, recevied only 0 bytes

[NFC ERROR] NfcFile_Receive: Failed to get message

[NFC ERROR] NFC_NETWORK_ERROR

[NFC ERROR] NfcNetTcpWrite: bWritten: -1

[NFC ERROR] NfcSendMessage: send failed: NFC_NETWORK_ERROR


And sometimes, it will be:


[NFC ERROR] NfcNetTcpRead: bRead: -1
[NFC ERROR] NfcNet_Recv: requested 261736, recevied only 196608 bytes
[NFC ERROR] NfcFile_RecvMessage: data recv failed. retval = 3, expected 261736
[NFC ERROR] NFC_NETWORK_ERROR


And the requested xxx changes all the time.

 

It would be appriecaited if someone could enlight me with some possible causes. Many thanks.

VDDK 5.1 and C#.Net

$
0
0

Hello,

I try to use the VDDK to access the VMDK of a virtual machine managed by vCenter. Here is the C#.Net code:

 

public enum VixDiskLibCredType: int
{
VIXDISKLIB_CRED_UID = 1,
VIXDISKLIB_CRED_SESSIONID = 2,
VIXDISKLIB_CRED_TICKETID = 3,
VIXDISKLIB_CRED_SSPI = 4,
VIXDISKLIB_CRED_UNKNOWN = 256,
}

 

[StructLayoutAttribute(LayoutKind.Explicit)]
public struct VixDiskLibConnectParams
{
[MarshalAsAttribute(UnmanagedType.LPStr)]
[FieldOffset(0)]
public string vmxSpec;
[MarshalAsAttribute(UnmanagedType.LPStr)]
[FieldOffset(4)]
public string serverName;
[MarshalAsAttribute(UnmanagedType.LPStr)]
[FieldOffset(8)]
public string thumbPrint;
[FieldOffset(12)]
public long privateUse;
[FieldOffset(20)]
public VixDiskLibCredType credType;
[FieldOffset(24)]
[MarshalAsAttribute(UnmanagedType.LPStr)]
public string userName;
[FieldOffset(28)]
[MarshalAsAttribute(UnmanagedType.LPStr)]
public string password;
[FieldOffset(36)]
public uint port;
}

 

[DllImport("vixDiskLib.dll", SetLastError = true)]
public static extern VixError VixDiskLib_Connect(ref VixDiskLibConnectParams connectParams, IntPtr connection);

 

 

Everytime I call VixDiskLib_Connect, I get a VIX_E_INVALID_ARG error. I've tried to connect to vCenter 4.1, vCenter 5.0, vCenter 5.1 and ESX 4.1.0. So I assume, that there may be a problem with the data structure. But in my opinion the offsets should be corrent and the length (40 bytes) should be correct too...

This is the code I use:

 

VixDiskLibConnectParams connectParams = new VixDiskLibConnectParams();
connectParams.serverName = ServiceInstance.ConnectedToHost;
connectParams.credType = VixDiskLibCredType.VIXDISKLIB_CRED_UID;
connectParams.userName = "user";
connectParams.password = "pass";
connectParams.port = 902;
connectParams.vmxSpec = @"moref=" + virtualMachine.ManagedObjectReference.Value;

 

VixError err = VddkWrapper_5_1.NativeMethods.VixDiskLib_InitEx(5, 0, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, string.Empty, string.Empty);

 

if (err != VixError.VIX_OK) MessageBox.Show("VixDiskLib_Init:" + err.ToString());

 

IntPtr connectionHandle = Marshal.AllocHGlobal(4);

 

err = VddkWrapper_5_1.NativeMethods.VixDiskLib_Connect(ref connectParams, connectionHandle);
if (err != VixError.VIX_OK) MessageBox.Show("VixDiskLib_Connect:" + err.ToString()); //ERROR VIX_E_INVALID_ARG

 

These are the values in the connectParams structure, they seem ok to me:

 

 

credType VIXDISKLIB_CRED_UID VddkWrapper_5_1.VixDiskLibCredType
password "password" string
port 902 uint
privateUse 0 long
serverName "vcenter-5.domain.local" string
thumbPrint null string
userName "user" string
vmxSpec "moref=vm-321" string

 

can anybody help or give an advise?

 

Thanks in advance,

Eric

VDDK and Unicode support

$
0
0

Hi,

 

I saw the documentation which says VDDK supports Unicode characters. The documentation says that I have use iconv library calls to handle random unicode pathnames. When I checked the Iconv examples the initialization takes charset as a parameter - as I understand we should know which charset is we want to convert from.

 

http://www.lemoda.net/c/iconv-example/iconv-example.html

 

When the input is arbitary pathname how can I use iconv to facilitate this conversion? Any help is apperitiated.

 

Thanks,

./Siva

vSphere and Veritas NetBackup 7.0 integration

$
0
0

 

Hello Experts,

 

 

We're trying to backup VM using NetBackup and "hotadd" transport.

 

 

VMs based on ESX4.0 EnterprisePlus Update 1.0.

 

 

It seems that snapshot created fine but VM backup host unable to map and mount  snapshot volume.

 

 

I'm suspecting licensing stuff but not sure... Any ideas on how to fix this????

 

 

Any help would be greatly appreciated!!!

 

 

VXMS logs from VM backup host below:

 

 

        03/02/2010 14:45:49.0576 vSphere and Veritas NetBackup 7.0 integration: VixInterface::vdConnect:.\VixInterface.cpp:406 &lt;VFM_ESINFO&gt; : Calling VixDiskLib_ConnectEx()

        03/02/2010 14:45:50.0029 vSphere and Veritas NetBackup 7.0 integration: g_vdInterfaceLogger:.\libvix.cpp:1689 &lt;VFM_ESINFO&gt; : VixDiskLib:  Advanced transport modes not available for opening moref=vm-158.

 

        03/02/2010 14:45:50.0029 vSphere and Veritas NetBackup 7.0 integration: VixGuest::connectToHost:.\VixGuest.cpp:926 &lt;VFM_ESINFO&gt; : Setting up VMM interface

        03/02/2010 14:45:50.0029 vSphere and Veritas NetBackup 7.0 integration: VixGuest::connectToHost:.\VixGuest.cpp:945 &lt;VFM_ESINFO&gt; : ChangeTracking is disabled/unsupported

        03/02/2010 14:45:50.0029 vSphere and Veritas NetBackup 7.0 integration: VixGuest::openLeafSnapshotDisks:.\VixGuest.cpp:397 &lt;VFM_ESINFO&gt; : connectToHost() success

        03/02/2010 14:45:50.0029 vSphere and Veritas NetBackup 7.0 integration: VixGuest::openLeafSnapshotDisks:.\VixGuest.cpp:413 &lt;VFM_ESINFO&gt; : Calling vdOpen(Disk = vSphere and Veritas NetBackup 7.0 integration test/test.vmdk, Flags = 0x4)

        03/02/2010 14:45:50.0029 vSphere and Veritas NetBackup 7.0 integration: VixInterface::vdOpen:.\VixInterface.cpp:141 &lt;VFM_ESINFO&gt; : Calling VixDiskLib_Open()

        03/02/2010 14:45:50.0029 vSphere and Veritas NetBackup 7.0 integration: g_vdInterfaceLogger:.\libvix.cpp:1689 &lt;VFM_ESINFO&gt; : TicketResolveHostName: Resolving IP address for hostname sapvcenter.

        03/02/2010 14:45:50.0029 vSphere and Veritas NetBackup 7.0 integration: g_vdInterfaceLogger:.\libvix.cpp:1689 &lt;VFM_ESINFO&gt; : TicketResolveHostName: Resolved to 10.154.196.116.

        03/02/2010 14:45:50.0045 vSphere and Veritas NetBackup 7.0 integration: g_vdInterfaceLogger:.\libvix.cpp:1689 &lt;VFM_ESINFO&gt; : VixDiskLibVim: TicketLogin

        03/02/2010 14:45:51.0435 vSphere and Veritas NetBackup 7.0 integration: g_vdInterfaceLogger:.\libvix.cpp:1693 &lt;VFM_ESWARN&gt; : VixDiskLibVim: Not licensed to use this function.

        03/02/2010 14:45:51.0467 vSphere and Veritas NetBackup 7.0 integration: g_vdInterfaceLogger:.\libvix.cpp:1689 &lt;VFM_ESINFO&gt; : VixDiskLibVim: TicketLogout  

 

 

     03/02/2010 14:45:51.0670 vSphere and Veritas NetBackup 7.0 integration: VixInterface::vdOpen:.\VixInterface.cpp:150 &lt;VFM_ESERROR&gt; vSphere and Veritas NetBackup 7.0 integration : VixDiskLib_Open() error. Exited

        03/02/2010 14:45:51.0670 vSphere and Veritas NetBackup 7.0 integration: VixGuest::openLeafSnapshotDisks:.\VixGuest.cpp:424 &lt;VFM_ESERROR&gt; vSphere and Veritas NetBackup 7.0 integration : vdOpen() error = 16064. Calling closeLeafSnapshotDisks()

        03/02/2010 14:45:51.0670 vSphere and Veritas NetBackup 7.0 integration: VixGuest::openLeafSnapshotDisks:.\VixGuest.cpp:527 &lt;VFM_ESERROR&gt; vSphere and Veritas NetBackup 7.0 integration : Exited with failure

        03/02/2010 14:45:51.0670 vSphere and Veritas NetBackup 7.0 integration: VixCoordinator::vixMapObjCtl:.\VixCoordinator.cpp:903 &lt;VFM_ESERROR&gt; vSphere and Veritas NetBackup 7.0 integration : Exited with 23

        03/02/2010 14:45:51.0670 vSphere and Veritas NetBackup 7.0 integration: vix_map_objctl:.\libvix.cpp:1145 &lt;VFM_ESERROR&gt; vSphere and Veritas NetBackup 7.0 integration : Error 23

 

 

 

 

 

vmount VDDK 5.0 failed to load libeay32.dll

$
0
0

Hello

 

I got VMware-vix-disklib-5.0.0-427917.i386.exe

after installation I did overwrite files with contents of vddk64.zip

I also did edit the Path system environment variable

maybe I forgot to to something in order to load dlls and the rest of this message is useless

but when I try to mount (local) a vmdk I get an error:

 

SSLLoadSharedLibrary: Failed to load library libeay32.dll:126

A core file is available in

 

(zipped dmp attached, os is 6.1.7601.18044, 64 bit, Intel cpu)

 

Sysinternals depends for x64 says:

 

IESHIMS.DLL  The system cannot find the file specified

 

Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
Error: Modules with different CPU types were found.
Warning: At least one delay-load dependency module was not found.
Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.

Viewing all 2039 articles
Browse latest View live


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