Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Linux startup

Posted on 2014-11-18
6
Medium Priority
?
423 Views
Last Modified: 2014-11-21
I want to start a virtualbox virtual machine at startup in Lubuntu. I created my virtual machine, and in Lubuntu, in xterm, if I run

/usr/bin/VirtualBox --startvm vm1 --fullscreen

it starts the virtual machine no problem. So I made a VERY simple script, ( I'm embarrassed to say I made a script. That would suggest I know HOW to script, which I don't ) but anyhow, the "script" is  

!/bin/bash
/usr/bin/VirtualBox --startvm vm1 --fullscreen

and I saved it to

/home/myname/startup/start

and in xterm, I run

/home/myname/startup/start

and again, it starts and runs the virtual machine, no problems. So I read that if you put commands in

/etc/rc.local

above the exit 0 line, it will run the command at startup. I also saw that you need the '&' (without quotes ) after the command to make it run in the background so that Lubuntu can continue to load, and not wait for your command. I tried

/usr/bin/VirtualBox --startvm vm1 --fullscreen &

above the exit 0 line, which didn't work, and tried

/home/myname/startup/start

above the exit 0 line, and it still doesn't start the virtual machine.
Any ideas what I am doing wrong?
0
Comment
Question by:JeffBeall
  • 3
  • 2
6 Comments
 
LVL 36

Expert Comment

by:Seth Simmons
ID: 40451368
what linux distribution and version are we working with here?
0
 
LVL 1

Author Comment

by:JeffBeall
ID: 40451430
Lubuntu version 14.10 64 bit
0
 
LVL 7

Expert Comment

by:slubek
ID: 40452268
How do you know that VM did not start?
Ampersand (&) at the end of the command means that process runs as daemon (in background), so it doesn' have console connected.
What is the output of
ps ax | grep Virtual

Open in new window

?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:JeffBeall
ID: 40454062
ps ax | grep Virtual

yields

2064 pts/3   S+   0:00 grep --color=auto Virtual

and the word Virtual is red.
0
 
LVL 7

Accepted Solution

by:
slubek earned 2000 total points
ID: 40454396
I don't know much about Lubuntu, but maybe you shuld use VBoxHeadless?
i.e.
$ VBoxHeadless -startvm "VMName"

Open in new window

0
 
LVL 1

Author Closing Comment

by:JeffBeall
ID: 40458157
thank you.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month8 days, 17 hours left to enroll

877 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question