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
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
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.
Can you try telnet via CMD or a linux shell? This will make sure the window stays open.
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
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.
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.
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
Ohh I misunderstood.
List of supported OSs is not for the place where you have installed powershell/powercli .? And it is for guest OSs .?
That is correct, the guest OS
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference