govmomi icon indicating copy to clipboard operation
govmomi copied to clipboard

[BUG] govc.exe find . -type m -runtime.powerState poweredOn fails on Windows

Open ralfgro opened this issue 8 months ago • 4 comments

Describe the bug I'm trying to transfer govc from Linux to Windows and downloaded latest x86_64 binaries (it's says 0.37.2 on the download page, but v0.36.0 in the Changelog.md)

My existing Linux script breaks on Windows, even the basic example from the docs fails. The find without '-runtime.powerState poweredOn' runs fine.

PS D:\govc\govc_Windows_x86_64> .\govc.exe find . -type m -runtime.powerState poweredOn Usage: D:\govc\govc_Windows_x86_64\govc.exe find [OPTIONS] [ROOT] [KEY VAL]...

Find managed objects.

ROOT can be an inventory path or ManagedObjectReference. ROOT defaults to '.', an alias for the root folder or DC if set.

Optional KEY VAL pairs can be used to filter results against object instance properties. Use the govc 'object.collect' command to view possible object property keys. ...

To Reproduce Just download govc for Windows and run .\govc.exe find . -type m -runtime.powerState poweredOn

Expected behavior

On Linux....

$ govc find . -type m -runtime.powerState poweredOn /TR-Istanbul/vm/STRT2005 /TR-Istanbul/vm/STRT2004 /TR-Istanbul/vm/STRS0100 ...

Affected version

govc donwload from https://github.com/vmware/govmomi/releases/download/v0.37.2/govc_Windows_x86_64.zip

Screenshots/Debug Output If applicable, add screenshots or debug output to help explain your problem.

Additional context Add any other context about the problem here.

ralfgro avatar May 30 '24 17:05 ralfgro