bseltz-cohesity / scripts

Cohesity REST API examples in PowerShell and Python
Apache License 2.0
102 stars 41 forks source link

Unable to find cluster #114

Closed pandaflourishingfish closed 1 year ago

pandaflourishingfish commented 1 year ago

I am trying to use the CloneVM script to clone a VM. However, the script keeps complaining that it can't find the host/cluster I give it. I've verified that the cluster name is valid by running "get-cluster" in PowerCLI and copy/pasting the name into the script. I've also tried with the name of a VMhost, but I get the same error. I did verify that cloning a VM works in the GUI.

Capture

bseltz-cohesity commented 1 year ago

I have validated that the script works as expected. The Datacenter names and Cluster names are visible in the UI when selecting a resource group

Screenshot 2023-07-17 at 3 00 04 PM
pandaflourishingfish commented 1 year ago

It works for me in other sites without issue, this one is just proving to be...difficult. I never thought of asking the Cohesity GUI for the values, thanks.

I did confirm they match though.

bseltz-cohesity commented 1 year ago

Try adding a line to the script, between lines 87 and 88:

$resourcePoolId

then run the script and tell me if it displays a number or nothing or more than one number

pandaflourishingfish commented 1 year ago

Sorry for the delay, we ran that command and nothing changed, no output, just the same “host/cluster” not found

bseltz-cohesity commented 1 year ago

Fixed the issue with the cluster/host not found error due to unexpected sorting in object hierarchy