VMware Communities
Nkrissh
Contributor
Contributor

Is it possible to launch the application in a virtual machine from the host machine

Hi,

I have been trying to launch/run an application on a virtual machine from the windows host, but the applications are not launched.

My actual requirement is to launch a vmware image and then run the applications on the image.

I have tried to do this with the following command line option : "C:\Program Files\VMware\VM Workstation\vmrun.exe" runProgramInGuest "D:\.vmx" "C:\App\MyApp.exe".

The application does not launch on the host machine, am I missing anything command line?

Any help in this regrads is much appreciated.

Thanks in Advance,

Krissh

0 Kudos
10 Replies
vmroyale
Immortal
Immortal

Hello and welcome to the forums.

Try the following syntax:

vmrun -T ws -gu GuestUserName -gp GuestPassword runProgramInGuest "C:\Virtual Machines\VM1\VM1.vmx" "C:\App\MyApp.exe"

Replace GuestUserName and GuestPassword with valid credentials on the guest VM.

The "D:\.vmx" in your original syntax needs to be modified to the full path of the .vmx file for the particular VM.

Good Luck!

Brian Atkinson | vExpert | VMTN Moderator | Author of "VCP5-DCV VMware Certified Professional-Data Center Virtualization on vSphere 5.5 Study Guide: VCP-550" | @vmroyale | http://vmroyale.com
0 Kudos
vmroyale
Immortal
Immortal

Hello and welcome to the forums.

Try the following syntax:

vmrun -T ws -gu GuestUserName -gp GuestPassword runProgramInGuest "C:\Virtual Machines\VM1\VM1.vmx" "C:\App\MyApp.exe"

Replace GuestUserName and GuestPassword with valid credentials on the guest VM.

The "D:\.vmx" in your original syntax needs to be modified to the full path of the .vmx file for the particular VM.

Good Luck!

Brian Atkinson | vExpert | VMTN Moderator | Author of "VCP5-DCV VMware Certified Professional-Data Center Virtualization on vSphere 5.5 Study Guide: VCP-550" | @vmroyale | http://vmroyale.com
0 Kudos
vmroyale
Immortal
Immortal

Hello and welcome to the forums.

Try the following syntax:

vmrun -T ws -gu GuestUserName -gp GuestPassword runProgramInGuest "C:\Virtual Machines\VM1\VM1.vmx" "C:\App\MyApp.exe"

Replace GuestUserName and GuestPassword with valid credentials on the guest VM.

The "D:\.vmx" in your original syntax needs to be modified to the full path of the .vmx file for the particular VM.

Good Luck!

Brian Atkinson | vExpert | VMTN Moderator | Author of "VCP5-DCV VMware Certified Professional-Data Center Virtualization on vSphere 5.5 Study Guide: VCP-550" | @vmroyale | http://vmroyale.com
0 Kudos
Nkrissh
Contributor
Contributor

Hi ,

Thanks a lot for your reply.

I had already tried the syntax provided by you, but it throws an error saying "Invalid Switch T", I tried to run this command both when the Vmware Workstation was running and also when shut down but the result were same.

Should this command be run when the WorkStation is running?

I had passed the valid .vmx and user credentials in the command line.

Please suggest if there are any other alternatives or if there is any modificatins required in the below syntax:

"C:\Program Files\VMware\VM Workstation\Vmrun" -T ws -gu "abcd" -gp "abcd" runProgramInGuest "C:\Virtual Machines\VM1\VM1.vmx" "C:\App\MyApp.exe"

Thanks in Advance,

Krissh

0 Kudos
vmroyale
Immortal
Immortal

What version of VMware Workstation are you using?

How are you trying to run this command? Are you using Start -> Run, using the command prompt, etc?

Brian Atkinson | vExpert | VMTN Moderator | Author of "VCP5-DCV VMware Certified Professional-Data Center Virtualization on vSphere 5.5 Study Guide: VCP-550" | @vmroyale | http://vmroyale.com
0 Kudos
Nkrissh
Contributor
Contributor

VMware Workstation Version: 6.0.4 build 93057

We have tried running this from the command prompt and also from the Start->Run, is there any need for upgrading to latest version of Workstation to run the command?

Thanks,

Nagaraj

0 Kudos
vmroyale
Immortal
Immortal

As far as I know, there is no need to update to the latest version for this command to work.

Can you do the following:

(1) open a command prompt

(2) type: cd "C:\Program Files\VMware\VM Workstation"

(3) type: vmrun -T ws -gu "abcd" -gp "abcd" runProgramInGuest "C:\Virtual Machines\VM1\VM1.vmx" "C:\App\MyApp.exe"

(4) take a screenshot of the output in the command prompt window and post it

Brian Atkinson | vExpert | VMTN Moderator | Author of "VCP5-DCV VMware Certified Professional-Data Center Virtualization on vSphere 5.5 Study Guide: VCP-550" | @vmroyale | http://vmroyale.com
0 Kudos
Nkrissh
Contributor
Contributor

I have followed the steps metioned and have attached the screenshot for the same.

Thanks,

Nagaraj

0 Kudos
vmroyale
Immortal
Immortal

Thanks for posting that.

It looks like the upgrade to 6.5 will be necessary.

The latest version is available as a free, downloadable update for all VMware Workstation 6 customers from: http://www.vmware.com/download/ws/

I upgraded from 6.0.x to 6.5.1 recently, and it went well.

Good Luck!

Brian Atkinson | vExpert | VMTN Moderator | Author of "VCP5-DCV VMware Certified Professional-Data Center Virtualization on vSphere 5.5 Study Guide: VCP-550" | @vmroyale | http://vmroyale.com
0 Kudos
Nkrissh
Contributor
Contributor

Thanks a lot for your reply, I upgraded to 6.5 and now it works.

Your suggestions were very helpful, thanks once again

0 Kudos