Hi All,
I am new to ESXi and also to Vsphere PowerCLI. I have few question about the vSphere CLI/PowerCLI. I really appreciate if you can help me to find out the answer for my below doubts.
#1. Can we connect the vSphere PowerCLI (installed on Windows7 ) to ESXi server remotely using port forwarding ?
[Currently vSsphere Client , is working well & able to connect the ESXi to manage the VM, over port forwarding (Local port : 127.0.0.1:443 & 127.0.0.1:902 , Remote Port :ESXi IP:443 & ESXi IP:902) . In my case, I need to do Port forwarding for 2 different Network over RSG ( vendor + customer site ) ]
#2. If yes ,what are the port forwarding setting for vSphere Power CLI.?
Please give the details if any file need to change for ports.
#3 What is the default port for vSphere Power CLI to communicate with ESXi.
With the Connect-VIServer cmdlet you can connect to any vSphere server (vCenter or ESXi).
On the Connect-VIServer you can specify a Port and the Protocol (http or https).
The default protocol is https, so it's port 443 by default.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
HI LucD,
Thanks for reply. With me the Problem is the vSphere CLI installed in the Windows System which is not directly connected to the ESXi server, in other words both Windows & ESXi are on different network. I am not directly able to reach the ESXi server.
For instance to connect the ESXi server thought "ssh " , first I need to connect intermediate network element A and then need to connect B , then the ESXi IPs are visible to me.
[eg.
Windows putty/scecureCRT> ssh "A"
A>ssh "B"
B> ssh Esxi server
ESXi ~#
]
I connected the vSphere Client based on above scenario over port forwarding.
Now considering the scenario I need to connect my vSphere PowerCLI to ESXi and if its really support to connect to remote server.
I tried to use New-SshSession and able to login to first intermediate node but failed to ssh second intermediate node.
Any suggestion will me most welcome.
If your vSphere client is working with the port forwarding, then the Connect-VIserver cmdlet should work as well with the local address.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference