VMware Cloud Community
tschoergez
Leadership
Leadership

unable to execute remcom.exe

Hi,

I try to execute remcom.exe on the erchestrator server to execute commands on other systems. When I run remcom manually inside a console, everything works fine.

But when I run it from orchestrator, I always get a "connection failed" error:

Executing...: c:\remcom.exe
172.21.207.23 /user:administrator /pwd:vmware ipconfig

Input: null

Output

Remote Command Executor

Copyright 2006 The WiseGuyz

Author: Talha Tariq

Initiating Connection to Remote Service . . . Failed

Result -2

My script-part that executes remcom:

var cmd = "c:
remcom.exe

172.21.207.11 /user:administrator /pwd:vmware ipconfig";

System.log("Executing...: "+ cmd);

var myCommand = new Command(cmd);

myCommand.execute(true);

System.log("Input: " + myCommand.input);

System.log("Output " + myCommand.output);

System.log("Result " + myCommand.result);

(the command is of course correct, the syntax is messed up by the forum Smiley Happy )

I get the same error when I try to execute remote commands via the Windows-WMI-plugin (which also uses remcom in background).

Are there some special settings in the orchestrator necessary to get remocom.exe run?

Regards,

joerg

0 Kudos
4 Replies
Burke-
VMware Employee
VMware Employee

Just curious, have you completed the steps to Set javaScript Access to Operating System Commands as described on page 66 of the vCO Admin Guide?

In order to execute commands on your server, this step must be completed and the service restarted...






Visit me at http://www.vcoteam.info for vCenter Orchestrator tips and tutorials Smiley Happy

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you!

Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator
for vRealize Orchestrator tips and tutorials - @TechnicalValues on Twitter
0 Kudos
tschoergez
Leadership
Leadership

yep, the mentioned configuration parameter in vmo.properties is set properly.

Other local commands work, e.g. if my script is:

var cmd = "c:
windows
system32
ipconfig.exe";

System.log("Executing...: "+ cmd);

var myCommand = new Command(cmd);

myCommand.execute(true);

System.log("Input: " + myCommand.input);

System.log("Output " + myCommand.output);

then it works properly:

Executing...: c:\windows\system32\ipconfig.exe

Input: null

Output

Windows IP Configuration

Ethernet adapter Local Area Connection:

Connection-specific DNS Suffix . :

IP Address. . . . . . . . . . . . : 172.21.207.11

Subnet Mask . . . . . . . . . . . : 255.255.0.0

Default Gateway . . . . . . . . . : 172.21.1.1

Result 0

"only" remcom (and psexec) is not working!?

Greetz,

joerg

0 Kudos
Burke-
VMware Employee
VMware Employee

Greeting Joerg,

I just attempted to do the same as you..

When specifying the host with an ip address as shown in the screenshot above, I get the same error as you.. However, when I use the hostname instead of the IP address, I get valid output:

Executing...: c:\remcom.exe
MyvCOHost /user:administrator /pwd:vmware ipconfig

Input: null

Output

Initiating Connection to Remote Service . . . Ok

Windows IP Configuration

Ethernet adapter Local Area Connection:

Connection-specific DNS Suffix . :

IP Address. . . . . . . . . . . . : 192.168.1.32

Subnet Mask . . . . . . . . . . . : 255.255.255.0

Default Gateway . . . . . . . . . : 192.168.1.1

Remote command returned 0(0x0)

Result 0

I have no idea why this is working with the hostname and not the IP.. I have forward and reverse DNS functional for my vCO server as well as the target machine that I executed the script against so that is not the issue... Hopefully using the hostname is an option for you...



Visit me at http://www.vcoteam.info for vCenter Orchestrator tips and tutorials Smiley Happy

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you!

Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator
for vRealize Orchestrator tips and tutorials - @TechnicalValues on Twitter
0 Kudos
tschoergez
Leadership
Leadership

Hm, sounds promising.... but did not work for me Smiley Sad

I tried different DNS settings, workgroup settings, long name, short name, nothing worked.

If I run the command manually, every variation works!?

So I will do further investigation in two directions:

In which way executes the orchestrator server the command? Are there some differences when remcom is executed from a java program?

And:

I will try some network sniffing, if there is any network traffic from remcom yet (I expect: no)...

(btw: I already disabled any firewall on the orchestrator server and the target system)

Cheers,

joerg

0 Kudos