OS diskSizeGB is not showing when VM deallocated state running from api

suresh Reddy 41 Reputation points
2023-09-29T05:12:06.95+00:00

API to list the VM info, and we found that if the VM is in deallocated status, the os_disk_size_gb is empty, we just want to confirm if this is by design ? If not please share that where is blocking?

Also confirm me if we have any pubic document availableif its by design ?

API running Compute managemen

Disks - Get - REST API (Azure Compute) | Microsoft Learn [learn.microsoft.com]

VM running
"deleteOption": "Delete",
            "diskSizeGB": 30
===============================
VM deallocated

},             "deleteOption": "Delete"           },
VM running state : 

"osType": "Linux",
            "name": "ubuntu22.04_OsDisk_1_4XXXXXXXXX",
            "createOption": "FromImage",
            "caching": "ReadWrite",
            "managedDisk": {
              "storageAccountType": "Standard_LRS",
              "id": "/subscriptions/3XXXXXXXXXXX/resourceGroups/CENTRALINDIA/providers/Microsoft.Compute/disks/ubuntu22.04_OsDisk_1_4XXXXXXXXXXXXXXXX"
            },
            "deleteOption": "Delete",
            "diskSizeGB": 30

VM deallocated state:

"osDisk": {
            "osType": "Linux",
            "name": "ubuntu18.04_OsDisk_1_f1XXXXXXXXXXX",
            "createOption": "FromImage",
            "caching": "ReadWrite",
            "managedDisk": {
              "id": "/subscriptions/3XXXXXXXXX/resourceGroups/CENTRALINDIA/providers/Microsoft.Compute/disks/ubuntu18.04_OsDisk_1_fXXXXXXXXXXXXXX"
            },
            "deleteOption": "Delete"
          },
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,585 questions
{count} votes

1 answer

Sort by: Most helpful
  1. shiva patpi 13,171 Reputation points Microsoft Employee
    2023-09-29T18:16:58.1166667+00:00

    @suresh Reddy

    This seems to be an expected one i.e. by design w.r.t API , I was also able to repro the same:

    One of the git hub issue discussion was revealing the same fact:

    https://github.com/Azure/azure-libraries-for-net/issues/54

    One of the discussion snippet: (See the reason highlighted)

    User's image

    Regards,

    Shiva.

    1 person found this answer helpful.