VM showing disk size is 0 MB

Reading Time: 2 minutes

Some time ago, I was doing some clean up on VMs that have attached an image file, when I found a particular VM with an strange behavior, each disk from the VM (local and RDM disks) was showing 0 MB of disk size:

So, what I did?

First of all, I checked the guest OS and verified that it was up and running. So I was wondering how the guest OS seems correct but vSphere Web Client (I refreshed several times the browser) was showing no space in all disks and I verified in the Datastores that the .vmdk files were there.

Investigation

I found in the Events tab for this VM, an error about a snapshot a few weeks ago that it wasn’t successfully created (from the 3rd party Software), so, maybe this problem is related to the snapshots?

I verified the .vmx file configuration and check that was correct, also reviewing each descriptor file (vmdk), they were pointing to the disk data (vmdk-flat) that really exists in the datastore, so it couldn’t be a problem related to snapshots.

Anyway, I logged out and logged in just to verify that it wasn’t a problem of the vSphere Web client but it showed the same (no luck), all disks (LUNs and disks) attached to that VM showed 0 MB .

Conclusion

Well, it’s an easy solution, if you power-off the VM, unregister and register the VM in the vCenter then… it works! The VM appeared as usual (showing the allocated space for each disk).

Hence, which was the error? I can’t assure which was the error but maybe something happened to the .vmx file and unregistering and registering the VM again “repaired” the VM configuration file.

One thought on “VM showing disk size is 0 MB

  1. HI,
    Really thanks for description of this solution!
    Help me a lot yesterday , LoL…
    Optional: just move vm btw hosts make same effect.

Leave a Reply

Your email address will not be published. Required fields are marked *