LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 04-14-2011, 02:07 PM   #1
zapo
LQ Newbie
 
Registered: Sep 2009
Location: Toronto
Distribution: Centos 5 / Fedora 14/Debian/Slackware
Posts: 17

Rep: Reputation: 0
VBox Guest - windows 7 VM, won't autostart on Centos 5.5


Hello LQ World,
I've added Vboxmanage to my rc.local file as shown below. The Win 7 VM starts normally when I run /etc/rc.d/rc.local as root or using sudo, but it does not start after a reboot.
Any help or pointers appreciated.

#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
#
touch /var/lock/subsys/local
# Start Windows 7 Guest VM - owned by root.

VBoxManage startvm WIN7R


Thanks,
zapo
 
Old 04-18-2011, 11:05 AM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
For VirtualBox to start a VM with a screen it needs an X display to show it on. rc.local runs outside the X environment.

You have two options: either start the VM with --type set to something that does not need a display such as headless or move the VBoxManage command from rc.local to your desktop Autostart so it starts when you log on. Details depend on which desktop you are running.
 
1 members found this post helpful.
Old 04-18-2011, 11:37 PM   #3
zapo
LQ Newbie
 
Registered: Sep 2009
Location: Toronto
Distribution: Centos 5 / Fedora 14/Debian/Slackware
Posts: 17

Original Poster
Rep: Reputation: 0
Thank you very much for your help and shedding some light on this problem. I think I'll try auto starting the VM as headless now that I have it running.
 
Old 04-21-2011, 09:48 AM   #4
zapo
LQ Newbie
 
Registered: Sep 2009
Location: Toronto
Distribution: Centos 5 / Fedora 14/Debian/Slackware
Posts: 17

Original Poster
Rep: Reputation: 0
Hi Catkin,
I've tried --type headless and it works great - thanks again. The VM is owned by root - I don't think this is good for security, how can I make a VM owned another acount start from rc.local at boot up?

Thanks,
zapo
 
Old 04-21-2011, 02:54 PM   #5
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
su - <user name> VBoxManage startvm WIN7R --type headless
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBox 4.0.2 guest additions rajcan Sabayon 1 04-05-2011 06:09 PM
[SOLVED] vbox 4.0.2 - guest sabayon5.4 on win7 - mnt local gentoo from vbox sabayon? shinystuffrox Linux - Virtualization and Cloud 1 03-04-2011 01:10 AM
VBox NIC not working in slackware 13 guest aphraz Linux - Virtualization and Cloud 3 02-27-2011 04:38 AM
Weird keyboard reaction in CentOS guest on Kubuntu with VBox rsciw Linux - Virtualization and Cloud 0 05-12-2010 11:53 AM
KVM: Mouse under Windows Guest performs way better than under Centos Guest martdj Linux - Virtualization and Cloud 3 03-29-2010 04:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 08:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration