how to run program in guest OS

This is for discussing general topics about how to use VirtualBox.

how to run program in guest OS

Postby f-x » 29. May 2009, 11:42

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 !
f-x
 
Posts: 1
Joined: 29. May 2009, 11:18
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: Debian, MS Windows XP

Re: how to run program in guest OS

Postby HolgerB » 29. May 2009, 15:50

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
HolgerB
 
Posts: 58
Joined: 28. Jul 2008, 23:36

Re: how to run program in guest OS

Postby asmlover » 15. Nov 2009, 19:23

Is there VirtualBox API function to run program in guest OS?

Something as runProgramInGuest() in VMware commercial products?
asmlover
 
Posts: 1
Joined: 15. Nov 2009, 19:09
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: winxp,ubuntu

Re: how to run program in guest OS

Postby Kristian Karl » 21. Dec 2010, 11:03

Try:
Code: Select all   Expand viewCollapse view
VBoxManage guestcontrol execute <vmname> <path to program>


You'll probably need to sett username and password for the guest as well.
Kristian Karl
 
Posts: 2
Joined: 21. Dec 2010, 11:00
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Windows

Re: how to run program in guest OS

Postby HubTou » 21. Dec 2010, 14:14

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
HubTou
 
Posts: 89
Joined: 24. Nov 2009, 11:01
Primary OS: FreeBSD
VBox Version: OSE other
Guest OSses: FreeBSD, OpenSolaris, and several Linuxes


Return to Using VirtualBox

Who is online

Users browsing this forum: FrodoHobbits and 20 guests