Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 196326

Re: QueryChangedDiskAreas crashes for one VM

$
0
0

Hi intripoon,

Now, another VM got affected by this. Any suggestions?

 

OK now things are becoming interesting. Which Guest OS has the VM which recently has been affected. I guess not freeDOS. If so then whatever goes wrong is not associated with the Guest OS.

 

I have revisited your algorithm, and here are some thoughts (for details check out Advanced Transport APIs):

 

--------------------------------------------------------

SoapConnect

vmConfigInfo => check if cbt is on, if not turn it on // Make sure VM has no snapshots here

VixDiskLib_InitEx(5, 0, &lognormal, &logwarn, &logpanic, NULL, NULL); // Provide 6th param libDir here

VixDiskLib_PrepareForAccess(&connectParams, "MyApp"); // I set vmxSpec to moref=[vmname]. Is this correct? I found locations where they put moid=[some nnumber] there. // We have alredy spoken about vmxSpec update here as discussed then

vixError = VixDiskLib_ConnectEx(&connectParams, TRUE, NULL, NULL, &srcConnection);  // I set vmxSpec to 0 here. If I let the moref=[vmname] in here,  Open later on fails. // Againg provide a sensible vmxSpec here AND provide the MOR of the snapshot you create e.g. snapshot-231 as thrid param

createSnapshot // Create the snapshot before you call ConnectEx as you have to connect to the snapshot as CBT is associated with the snapshot

VirtualMachineConfigInfo ^ vmSnapConfigInfo = (VirtualMachineConfigInfo ^)svcutil->GetDynamicProperty(snapmor, "config"); // This is correct as you access the config of the created snapshot

extract the devicekeys of the devices I want to backup from the info above

VixDiskLib_Open(srcConnection, snapshotdisk->filename, VIXDISKLIB_FLAG_OPEN_READ_ONLY, &diskHandle);

VixDiskLib_GetInfo(diskHandle, &info);

svc->Service->QueryChangedDiskAreas(vmmor, snapmor, snapshotdisk->devicekey, position, changeidprev);  // changeidprev is "*" in my case; ==> here it crashes

// theoretically continue like this:

VixDiskLib_Close(diskHandle);

removeSnapshot(snapmor);

VixDiskLib_Disconnect(srcConnection);

VixDiskLib_EndAccess(&connectParams, "MyApp");     // again, vmxSpec is set to moref=[vmname]

VixDiskLib_Cleanup(&connectParams, &numcleanedup, &numremaining);

VixDiskLib_Exit();

SoapDisconnect

--------------------------------------------------------

 

Maybe something is screwed up because of the things mentioned above. Anyway I will try to get your freeDos VM working on my ESXi 5 test machine. Cannot tell when I will have the time but will try, hopefully at the latest in the weekend. Currently I think resetting CBT should cure the problem. The question is how in your very case.

 

We will see. Please keep updating ...

--

Thomas G.


Viewing all articles
Browse latest Browse all 196326

Trending Articles



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