my govc cant see datastore's in clusters
I have multiple datastores in a vsphere 6 setup, some reside in clusters some do not. It seems that govc cannot see any of the datastores inside of a cluster.
[root@localhost bin]# export GOVC_DATASTORE="VMFS_Backups"; govc datastore.ls vSphere Data Protection 6.0 [root@localhost bin]# export GOVC_DATASTORE="VMFS_DEV_001"; govc datastore.ls Error: datastore 'VMFS_DEV_001' not found
I've dredged the doc's and google and cannot find any config or options to specify clusters.
Thanks
Can you confirm the datastore is not present in the list of datastores either? It can be nested in a folder as well as being a top level datastore.
You can check by running the following (output below is against ESX host directly):
$ govc ls datastore
/ha-datacenter/datastore/datastore1
If it doesn't show up here either, I have a suspicion what the issue might be.
We have done much of our testing against ESX directly and not against the more complex vCenter setups, which is why you see some of these issues. Please keep them coming, so we can fix them one by one :)
Hi Pietern,
Thanks for replying super fast.
No it doesnt show up:
[root@localhost bin]# govc ls datastore
/SAApps/vm
/SAApps/network
/SAApps/host
/SAApps/datastore
Hmm, that output is odd: I would have expected it to list the contents of the "datastore" folder. Can you try specifying the full path to the datastore folder (/SAApps/datastore) and see if the output is any different?
its the same output
[root@localhost bin]# govc ls /SAApps/datastore
/SAApps/vm
/SAApps/network
/SAApps/host
/SAApps/datastore
I can confirm the issue with the latest build of govc (0.4.0). PowerCLI's Get-Datastore lists all datastores, while govc ls prints nothing except the four directories. The datastores I expected to see are part of couple datastore clusters.
This should be fixed by c69e9bc (included in the 0.5.0 release)
The utility is seemingly unable to deal with passwords that have the '@' symbol in them. Even attempts to escape with %40 result in a message that says invalid URL escape "%40"
Any way to get around this?
Use GOVC_PASSWORD, see https://github.com/vmware/govmomi/blob/master/govc/README.md#usage.
I'm going to lock this issue because it has been closed for 30 days. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.