Hello,
I am using vmrun to run an MSDOS batch file inside a Windows vm as follows:
vmrun -T vc -h https://<vcenterservername>:443/sdk -u username -p password -gu Administrator -gp administratorpassword runProgramInGuest "[datastoreLUNname] vmfoldername/vmname.vmx" C:\batchfilename.bat
So this code works - I start if from my Windows XP laptop and it starts a batch file runnining inside a Windows virtual machine. However, the output displays inside the virtual machine and not at the command line of tmy Windows xp laptop - where I need it to display. As each line of the MSDOS file executes inside the Windows VM, I need the output directed to my WindowsXP laptop so I can confirm each command is successful. Can this be done?
thanks
You have your script redirect its output to a file, then use the `copyFileFromGuestToHost` command to copy the file to your laptop, where you can echo the output file to the console to display it.
No. It is not possible to capture the output of a command executed inside the virtual machine and display it on the console using vmrun.
-Thanks
Sankar.
You have your script redirect its output to a file, then use the `copyFileFromGuestToHost` command to copy the file to your laptop, where you can echo the output file to the console to display it.
