4

I am trying to start a selenium grid node on a local vm (running Windows 7) by using a call from the command line on the host Mac.

The call merely tries to run a batch file on the vm.

When I run the batch file from within the vm, it executes correctly and the node starts, so I know that batch file works correctly.

The path I am using is correct, as I can run it from anywhere on the vm.

It is just that I can't seem to call it from the host Mac.

This worked at one point, but I wonder whether a windows security update might have screwed things up?

I've tried to clear every firewall I could find. I am running parallels 8 on a MacBook Air.

Here is the syntax I am using.

prlctl exec {parallels_vm_name} 'C:\Users\{user_name}\Documents\selenium\startIeNode.bat {IP_address_here}'  
JackhammersForWeeks
  • 955
  • 1
  • 9
  • 21
  • possibly related issue described in [Parallels KB](http://kb.parallels.com/en/114193) –  Sep 06 '13 at 16:10

3 Answers3

3

The quotes around your

'C:\Users\{user_name}\Documents\selenium\startIeNode.bat {IP_address_here}'

should end at after .bat.

The only reason for those quotes is for the path, not for the command itself. It should look more like:

'C:\Users\{user_name}\Documents\selenium\startIeNode.bat' {IP_address_here}

Otherwise the IP address is being set as part of the pathname instead of a parameter.

Jason
  • 2,280
  • 23
  • 22
2

I have almost the same setup/use case that you describe: Win 7 VM on Parallels 8. I just set my system up to do exactly what you want.

  1. create .bat file verify it works on VM
  2. create windows shortcut to batch file
  3. drag shortcut onto Mac desktop, folder, Dock etc.
  4. launch batch file from Mac shortcut

In coherence mode, VM settings to enable launching Windows Apps from Mac enabled, Parallel tools installed

davidjmcclelland
  • 430
  • 9
  • 20
0

Because of the way things are passed in prlctl exec, commands need to be executed double-slashed, so it would be:

prlctl exec {parallels_vm_name} "C:\\Scripts\\myScript.cmd"
Dan Caseley
  • 521
  • 6
  • 8