VMFusion runScriptInGuest not working on MAC

285 Views Asked by At

Trying to run the following command on VMFusion professional version 10.0.1:

vmrun -T fusion -gu user -gp pass runScriptInGuest /Path/On/Host/\ 10.12.vmwarevm/macOS\ 10.12.vmx  /usr/bin/python /Path/On/Guest/a.py

Keep getting the following error:

Guest program exited with non-zero exit code: 1

Cannot find anything on this online.

Host: High-Sierra 10.13

Guest: Sierra 10.12.6

I updated the VM Tools as well.

Also, checked that the file does exists on VM and that running the script manually it does work

Any idea? Thank you in advance!

1

There are 1 best solutions below

0
On BEST ANSWER

Well, I found that the problem is the fact I was trying to run the python file, which is impossible on Mac.

What you need to do is to run the actual script inline!

E.G:

vmrun -T fusion -gu user -gp pass runScriptInGuest /Path/On/Host/\ 10.12.vmwarevm/macOS\ 10.12.vmx  /bin/sh "/usr/bin/python -c \"`cat /Path/On/Host/To/Script`\"

So we will create a script on the host and cat it to the command!