VMware Networking Community
asharma911
Contributor
Contributor

HCX POWERCLI Issue

Hello Guys,

I am trying to run Get-HCX**** commands via powercli, but it throws an error. Any idea to fix it? See attachment for an error.

Powercli version is 11.5 and HCX module is already there.

Regards,
Ankit
17 Replies
LucD
Leadership
Leadership

Did your Connect-HcxServer work without an issue?

Does it show up in $global:HcxServers?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
asharma911
Contributor
Contributor

Sorry for responding late. I dont see any output when I run $globalHCXServers. Surprisingly, I am able to run connect-hcx server but not able to run any get commands against HCX

Reply
0 Kudos
LucD
Leadership
Leadership

Is there any object returned when you run the Connect-HcxServer cmdlet?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
asharma911
Contributor
Contributor

Yes, it does. I am confused because only Get-commands are not running. Rest look good. Any thoughts? See screenshot.

pastedImage_0.png

Reply
0 Kudos
LucD
Leadership
Leadership

Does it return anything when you use the Server parameter?

Get-HCXInterconnectStatus -Server $global:$DefaultHCXServers


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
asharma911
Contributor
Contributor

No, it did not. See output below. Any other help ?

Error-2.PNG

Reply
0 Kudos
LucD
Leadership
Leadership

That seems to indicate that your Connect-HCXServer didn't work.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
asharma911
Contributor
Contributor

Not sure what does that mean. But, liked I mentioned earlier, all commands are working except Get ones. Seems like even after connect, it doesn't store in defaulthcxserveror defaulthcxservers variable. Any suggestion to fix or workaround ?

pastedImage_1.png

Reply
0 Kudos
LucD
Leadership
Leadership

Can you also check the variable $DefaultHCXServers?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
asharma911
Contributor
Contributor

Neither throwing an error nor any output.pastedImage_1.png

Reply
0 Kudos
LucD
Leadership
Leadership

Just to make sure there is no HCX related variable after a successful Connect-HCXServer, do a

Get-Variable -Name *HCX*


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
asharma911
Contributor
Contributor

pastedImage_0.png

No HCX related variable stored in defaulthcxservers.

Reply
0 Kudos
LucD
Leadership
Leadership

Then I'm at a loss I'm afraid.

You could try to replay Kyle's cmdlets he does in his Getting Started with the HCX Module post.

If that doesn't work either, I think you should consider opening an SR.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
asharma911
Contributor
Contributor

Any command or way to manually update or add or modify $GlobalHCXServers variable ?

Reply
0 Kudos
LucD
Leadership
Leadership

Not that I know off, the variable is normally set through a successful Connect-HCXServer cmdlet afaik.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

grosas
Community Manager
Community Manager

There‘s a communities page for HCX​ that you can move this to. 

Does your configuration already have a Service Mesh? Or only an HCX Manager?

_____________________________________
Gabe Rosas (VMware HCX team at VMware)
Blog: hcx.design
LinkedIn: /in/gaberosas
Twitter: gabe_rosas
Reply
0 Kudos
JTwice
Contributor
Contributor

Could this be a problem between PS, PCLI, and the HCX Module? Are you able to try on another machine with a fresh install of these 3 components. I recall having some weirdness with HCX and PCLI. I think I stripped it all out and reinstalled it all.

Reply
0 Kudos