Hi
I´m trying to get all machines using a specific datastore, using Vmware.Vim
Problem is that i cant filter on datastore-name, how?????
My idea was to step thru datastores and then get machines that have that datastore
I´m trying to list the machines with the following, but filter is not working, and i have tried some other combinations..
Dim
vc = New VimClient()
vc.Connect("https://x/sdk")
vc.Login("x", "x")
Dim filter As NameValueCollection = New NameValueCollection()
filter.Add("Datastore", "datastore-27422")
Dim hostLst As List(Of EntityViewBase) = vc.FindEntityViews(GetType(VirtualMachine), Nothing, filter, Nothing)
For Each host As VirtualMachine In hostLst
Console.WriteLine(host.Name)
Next