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
Remote Command Executor
Initiating Connection to Remote Service . . . Failed
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 )
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
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
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
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
"only" remcom (and psexec) is not working!?
Greetz,
joerg
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
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)
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
Hm, sounds promising.... but did not work for me
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