Page 1 of 1
headless, autoboot
Posted: 5. Dec 2008, 03:00
by Corey
how do you setup vbox to autoboot a vm on machine boot?
Posted: 5. Dec 2008, 06:23
by bmwiedemann
I do it thus:
http://forums.virtualbox.org/viewtopic.php?t=11633
having an init-script in /etc/init.d/vbox that starts the prepared VMs unter their user-accounts
The actual starting is something along the lines of
Code: Select all
VBoxManage startvm NameOfVirtualMachine -type vrdp
and for stopping I use
Code: Select all
VBoxManage controlvm NameOfVirtualMachine acpipowerbutton
Starting VMs automatically, headless
Posted: 6. Dec 2008, 02:09
by forrie
I'm a newbie to VirtualBox, after searching through the docs and forums, I'm not clear on the use of VBoxHeadless.
My intention is to test it running my VMs headless from the command line - leaving and accessing them remotely. When I run:
VBoxHeadless -startvm "My Server Name" -vrdp=off
or any variation of that, it gives me a copyright notice and doesn't go into the background (which I expected it might). And the VM doesn't start. I CTRL-C out of it to return.
The VMs run fine from the GUI, but that defeats the purpose. Ultimately, I'd like to configure our RedHat EL 5.2 host so that certain VMs will automatically start as the system boots, etc.
I read through section 7.4.1 "VBoxHeadless, the VRDP-only Server" and related sections of the manual and it's just not clear to me.
Thanks.
Posted: 8. Dec 2008, 18:37
by Corey
Thanks for the help.
forrie,
I been using the GUI for a little while on my laptop and am just starting to look at the headless for my servers so I'm not positive, but when you first start the gui you get the terms agreement, is that what your getting on the headless? if so trying accepting it (may have to scroll to the bottom).
Re: Starting VMs automatically, headless
Posted: 8. Dec 2008, 21:16
by markba
forrie wrote:When I run:
VBoxHeadless -startvm "My Server Name" -vrdp=off
or any variation of that, it gives me a copyright notice and doesn't go into the background (which I expected it might). And the VM doesn't start. I CTRL-C out of it to return.
You can place an ampersand '&' right after the command:
Code: Select all
VBoxHeadless -startvm "My Server Name" -vrdp=off &
When you give [Enter], the commandline is returned. A better option is using VBoxManage with the vrdp option, as suggested above (the commandline is returned immediately):
Code: Select all
VBoxManage startvm NameOfVirtualMachine -type vrdp
For autostarting VBox sessions, you can also use VBoxTool, see my sig for details.
Posted: 28. Jan 2009, 09:29
by vuser1
Take a look at this script -
http://farfewertoes.com/code/vboxcontrol/
It also could bring up/down network bridge and another features.
Author of the scrpipt mentioned DHCP for bridge br0 (in /etc/network/intefraces), but this also works perfect with static ip like:
interface br0 inet static
address ...
netmask ..
...
DON'T add "auto br0" - script does it itself.
Re: headless, autoboot
Posted: 30. Jan 2009, 00:28
by Max Rebo
Corey wrote:how do you setup vbox to autoboot a vm on machine boot?
Please read my post here:
How to Autoboot Virtualbox Guests during Linux boot
It took me a while to get it working and it might be what you want. Check near the bottom of that page.