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 !
how to run program in guest OS
Re: how to run program in guest OS
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
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
-
- 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
Is there VirtualBox API function to run program in guest OS?
Something as runProgramInGuest() in VMware commercial products?
Something as runProgramInGuest() in VMware commercial products?
-
- 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
Try:
You'll probably need to sett username and password for the guest as well.
Code: Select all
VBoxManage guestcontrol execute <vmname> <path to program>
-
- Posts: 93
- Joined: 24. Nov 2009, 11:01
- Primary OS: FreeBSD
- VBox Version: OSE other
- Guest OSses: FreeBSD, OpenSolaris, and several Linuxes
Re: how to run program in guest OS
Hello f-x,
Best regards,
Hubert
Please have a look at: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 ?
- http://www.virtualbox.org/sdkref/interf ... board.html
http://www.virtualbox.org/sdkref/interface_i_mouse.html
http://www.virtualbox.org/sdkref/interface_i_guest.html
for the putScancode() / putScancodes() / putCAD(), putMouseEvent(), putMouseEventAbsolute(), executeProcess(), getProcessOutput(), getProcessStatus() functions of the API - http://forums.virtualbox.org/viewtopic.php?f=1&t=33560
for different solutions from the command line (including how to use scancodes for what you want) - and at http://www.projet-hev.org/dist/hev1.flv
for a video example.
Tout pareilf-x wrote:PS : I'm French
Best regards,
Hubert