Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've recently started a new job where we run virtualized copies of Windows inside VMWare Fusion (Mac OSX is the host). Among other things, we have a few utility .bat files that get run regularly. I'd like to be able to run these commands from my host environment.

vmrun is great for this, and I've come up with something like the following:

vmrun -T ws -gu <user> -gp <password> runProgramInGuest <.vmx file> c:\/batch\/hello.bat

This executes the command, but it does so silently. In this case, my hello.bat contains the classic

echo "hello, world!"

Question: is there a way to capture what is sent to standard output on the Windows console and display it in my host using these commands

share|improve this question
It occurs to me that I could also just capture the output into a file (on the GUEST) and then use additional vmrun commands on HOST to copy the file back and delete it from GUEST. However, this is cumbersome and would take a number of steps. Can I do it more simply? – BPMJ Jun 6 '13 at 16:29
up vote 2 down vote accepted

vmrun does not provide a way to capture the output of the program running on the guest and pipe it back to you. I suggest configuring the guest program to send the output to a file on the Host via a Shared Folder and then you can tail that file.

To make it more complicated, you could set up up some sort of TCP client/server connection between the guest and the host (perhaps just pipe it into SSH) but then you have to set that all up in advance.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .