Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 179681

Unable to accessing VMDK files of Windows 2012 Guest os with VixMntApi. (VMDK files of other guest OSs are working fine)

$
0
0

Hi,

 

I have mounted the the VMDK file with the following API and got a handle to it.

 

I have opened the disk using

 

    VixDiskLib_Open(

            vixDiskLibCon,

            fileName,

            VIXDISKLIB_FLAG_OPEN_READ_ONLY,

            &vixDiskLibHandle);

 

[I have tried with the other two flags(VIXDISKLIB_FLAG_OPEN_UNBUFFERED,VIXDISKLIB_FLAG_OPEN_SINGLE_LINK) also]

 

And i have got the device path for the volume like \\.\vstor2-mntapi10-shared-D62BC271000071180000000002000000\

 

Then i'm trying to list the files inside the volume by using Windows API(FindFirstFile())

 

string volPath = \\.\vstor2-mntapi10-shared-D62BC271000071180000000002000000\\*

 

HANDLE h = FindFirstFile(volPath.c_str() , &fd);

 

but it returns INVALID_HANDLE_VALUE as result and the GetLasterror() returns error code as 19

 

For The System error code 19, MSDN says that "The media is write protected".

 

Again, this is happening only for the VMDK files of Windows 2012 guest OS.

 

 

 

Any help on this is much appriciated.

 

 

Thanks

Manickam


Viewing all articles
Browse latest Browse all 179681

Trending Articles



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