govmomi icon indicating copy to clipboard operation
govmomi copied to clipboard

my govc cant see datastore's in clusters

Open manningcarl opened this issue 11 years ago • 10 comments

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

manningcarl avatar May 01 '15 14:05 manningcarl

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

pietern avatar May 01 '15 15:05 pietern

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 :)

pietern avatar May 01 '15 15:05 pietern

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

manningcarl avatar May 01 '15 15:05 manningcarl

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?

pietern avatar May 01 '15 15:05 pietern

its the same output [root@localhost bin]# govc ls /SAApps/datastore /SAApps/vm /SAApps/network /SAApps/host /SAApps/datastore

manningcarl avatar May 01 '15 15:05 manningcarl

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.

roolebo avatar Mar 16 '16 12:03 roolebo

This should be fixed by c69e9bc (included in the 0.5.0 release)

dougm avatar Apr 05 '16 23:04 dougm

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?

roncoejr avatar Jun 11 '18 15:06 roncoejr

Use GOVC_PASSWORD, see https://github.com/vmware/govmomi/blob/master/govc/README.md#usage.

pietern avatar Jun 11 '18 15:06 pietern

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.

github-actions[bot] avatar Mar 17 '25 16:03 github-actions[bot]