Quantcast
Channel: VMware Communities : All Content - vSphere Management SDK
Viewing all articles
Browse latest Browse all 1860

Getting CBT Change ID using vSphere API

$
0
0

Hi,

 

I am using following vSphere API to get the changed areas

 

vimPortType.queryChangedDiskAreas()

 

the change ID is passed as parameter to this API and I am giving as "*" initially.

Now for incremental changes I want to execute this API with a change ID other than "*".

Using power CLI I can get it by executing following command.

 

PS:> $vm = Get-VM -Name {VM_NAME}

PS:> $vmview = $vm | Get-View 

PS:> $newSnap = $vm | New-Snapshot -Name "SnapShotName" 

PS:> $newSnapview = $newSnap | Get-View 

PS:> $changes=$vmview.QueryChangedDiskAreas($newSnapview.MoRef, 2000, 0, "*")

PS:> $thischange=($newsnapview.Config.Hardware.Device | where { $_.Key -eq 2000 }).backing.changeid

PS:> echo $thischange

52 dd 70 e2 95 fd d1 2b-4c eb aa c3 90 b2 ce 3d/2


I am looking for the vSphere SDK API to get the change ID like this, any help would be highly appreciated.


Viewing all articles
Browse latest Browse all 1860

Trending Articles



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