Author Topic: how do I start a virtualbox image automatically at startup? [SOLVED]  (Read 7867 times)

Offline spottyrover

  • Full Member
  • ***
  • Posts: 80
how do I start a virtualbox image automatically at startup?

thanks
Dave
« Last Edit: March 18, 2012, 10:59:52 PM by travisN000 »
pclos 32bit lxde (fast), kernel 3.2.18-pclos2.pae, AMD Athlon(tm) II X4 620, nvidia gforce 8400gs driver 310.19-1pclos. 12 gig ram
Favorite software tvheadend / Xbmc

Offline Rudge

  • Hero Member
  • *****
  • Posts: 9686
  • I'm Just A Dog.
Re: how do I start a virtualbox image automatically at startup?
« Reply #1 on: July 24, 2011, 11:38:44 PM »
how do I start a virtualbox image automatically at startup?

thanks
Dave

You might be able to start VB at start-up, but I think you would still have to select the box that you would want to boot up.

ps. I aint all that smart.  :P


-If you wish to make an apple pie from scratch, you must first invent the universe-  Carl Sagan

Online Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11569
  • ----IOFLU----
Re: how do I start a virtualbox image automatically at startup?
« Reply #2 on: July 25, 2011, 12:25:16 AM »
how do I start a virtualbox image automatically at startup?

thanks
Dave


What VM are you trying to start... VM name?

I used to do this with the command VBoxManage startvm WinXP on an older version of VB. The command may still work in a script placed in your startup directory. You would need to use the correct name for your specific VM. As all things Linux, the command is case sensitive.

Edited the old script to start VM named Win2000 And here it is.



Resizing the window to use the scanner application, my sole reason for having the VM as there are no Linux drivers for the scanner.



The main VBox window does not open, just the Win2000 VM runs, as seen above. When I shutdown Windows, the VM window closes and nothing is left behind on the desktop.
« Last Edit: July 25, 2011, 01:17:24 AM by old-polack »
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline spottyrover

  • Full Member
  • ***
  • Posts: 80
Re: how do I start a virtualbox image automatically at startup?
« Reply #3 on: July 25, 2011, 01:11:34 AM »
I am going to be a backup server for a friend using vmware.
I can run it,  is called "ispconfig 3 server" . Now that I look at the name I am not sure if it will run automatically.

Thanks
Dave
pclos 32bit lxde (fast), kernel 3.2.18-pclos2.pae, AMD Athlon(tm) II X4 620, nvidia gforce 8400gs driver 310.19-1pclos. 12 gig ram
Favorite software tvheadend / Xbmc

Online Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11569
  • ----IOFLU----
Re: how do I start a virtualbox image automatically at startup?
« Reply #4 on: July 25, 2011, 01:28:41 AM »
I am going to be a backup server for a friend using vmware.
I can run it,  is called "ispconfig 3 server" . Now that I look at the name I am not sure if it will run automatically.

Thanks
Dave

Personally, I'd lose the spaces in the VM name, replacing them with underscores, dashes, or periods.

ispconfig_3_server

ispconfig-3-server

ispconfig.3.server


You may get away with putting quotes around the name, but having no spaces in the name always works and is the better choice on Linux systems.
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline spottyrover

  • Full Member
  • ***
  • Posts: 80
Re: how do I start a virtualbox image automatically at startup?
« Reply #5 on: July 25, 2011, 02:23:39 AM »
of course tried the hard way.
changed the file names etc
VBoxManage startvm /media/Multimedia/Virtualbox/Web-server/ispconfig/ISPCONFIG-3-on-9.04-server.vmdk

then realised
you meant VBoxManage startvm ispconfig

and it started from the terminal

thanks

any idea on how to start it on the second monitor?

Dave
pclos 32bit lxde (fast), kernel 3.2.18-pclos2.pae, AMD Athlon(tm) II X4 620, nvidia gforce 8400gs driver 310.19-1pclos. 12 gig ram
Favorite software tvheadend / Xbmc

Online Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11569
  • ----IOFLU----
Re: how do I start a virtualbox image automatically at startup?
« Reply #6 on: July 25, 2011, 02:28:02 AM »
of course tried the hard way.
changed the file names etc
VBoxManage startvm /media/Multimedia/Virtualbox/Web-server/ispconfig/ISPCONFIG-3-on-9.04-server.vmdk

then realised
you meant VBoxManage startvm ispconfig

and it started from the terminal

thanks

any idea on how to start it on the second monitor?

Dave

Having never had a second monitor, in a word...No!  ;D
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline spottyrover

  • Full Member
  • ***
  • Posts: 80
Re: how do I start a virtualbox image automatically at startup?
« Reply #7 on: July 25, 2011, 02:30:44 AM »
Thanks for your help old-polack
Dave
pclos 32bit lxde (fast), kernel 3.2.18-pclos2.pae, AMD Athlon(tm) II X4 620, nvidia gforce 8400gs driver 310.19-1pclos. 12 gig ram
Favorite software tvheadend / Xbmc

Online Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11569
  • ----IOFLU----
Re: how do I start a virtualbox image automatically at startup?
« Reply #8 on: July 25, 2011, 03:04:57 AM »
Thanks for your help old-polack
Dave


No problem.  ;D ;D

I also made a desktop icon/widget to do the same thing. This should work for any VM by changing the called VM and of course the file name. Copy the purple text below, if interested, paste into a text editor, edit VM name and file name, (mine shown in blue in the text) and save to your desktop as <appropriate name>.desktop. Right click on the file, Properties --> Permissions tab, and check the box to make it executable.

------------------------------------------------------------------ start ------------------------------------------------------------------------------
[Desktop Entry]
Comment[en_US]=
Comment=
Encoding=UTF-8
Exec=VBoxManage startvm Win2000
GenericName[en_US]=
GenericName=
Icon=/usr/share/pixmaps/xmlcopyeditor.png
MimeType=
Name[en_US]=Win2K
Name=Win2K
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-DCOP-ServiceType=
X-KDE-SubstituteUID=false
X-KDE-Username=

------------------------------------------------------------------------ end -------------------------------------------------------------------------

I didn't have a Windows-logo.png file handy so just used the Icon noted in the file. On the desktop it looks like this;

Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10644
  • MLUs Forever!
MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Online Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11569
  • ----IOFLU----
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: how do I start a virtualbox image automatically at startup? [SOLVED]
« Reply #11 on: March 18, 2012, 10:59:37 PM »
I was trying to figure out how to do something similar, but wanted the vbox image / VM to run headless and start up at boot, even without logging in to the graphical desktop environment....   although a bit more complicated, I did find a solution; it is posted in the Advanced users section:

http://www.pclinuxos.com/forum/index.php/topic,103651.html


@ Old-polack...   As usual, another great and useful tutorial; I thought it deserved a sticky!   ;D
« Last Edit: March 18, 2012, 11:03:30 PM by travisN000 »