Giter VIP home page Giter VIP logo

Comments (7)

D02037645 avatar D02037645 commented on August 16, 2024

I had a similar Issue. Very frustrating (but fun).

I had to modify (2) lines in the VMware.HV.Helper.psm1 file.


ERROR 1: "No hostOrCluster found with Name: [$hostOrCluster]"

[LINE 4817, Didn't Work]
$hostClusterList = ($vmFolder_helper.HostOrCluster_GetHostOrClusterTree($services,$vmobject.datacenter)).treeContainer.children.info

[LINE 4817, Fixed]
$hostClusterList = ($vmFolder_helper.HostOrCluster_GetHostOrClusterTree($services, $vmobject.datacenter)).treeContainer.children.treecontainer.children.info


ERROR 2: "Missing value for non-optional field accessGroup"

[LINE 4626, Didn't Work]
$ag = $accessGroup_client.AccessGroup_List($services) | Where-Object { $_.base.name -eq $accessGroup }

[LINE 4626, Fixed]
$ag = $accessGroup_client.AccessGroup_List($services).Children | Where-Object { $_.base.name -eq $accessGroup }

from powercli-example-scripts.

maniaX1 avatar maniaX1 commented on August 16, 2024

I have feeling that Resource Pools haven't been solved yet. When I use -ResourcePool "VDI" then I receive error:
New-HVPool : Failed to create Pool with error: No hostOrCluster found with Name: [VDI]
At line:1 char:1

  • New-HVPool -LinkedClone -Vcenter $VC `
  •   + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
      + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-HVPool
    
    

When I use value Cluster1 which is root then it works. Parameter -HostOrCluster works fine.

from powercli-example-scripts.

mtelvers avatar mtelvers commented on August 16, 2024

@maniaX1 please can you let me know your Resource Pool and host/cluster structure?

from powercli-example-scripts.

maniaX1 avatar maniaX1 commented on August 16, 2024

/Site/host/Cluster1/Resources/VDI - that's what I see in Horizon on resource pool. If I use -HostOrCluster Cluster1 -ResourcePool VDI then I got the error which I posted above.

from powercli-example-scripts.

mtelvers avatar mtelvers commented on August 16, 2024

@maniaX1 Your structure appears to be similar to mine so I'm not sure why this doesn't work. I did see in the error message that you posted it says "No hostOrCluster found with Name: [VDI]" where from your command line -HostOrCluster Cluster1 -ResourcePool VDI I'd expect that to say either "... Name: [Cluster1]" or "No Resource Pool ...". Please can you check that for me?

In order to try to diagnose this further I have quickly pulled together a function Get-HVResourceStructure which will output your resource pool structure tree for further diagnostics.

from powercli-example-scripts.

maniaX1 avatar maniaX1 commented on August 16, 2024

@mtelvers Well, after reading this whole thread carefully I used this solution from @elavarec :
Solution : for this parameter work, I must change the line 4626 like this :
$ag = $accessGroup_client.AccessGroup_List($services).Children| Where-Object { $_.base.name -eq $accessGroup }

I mixed it with solution from @D02037645 before which tells something about different parameter.

from powercli-example-scripts.

mtelvers avatar mtelvers commented on August 16, 2024

@maniaX1 I'm glad that you have it working.

PR #131 altered that line completely as .children only fixes it under certain circumstances.

from powercli-example-scripts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.