VMware Cloud Community
NikunjB
Contributor
Contributor

Invoke-VMscript on ESX host port 902

Hi,

I am using invoke-vmscript to run certain commands on my VMs which have linux based guest os's.

I noticed that, invoke-vmscipt was not working correctly.

I looked at the documentation for the commandlet. There it was written that port 902 on ESX must be open.

I then checked for its open state. It wasnt open.

I logged in to my ESX through ssh. and tried to run this command.

"esxcfg-firewall -o port,protocol,direction,service_name"
where port=902, protocol=tcp, direction=in, service_name=ssh_client

http://answers.oreilly.com/topic/1627-how-to-open-and-close-a-firewall-port-via-the-console-on-a-vmw...


But this isnt working.

Any pointers.?

Thanks
Nikunj
Reply
0 Kudos
9 Replies
LucD
Leadership
Leadership

Are you sure that port 902 is closed ?

Normally that port is open, unless you explicitely closed it.

The script in my Will Invoke-VMScript work ? post will check all requirements.


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

Reply
0 Kudos
NikunjB
Contributor
Contributor

I followed this link here.

http://www.wfu.edu/~borwicjh/howto/port-test.html

using putty I gave my esx host name ( say A )and checked 'telnet' and in 'port' I gave '902'.

The window was instantly going away.

While with other esx host ( say B )on which invoke-vmscript was working fine. The  window displayed some kind of text and then goes away.

So I believe that on on A, the port is closed. !?

mymachine :

Win2k8 server, powershell 2.0 , powercli 4.1.

esx host:

4.1

guest VM os:

sles10 32bit.

Reply
0 Kudos
nielse
Expert
Expert

Can you try telnet via CMD or a linux shell? This will make sure the window stays open.

@nielsengelen - http://foonet.be - VCP4/5
Reply
0 Kudos
LucD
Leadership
Leadership

Did you try my script ?

What did it say for port 902 ?

In the script you find how to test ports from within PS


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

Reply
0 Kudos
NikunjB
Contributor
Contributor

Yes,

I tried with linux shell. telnet is working on port 902.

{{{

# telnet esx.mydomain.com 902

Trying xx.xx.xx.xx..
Connected to esx.mydomain.com.
Escape character is '^]'.
220 VMware Authentication Daemon Version 1.10: SSL Required, ServerDaemonProtocol:SOAP, MKSDisplayProtocol:VNC , VMXARGS supported

}}}

I will check with LucD's function once.

Reply
0 Kudos
NikunjB
Contributor
Contributor

I am replying bit late.

I ran LucD's script.

{{{

PS C:\VaS_Builds> Test-InvokeVMScript -VM $vm -Detail


OK                          : False
VM                          : SLES10_2
PoweredOn                   : True
X86Engine                   : True
ToolsInstalled              : True
Port902Open                 : True
FolderReadAccess            : True
PrivilegeConsoleInteraction : True
SupportedOS                 : False

}}}

But when I looked into invoke-vmscript's reference for powercli 4.1.

http://www.vmware.com/support/developer/PowerCLI/PowerCLI41/html/Invoke-VMScript.html

There is no information about supported OSs. but its there for powercli 5.0:

{{{

Windows XP 32 SP3, Windows Server 2003 32bit SP2, Windows Server  2003 64bit SP2, Windows 7 64 bit, Windows Server 2008 R2 64bit and  Redhat Enterprise 5 operating systems.

}}}

I am using Windows server 2008 SP2, 64bit. I am running powershell in 32bit mode.

Reply
0 Kudos
LucD
Leadership
Leadership

That information can be found in the PowerCLI 4.1 Release Notes.

The $false for SupportedOS is because SLES is not supported.


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

Reply
0 Kudos
NikunjB
Contributor
Contributor

Ohh I misunderstood.

List of supported OSs is not for the place where you have installed powershell/powercli .?  And it is for guest OSs .?

Reply
0 Kudos
LucD
Leadership
Leadership

That is correct, the guest OS


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

Reply
0 Kudos