Find Snapshot Creation Date of a vCloud Director VM

Last month while working on a customer ticket, I came across a request from customer where he wanted to know snapshot creation date for one of his VM as he can not find this detail from vCD UI.

To confirm this, I logged into vCD and navigated to my test lab to see what are the information available.

On navigating through vCD I found that vCD only tells that whether or not snapshot exists for a vApp/VM.

You can see in below screenshot in top right corner that there is no option for selection snapshot creation date.

snap-1.PNG

On drilling down to VM level also, I did not found any option for checking snapshot creation date.

snap-2.PNG

After banging my head for 20 minutes or so, I decided to use API calls as many times I have found some info which is not visible in vCD GUI. And the trick worked for me. I was able to pull the snapshot creation date via API calls.

The steps for doing so is summarized as below:

1: Generate session key/Auth token

2: Get Org UUID

By executing above query, you will get href of your org.

3: Get Org VDC UUID

The above query will return you a list of Org vDC’s (in case if you have more than one VDC)

My VM exists in VDC ‘Manish-Lab-DontDel’ so I used the corresponding VDC href in my next query

4: Find VM UUID

5: Find Snapshot details

Now to get snapshot info, append /snapshotSection at the end of the url which you got in previous query

You will get an XML output which contains the snapshot creation date

snap-3

 

Leave a Reply