How to get VmDiskFileInfo.CapacityKb from .vmdk file? #3459
Replies: 3 comments
-
Howdy 🖐 SoaringAnecdotalBear ! Thank you for your interest in this project. We value your feedback and will respond soon. If you want to contribute to this project, please make yourself familiar with the |
Beta Was this translation helpful? Give feedback.
-
That TODO is part of the simulator, do you need that or the client side against a real vCenter? % govc device.info -dump -vm MinIO disk-*
...
BaseVirtualDevice: &types.VirtualDisk{
...
CapacityInKB: 16777216,
... Or you can use HostDatastoreBrowser to get a .vmdk's capacity directly, for example: % govc datastore.ls -l MinIO/*.vmdk
16.0GB Wed Mar 13 17:31:51 2024 MinIO.vmdk
% govc datastore.ls -json -l MinIO/*.vmdk
[
{
"datastore": {
"type": "Datastore",
"value": "datastore-12"
},
"folderPath": "[datastore1] MinIO/",
"file": [
{
"path": "MinIO.vmdk",
"fileSize": 17179869184,
"modification": "2024-03-13T17:31:51Z",
"owner": "root"
}
]
}
] |
Beta Was this translation helpful? Give feedback.
-
@dougm thks for your reply
|
Beta Was this translation helpful? Give feedback.
-
How to get VmDiskFileInfo.CapacityKb from .vmdk file?
I found a TODO here(host_datastore_browser.go 89-91). Does it means Govmomi is unable to get VmDiskFileInfo.CapacityKb?
Or is there a other way to get VmDiskFileInfo.CapacityKb?
thanks!
Beta Was this translation helpful? Give feedback.
All reactions