VMware Communities
TedMilne
Contributor
Contributor

vmrun start DOES NOT RETURN

I am using VMware Workstation version 11.1.0

This is what I am trying to achieve

1. Open my VM

2.Run an executable on my vm

To achieve this, I write a batch file with the following lines NOTE - line 3 is approximated:-

cd "c\Program Files (x86)\VMware\VMware Vix"

vmrun -T ws start "c:\Stuff\VMs\Windows 7 x64.vmx"

vmrun runprograminguest .........

Te problem is, line 2 (vmrun -T ws start ""c:\Stuff\VMs\Windows 7 x64.vmx" ") does not return, so line 3 never gets executed.

I have seen this problem reported before, but no resolution. I have looked through the vmware.log file and nothing jumps out at me.

For clarity : line 2 Does run the VM, but does not return. When I manually shut down the VM, I see the following message : "Error : Unknown error"

This is holding me up massively and will stop me buying the product. Any ideas?

Thanks in advance.

0 Kudos
3 Replies
Dayworker
Enthusiast
Enthusiast

Your syntax is not correct. Open a CMD or terminal windows and execute "vmrun". At the bottom you will find some examples. Accoding to theses examples you have to run:

vmrun -T ws start "c:\Stuff\VMs\Windows 7 x64.vmx" runprograminguest "c:\Program Files\yourProgram.exe"

----- Please do not forget to assign reward points, if you find an answer useful.
0 Kudos
TedMilne
Contributor
Contributor

Dayworker....

I'll give that a try and see if it works...

0 Kudos
TedMilne
Contributor
Contributor

Unfortunately your suggestion does not work.

You can run the following line (for reference, LINE ONE) on its own

     vmrun -T ws start "c:\stuff\VMs\Windows 7 x64.vmx"

You can also run the following line on its own (for reference LINE TWO)

     vmrun -T ws runprograminguest "c:\Program Files (x86)\SmartBear"

However, you cannot run both commands 'start and runprograminguest' from one command line like you suggested :-

    vmrun -T ws start "c:\Stuff\VMs\Windows 7 x64.vmx" runprograminguest "c\Program Files (x86)\SmartBear\TestExecute 10\Bin\TestExecute.exe"

the above is not legal syntax and results in the error message  'One of the parameters was invalid'

Sooo... my problem is still the same, I need to have a VM up and running before I can run LINE TWO

However, I never get to LINE TWO, because the script does not return after running LINE ONE

By the way, I did type vmrun into the console like you suggested. In the help examples I read the following :-

Running a program in a virtual machine with Workstation on a Windows host with Windows Guest (for reference LINE THREE) :-

vmrun -T ws -gu guestUser -gp guestPassword runProgramInGuest "c:\myVM.vmx" "c:\Program Files\myprogram.exe"

although this is valid, it requires LINE ONE to be executed first...

If I just run LINE THREE I see the following error message :-

"Error : The virtual machine is not powered on".

0 Kudos