get_datastore_vm_usage
Identify which VMs consume space on a datastore, ranked largest first, to determine if it is filling up and who is using the space.
Instructions
[READ] Which VMs take the space on one datastore, largest first.
Use this for "is this datastore filling up, and who is using it?". datastore_name comes from list_all_datastores. Reads vCenter's own per-VM accounting (storage.perDatastoreUsage), so it is space on disk, not the provisioned VMDK sizes browse_datastore shows.
Returns {datastore: {name, type, total_gb, used_gb, free_gb, usage_pct}, items, returned, total, truncated, attributed_gb, unattributed_gb, unmeasured_vms, note}. Each item: name, vm_id, template, committed_gb (on disk), uncommitted_gb (thin headroom it may still grow into), unshared_gb, measured_at. unattributed_gb is used space no VM accounts for: unregistered VMs, orphaned disks, ISOs; find those files with browse_datastore. unmeasured_vms list the datastore but have no usage row, so their space is unknown, not zero.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top_n | No | How many VMs to return, largest committed first (default 10). | |
| target | No | Optional vCenter/ESXi target name from config. | |
| datastore_name | Yes | Datastore name exactly as shown in vCenter. |