Page 1 of 1

how to run program in guest OS

Posted: 29. May 2009, 11:42
by f-x
Hi,
I'm working on a project which consist to automate VM creation. That's mean :
- to create the VM
- to add hardware
- to add OS
- to install software
- to configure network
I'm using the VirtualBox main API with java(Jax-WS) to do that.
Now, I need to run programs in guest in order to install softwares. But, it seems API does not provide tools to do that!

Is somebody know how to do this ?

PS : I'm French : sorry for my English !

Re: how to run program in guest OS

Posted: 29. May 2009, 15:50
by HolgerB
Hey f-x,

no need to excuse for your English. It´s perfectly readable.
Unfortunately you are not very specific about your scenario.
E.g. what kind of OS will by installed. I haven´t tinkered
around with the VBox API but there are multiple approaches
for this scenario. If you want to install certain programs
during a Windows Installations within the VM, you could integrate
them into your Win boot ISO with tools like NLite. You could also
use tools similar to psexec to lauch setup programs within your
VM in silent mode.

See here for details:
http://technet.microsoft.com/en-us/sysi ... 97553.aspx

Automated execution of AutoIt script after first startup could be another option.

For Linux guests on the other hands you could use simple shell scripts to connect to your guest via SSH and execute the tools of your choice.

Hope this helps somewhat,
Holger

Re: how to run program in guest OS

Posted: 15. Nov 2009, 19:23
by asmlover
Is there VirtualBox API function to run program in guest OS?

Something as runProgramInGuest() in VMware commercial products?

Re: how to run program in guest OS

Posted: 21. Dec 2010, 11:03
by Kristian Karl
Try:

Code: Select all

VBoxManage guestcontrol execute <vmname> <path to program>
You'll probably need to sett username and password for the guest as well.

Re: how to run program in guest OS

Posted: 21. Dec 2010, 14:14
by HubTou
Hello f-x,
f-x wrote:I'm working on a project which consist to automate VM creation
I'm using the VirtualBox main API with java(Jax-WS) to do that.
Now, I need to run programs in guest in order to install softwares. But, it seems API does not provide tools to do that!
Is somebody know how to do this ?
Please have a look at:
f-x wrote:PS : I'm French
Tout pareil :wink:

Best regards,

Hubert