0 Replies Latest reply on Feb 12, 2018 4:58 AM by ChandraSekhar195

    Data contained in VirtualMachineSnapshot managed object is not as per documented.

    ChandraSekhar195 Novice

      Hi Team,

      The *VirtualMachineSnapshot* managed object documentation states that, it will contain *Config* information at the time of taking snapshot but looks like it is also including the data used in the process to take a snapshot.

      EX:

      I have VM with *VM.vmdk* and *VM_1.vmdk* as disks. The VM does not have any snapshots.

      After I take the snapshot, and query for the information of snapshot through *RetrieveProperties* api call specifying the *snapshot refId*, the information received as below

      <backing xsi:type="VirtualDiskFlatVer2BackingInfo">

                             <fileName>[Datastore] VM/VM_000002.vmdk</fileName>

                              <datastore type="Datastore">DATASTORE</datastore>

                              <backingObjectId>41-2000-0</backingObjectId>

                              <diskMode>persistent</diskMode>

                              <split>false</split>

                              <writeThrough>false</writeThrough>

                              <thinProvisioned>false</thinProvisioned>

                              <eagerlyScrub>true</eagerlyScrub>

                              <uuid>6000C295-fc87-2682-1271-4cb84acee4b5</uuid>

                              <contentId>d6e2d4dd3c719616943fb561ec3a6348</contentId>

                              <changeId>52 00 99 6d 7e b9 3b 89-0a 8f 83 39 d9 cc 09 d2/112</changeId>

                              <parent>

                                <fileName>[Datastore] VM/VM.vmdk</fileName>

                                <datastore type="Datastore">DATASTORE</datastore>

                                <backingObjectId>41-2000-1</backingObjectId>

                                <diskMode>persistent</diskMode>

                                <thinProvisioned>false</thinProvisioned>

                                <eagerlyScrub>true</eagerlyScrub>

                                <uuid>6000C295-fc87-2682-1271-4cb84acee4b5</uuid>

                                <contentId>e51339d5502304e6209c47f10bc5e363</contentId>

                              </parent>

                              <deltaDiskFormat>redoLogFormat</deltaDiskFormat>

                              <digestEnabled>false</digestEnabled>

                            </backing>

       

      [Datastore] VM/VM_000002.vmdk -- this disk is neither attached not present in the datastore. the Snapshot disk attached to VM is *VM_000001.vmdk*. 

      Our expectation of the data is as below

      <backing xsi:type="VirtualDiskFlatVer2BackingInfo">

                                <fileName>[Datastore] VM/VM.vmdk</fileName>

                                <datastore type="Datastore">DATASTORE</datastore>

                                <backingObjectId>41-2000-1</backingObjectId>

                                <diskMode>persistent</diskMode>

                                <thinProvisioned>false</thinProvisioned>

                                <eagerlyScrub>true</eagerlyScrub>

                                <uuid>6000C295-fc87-2682-1271-4cb84acee4b5</uuid>

                                <contentId>e51339d5502304e6209c47f10bc5e363</contentId>

                              </parent>

                              <deltaDiskFormat>redoLogFormat</deltaDiskFormat>

                              <digestEnabled>false</digestEnabled>

                            </backing>

       

      Could you calrify on this? 

       

      1. Can we rely on the *VirtualMachineSnapshot* managed Object? This is required to map the Disk Name and Snapshot/changeID with it.

      2. If not, is there any other alternate API to get the same information?

      3. Is the documented behaviro working fine? https://code.vmware.com/web/dp/doc/preview?id=1503#/doc/vim.vm.Snapshot.html

      4. This we are observing when the machine is in ON state. 

       

      Thanks,

      Chandra,