Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] Third Party Tools
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rating: Thread Rating: 13 votes, 5.00 average. Display Modes
  #1  
Old 02-26-2008, 07:18 AM
sebainones sebainones is online now
Registered User
 
Join Date: 02-25-2008
Location: Argentina
Posts: 4
VMware Workstation ->"Run Program" Command doesn't work

Hi,

I am a newbie using Visual Build and it works fine. Though I have been trying to do some things with VMware Workstation, I can't find the way.
Till now i can "Start" a Virtual machine with an specified snapshot. But when I use "run program" command I get this error:

"Error: Unrecognized command: runProgramInGuestProcess completed with exit code -12/26/2008 10:04:11 AM: Step 'VMware Workstation-Connect&Exit' failed"

The step as you can see is named "VMware Workstation-Connect&Exit".

I really don't know what I am doing bad.
The program I want to run is in the virtual machine and in the host machine also, both in the same path.
The help that comes with Visual Build it's not enough at least for me to know how to work with this.

Could somebody help me please

Thanks a lot.

<SEB@s>
Reply With Quote
  #2  
Old 02-26-2008, 09:11 AM
ericp ericp is online now
Registered User
 
Join Date: 06-07-2006
Posts: 17
I haven't worked with the Vis Build portion of the VMWare steps, but if you're using the vmrun command from the command line, you need to ensure that the program you want to run is fully pathed out...

ex: notepad.exe will give you an error, but "C:\Winnt\notepad.exe" shouldn't (assuming Win2k).

Maybe the same thing is important here...

My $0.02.

e.
Reply With Quote
  #3  
Old 02-26-2008, 09:27 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
The runProgramInGuest command requires VMware Workstation v6.
Reply With Quote
  #4  
Old 02-26-2008, 11:03 AM
sebainones sebainones is online now
Registered User
 
Join Date: 02-25-2008
Location: Argentina
Posts: 4
Quote:
Originally posted by kinook
The runProgramInGuest command requires VMware Workstation v6.
Now I've installed VMware Workstation V6 and I still get the same error:

"Error: Command failed: Guest tools is not runningProcess completed with exit code -1 2/26/2008 1:55:36 PM: Step 'VMware Workstation-Connect&Exit' "

I don't know which is the probelm. Has anybody used VMware Workstation? Does anybody know if it works?

If someone can give me some samples I'll really apreciate that.
Thanks

<SEB@s>

PS: I am also giving the full path. Thanks for ur 2 cents anyway.

Last edited by sebainones; 02-26-2008 at 11:05 AM.
Reply With Quote
  #5  
Old 02-26-2008, 11:33 AM
ericp ericp is online now
Registered User
 
Join Date: 06-07-2006
Posts: 17
Quote:
Guest tools is not running
Make sure you have VMTools installed and upgraded to the version that is with Workstation.

Although, one thing that I have noticed, and I hope kinook can answer, if I do run the Run Program action, I will get the "Guest operations are not allowed for the anonymous user on this virtual machine".

When I do the same via VBScript or through the VIX API, I have to perform a LogonInGuest(username, password) command before any other commands will work.

Is there a step within Visual Build that will log in the guest? Or will that step have to be done another way?

Thanks!

Eric.
Reply With Quote
  #6  
Old 02-26-2008, 12:05 PM
sebainones sebainones is online now
Registered User
 
Join Date: 02-25-2008
Location: Argentina
Posts: 4
Waiting for Kinook answer

Now I am in the same situtation as you:

Error: Command failed: Guest operations are not allowed for the anonymous user on this virtual machineProcess completed with exit code -1

So, I have to wait for the Kinook answer.

Bye and thanks for ur help

<SEB@s>
Reply With Quote
  #7  
Old 02-26-2008, 12:11 PM
ericp ericp is online now
Registered User
 
Join Date: 06-07-2006
Posts: 17
From testing here, the command from the CMD Line would be something like:

vmrun -gu <username> -gp <password> runProgramInGuest <path to vmx> <command> <command arguments>

From what I've seen (and this is in v6.4), i can't find a way of added the -gu and -gp options just after the vmrun portion of the command (as seen by using the "Log Command Line used").

And when I try to "Override the EXE", I get:

"c:\program files\VMware\VMware Workstation\vmrun.exe -gu user -gp qwerty" as the command line...which errors out, since the -gu/gp are included as part of the executable, which is no good.

It'd work if it was:
"c:\program files\VMware\VMware Workstation\vmrun.exe" -gu user -gp qwerty (note, the quotes are excluding the -gp/-gu portions.

So, sebainones, unless Kinook can supply with the solution, I think your best bet would be to use a "Run Program" action to execute your command in the VM.

Hope this helps.

eric.
Reply With Quote
  #8  
Old 02-26-2008, 12:16 PM
ericp ericp is online now
Registered User
 
Join Date: 06-07-2006
Posts: 17
Sample Run Program Step:
Code:
<step action='Run Program'>
	<command>"C:\program files\vmware\vmware workstation\vmrun.exe" -gu user -gp password runProgramInGuest "i:\vm images\smoketest win2000\Windows 2000 Professional.vmx" "c:\winnt\notepad.exe"</command>
	<indent type='3'>1</indent>
	<name>Run Program</name>
	<outputfrom type='3'>1</outputfrom>
</step>
You'll have to change the username, password, path to the VMX, and the program you want to execute.

Another note: This command will 'wait' until the program you launch terminates. In this example, by default, visual build will 'wait' until Notepad terminates inside the VM. If you uncheck "Wait for Completion", it'll launch the script, and continue on with the build.
Reply With Quote
  #9  
Old 02-26-2008, 03:30 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
The latest v6.7 download adds support for the guest username/password to the VMWare Workstation action.
Reply With Quote
  #10  
Old 02-26-2008, 04:00 PM
ericp ericp is online now
Registered User
 
Join Date: 06-07-2006
Posts: 17
Nicely done!

Thanks for the quick reply/update.
Reply With Quote
  #11  
Old 02-27-2008, 10:04 AM
sebainones sebainones is online now
Registered User
 
Join Date: 02-25-2008
Location: Argentina
Posts: 4
Thanks

Thanks for ur reply/uodate as ericp said. Thanks ericp for ur help too.

Now it works. Just a suggestion. In my case I had a user account in the virtual machine that it doesn't have a password. So when I try to use the "Run Program" command it needs a password although it doesn't need it really.
So i had to create a user and actually set it a password. The activate teh autologon and finally i succed doing the "Run program" command.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 07:14 AM.


Copyright © 1999-2023 Kinook Software, Inc.