PowerCLI-Example-Scripts
PowerCLI-Example-Scripts copied to clipboard
Connection time out calling ViewComposerDomainAdministrator_List
I try to use New-HVPool -spec "path/to/json" i follow this article but when i try to create a new Pool i get this error.
my code it's the same of the article:
$hzUser = "user"
$hzPass = "pass"
$hzDomain = "mydomain"
$hzConn = "10.x.x.x"
Get-Module -ListAvailable 'VMware.Hv.Helper' | Import-Module
$hvServer1 = Connect-HVServer -server $hzConn -User $hzUser -Password $hzPass -Domain $hzDomain
$Services1 = $hvServer1.ExtensionData
New-HVPool -spec "path/to/json"
Full code error:
New-HVPool : Failed to create Pool with error: Exception calling "ViewComposerDomainAdministrator_List" with "2"
argument(s): "ExceptionType : VMware.Hv.UnexpectedFault
ErrorMessage : Encountered unexpected error during execution
CauseString : java.net.ConnectException: Connection timed out: connect
CauseStackTrace : System.String[]
ErrorCode :
ErrorAttributes : "
At C:\psscripts\index.ps1:27 char:5
+ New-HVPool -spec $path
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-HVPool
Any reason to get this error?
What version of Horizon Connection Server and Composer do you have installed? Is a valid Composer domain administrator set up?
@freythman my horizon connection server version is: 7.2.0.*, how can i know if i have a valid composer domain administrator? Thanks for your help.
In the Horizon Admin console, browse to View Configuration > Servers > vCenter Servers. Click on your vCenter and then click the Edit... button. Click Edit... again under View Composer Settings. There should be a list of Domains near the bottom.
This assumes you are trying to build a Linked Clone pool. Is that correct?
@freythman in fact i try to make a full clone, but when i use -FullClone flag with another arguments like:
New-HVPool -FullClone -PoolName "FullClone" -PoolDisplayName "FullClonePra" -Description "create full clone" -UserAssignment DEDICATED -Template 'powerCLI-VM-TEMPLATE' -VmFolder 'vmware' -HostOrCluster 'CS-1' -ResourcePool 'CS-1' -Datastores 'datastore1' -NamingMethod PATTERN -NamingPattern 'FullCln1' -SysPrepName vmwarecust -CustType SYS_PREP -NetBiosName adviewdev -DomainAdmin root Create new automated full clone pool with naming method pattern
This is an example from New-HVPool function it self and it doesn't works, returns this error:
New-HVPool : Parameter set cannot be resolved using the specified named parameters. At C:\jobs\horizon\pools\index.ps1:27 char:5 New-HVPool -FullClone -PoolName "test" -PoolDisplayName "test... CategoryInfo : InvalidArgument: (:) [New-HVPool], ParameterBindingException FullyQualifiedErrorId : AmbiguousParameterSet,New-HVPool
I try to use Add-AutomaticPool but i don't have vmware.view.broker installed and i can't find documentation about this, or using New-HVPool. do you know another way to make a full clone desktop pool?
@abel-olguin Can you try again with this JSON, instead? The one in the article you linked is for linked clones.
https://github.com/vmware/PowerCLI-Example-Scripts/blob/master/Modules/VMware.Hv.Helper/Json/Pool/FullClone.json
Then run it again with this command:
New-HVPool -Spec "\path\to\FullClone.json"
If you still have an issue, then add the -WhatIf switch, which runs a validation against all parameters and gives a little more information. Reply back with the information that this generates.
New-HVPool -Spec "\path\to\FullClone.json" -WhatIf | ConvertTo-JSON -Depth 3
Furthermore...
New-HVPool : Parameter set cannot be resolved using the specified named parameters. At C:\jobs\horizon\pools\index.ps1:27 char:5 New-HVPool -FullClone -PoolName "test" -PoolDisplayName "test... CategoryInfo : InvalidArgument: (:) [New-HVPool], ParameterBindingException FullyQualifiedErrorId : AmbiguousParameterSet,New-HVPool
The error in bold is due to either missing or invalid parameters. Using the JSON spec file can help since there are so many parameters.
I try to use Add-AutomaticPool but i don't have vmware.view.broker installed and i can't find documentation about this, or using New-HVPool. do you know another way to make a full clone desktop pool?
The vmware.view.broker cmdlets are being deprecated, but can still be run locally from a Connection Server if you wanted to go that route.