VMware {code} Community
koupr01
Contributor
Contributor
Jump to solution

cant get changed block tracking working on my ESXi (changeId unse

Hello,

I am developing a backup application for the ESXi and have problems with enabling the changed block tracking. The problem I have is, that I can't obtain changeId for my virtual disks. In the attached screenshots you can see that my vritual machine is version 7, I have ctkEnabled flags set and in the MOB on my ESXi, I can see that changeTrackingEnabled is true, however when I browse down to the backing info for my virtual disk in the MOB,I can see that the value for changeId is "unset" as you can see in the screenshot. So, doesn't anybody know how to get the changeId to contain some meaningful value? Can you see it set in your environment?Please, note that before trying to obtain the changeId value I did take a snapshot and I did go throught the stun-unstun cycle.

Thanks for answers,

Prema

0 Kudos
1 Solution

Accepted Solutions
jeveenj
Enthusiast
Enthusiast
Jump to solution

Hi Prema,

After creating the snapshot, you need to traverse as mentioned below in MOB:

Go to Virtialmachine -> snapshot -> currentSnapshot -> config -> hardware -> device (select Virtual Disk) -> backing -> changeId

Here you can find the “changeId” of the virtual disk

Hope this helps.

-If you found this information useful, please consider awarding points for Correct or Helpful.

View solution in original post

0 Kudos
7 Replies
jeveenj
Enthusiast
Enthusiast
Jump to solution

Hi Prema,

After creating the snapshot, you need to traverse as mentioned below in MOB:

Go to Virtialmachine -> snapshot -> currentSnapshot -> config -> hardware -> device (select Virtual Disk) -> backing -> changeId

Here you can find the “changeId” of the virtual disk

Hope this helps.

-If you found this information useful, please consider awarding points for Correct or Helpful.
0 Kudos
koupr01
Contributor
Contributor
Jump to solution

Hi Jeveenj,

You are right, I've already figured that out, but still - thanks!

Prema

0 Kudos
rustylife
Contributor
Contributor
Jump to solution

I am just curious what APIs do you use to get data from ESXi

0 Kudos
koupr01
Contributor
Contributor
Jump to solution

Hi,

I am using QueryChangedDiskAreas from the vSphere API to get the information about position of changed areas and then read them using the VixDiskLib_Read from VDDK API. Since vSphere API is only Java/C# and VDDK API is only C/C++ you really have to glue it together. Currently I have a small C application which gets all necessary info as arguments (and a file which contains data, returned from QueryChangedDiskAreas) and call it from my vSphere app. There are certainly other ways how to glue it though (like calling C API from Java).

cheers,

Prema

0 Kudos
rustylife
Contributor
Contributor
Jump to solution

Thanks,

I am actually doing the same thing, and my code is gonna be open source

QueryChangedDiskAreas requires Snapshot mor, how do you provide your ESXi with necessary snapshot(backup) which is stored on backup server where your application runs

0 Kudos
rustylife
Contributor
Contributor
Jump to solution

scratch that, ^)

I got it

0 Kudos
BizCON_Alex
Contributor
Contributor
Jump to solution

dear Rusty,

I had developed a program to do it. however, when I key in the free license of ESXi 4.1, it can't work anymore.

What license did you applied such that you can make it work in ESXi?

thanks.

BizCON AlexLi

0 Kudos