Issue with retrieving the memory and quiesce status of snapshot on a Virtual Machine in VMware Cloud Director UI
search cancel

Issue with retrieving the memory and quiesce status of snapshot on a Virtual Machine in VMware Cloud Director UI

book

Article ID: 398810

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • When you take a  snapshot of a Virtual Machine(VM) in VMware Cloud Director(VCD) checking the option Snapshot the memory of the virtual machine, VCD UI do not show any features of memory or quiesce.
  • Even when you are using OpenAPI, the values seem to be returning false  through a GET request  to retrieve the memory and quiesce status of a snapshot. Below provided is the GET request sent from VCD:

    https://<vcd-fqdn>/cloudapi/1.0.0/vm/urn:vcloud:vm:d4ec####-####-####-####-############/snapshots?page=1&pageSize=128&links=true

Environment

VMware Cloud Director 10.6.1

Cause

So this is an expected behavior in this current version of VCD. VCD is sending this information to vCenter and it is persisting it, but when querying back the same snapshot details from vCenter, vCenter does not return the data of the memory snapshoted, hence the field display as false in VCD.

Resolution

As mentioned above this is an expected behavior in current version of VCD. VCD won't be returning the exact value of the memory or the quiesce state in VM snapshot, but we can use field state from VCD API to point out active snapshots. Below given is a situation of a GET request  to retrieve the memory and quiesce status of a VM snapshot.

The VCD GET request for a VM snapshot:

https://<vcd-fqdn>/cloudapi/1.0.0/vm/urn:vcloud:vm:d4ec####-####-####-####-############/snapshots?page=1&pageSize=128&links=true

The response to VCD API GET request is:

{
    "resultTotal": 1,
    "pageCount": 1,
    "page": 1,
    "pageSize": 128,
    "associations": null,
    "values": [
        {
            "id": "9cf5####-####-####-####-############",
            "name": "<Snapshot_Name>",
            "isCurrent": true,
            "state": "POWERED_ON",
            "storageConsumedMb": ####,
            "dateCreated": "yyyy-mm-ddThh:mm:ss",
            "memory": false,
            "quiesce": false,
            "vappSnapshotId": null,
            "parentSnapshotId": null,
            "vm": {
                "name": "<VM_Name>",
                "id": "urn:vcloud:vm:d4ec####-####-####-####-############"
            },
            "type": "User"
        }
    ]
}

From the above GET request and we can determine while creating the snapshot if Snapshot the memory of the virtual machine is enabled and the VM is POWERED ON, the active snapshot can be determined using the value of state which shows POWERED_ON.