
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
How to query vmware Vi to sort datastores freespaces?
Hello I really need an urgent help on that topic. I've tried to query vmware which suppose to get sort datastores freespaces and it names correponded names, but without any succes. I thought the query suppose to look like that:
propsType - Datastore
propsPathSet - info.name, sort-object.freesSpaceGB
Didn't Work for me as I've said. Do you guys have any idea where I've been mistaken?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Of course I used Advance Search Operation to accomplish that.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
There is a sample flow called "Get Freespace on Datastores" in the VMware Virtual Infrastructure and vSphere integration that shows you how to get freespace of a datastore.
The "sort-object.freesSpaceGB" is not a valid property for the Datastore object. Instead you'll want to specify "info.freespace". That property will be the freespace in bytes that is available on the datastore.
Dan.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
how to fetch Memory/CPU hot add limit for virtual machine by using 'Advanced search' ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
I think what you try to accomplish is to get the free space in your Datastore
summary.freeSpace this will give you the free space in bytes.
http://pubs.vmware.com/vsphere-50/topic/com.vmware.wssdk.apiref.doc_50/vim.Datastore.Summary.html
Mahmoud Ibrahim
https://www.itmthoughts.com
New version of Mahmoudthoughts witten by other IT experts, if you want to share tips and tricks you are invited to join and write your own articles.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
how in additional I can get claster name where this datastore is nested?
In wine wisdom!
In the beer force!
In water, the microbes...


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
The information you are looking for is located in this link
http://pubs.vmware.com/vsphere-50/index.jsp?topic=%2Fcom.vmware.wssdk.apiref.doc_50%2Fvim.Datastore.html
I assume it is Datastore.host
Regards,
Mahmoud Ibrahim

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Thanks! And additional question - is it posible to limit return result only for one datastore I am intresting (as for now its return for all datastores in such cluster)? (I have claster name and datastore name as input)
In wine wisdom!
In the beer force!
In water, the microbes...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Did you have any answer to your question?
I also have many (MANY!) Datastores on my Infrastructure and I only need to know the freespace on a given DataStore.
I already have the datastore name, Is there a way to get the freespace without querying all the datastores?