Page 1 of 1

start .sh script on ubuntu through Vbox

Posted: 22. Oct 2015, 14:44
by ros88
Hello
I have Ubuntu installed on virtual box, and i need to run a script that stored at ubuntu.

The proccess should be like this :
In windows open .bat script that will start virual machine , load ubuntu and execute the script at the location: /home/user/Documents/myscipt.sh after that ubuntu will shut down.
I read u user manual and tried to use with VBoxManage.exe but i believe that i missing something because it does not work.

what i am doing wrong?

Re: start .sh script on ubuntu through Vbox

Posted: 22. Oct 2015, 15:03
by scottgus1
start virual machine , load ubuntu and execute the script
Does Ubuntu have a "Startup" folder like Windows has? You could put the program/script you need to run when Ubuntu boots in whatever Ubuntu has for running programs when the OS boots. Have the script handle the running of the Ubuntu process & shutdown. Then all your host script needs to do is start the guest.

Re: start .sh script on ubuntu through Vbox

Posted: 22. Oct 2015, 15:07
by ros88
I have several scripts that i need to run , so i dont want to put the .sh script on the start up of the ubuntu.
Maybe there is a way to control guest ubuntu terminal ?

Re: start .sh script on ubuntu through Vbox

Posted: 22. Oct 2015, 15:28
by loukingjr
I don't believe there is any way to control a guest's terminal from the host or VirtualBox.

Re: start .sh script on ubuntu through Vbox

Posted: 22. Oct 2015, 15:29
by scottgus1
Gotcha. Different scripts on demand, OK. Show us the command you used and what error message you get.

Re: start .sh script on ubuntu through Vbox

Posted: 22. Oct 2015, 17:20
by liamblack
You could ssh into the ubuntu box.