Run python script in guest VM using vmrun runScriptInGuest

I am trying to run a very long python script that is in guest VM A.py from a Linux host machine. The guest virtual machine is Windows 7x64 and the application is VMware Fusion.

I am using the following command:

vmrun -T ws -gu <username> -gp <password> runScriptInGuest "/Users/userdir/Documents/Virtual Machines.localized/Windows7x64.vmwarevm/Windows7x64.vmx" C:\\Users\\Admin\\Documents\\A.py C:\Python27\python.exe

      

This does not work. Any ideas on how to do this?

I really appreciate your help.

+3


source to share


2 answers


Just a wild guess, but try changing the order of the last two arguments:

vmrun -T ws -gu -gp runScriptInGuest "/Users/userdir/Documents/Virtual Machines.localized/Windows7x64.vmwarevm/Windows7x64.vmx" C:\Python27\python.exe C:\Users\Admin\Documents\A.py 

      



The Python interpreter must be called by the virtual machine and the interpreter will run the A.py

script.

+1


source


vmrun -T ws -gu Admin -gp Apple1984 runProgramInGuest "/ Users / userdir / Documents / Virtual Machines.localized / Windows7x64.vmwarevm / Windows7x64.vmx" -activeWindow "C: \ Users \ Admin \ A.bat"

where A.bat is the bat file in which I am calling the python script



@echo off cd C: \ Users \ Admin C: \ python27 \ python.exe A.py% *

+2


source







All Articles