[SOLVED AGAIN] VirtualBox failed to start.

Discussions related to using VirtualBox on Linux hosts.
Post Reply
vboxmember
Posts: 33
Joined: 19. Apr 2009, 05:08
Primary OS: Ubuntu 8.04
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP

[SOLVED AGAIN] VirtualBox failed to start.

Post by vboxmember »

System Specs:
CPU: Intel Core 2 Extreme X9650, 3GHz
MEM: 4GB
Host OS: Kubuntu (Hardy Haron v.8.04)
Guest OS: WinXP

Description / Background:
I just finished setting up VitualBox to run a WinXP guest shared between two user accounts on the Kubuntu (Linux) host.
See the following thread for information referenced in the previous sentance: http://forums.virtualbox.org/viewtopic.php?f=1&t=16894
After getting it setup and working great under both user accounts, and without changing anything in the WinXP guest, I shutdown the computer for the night. The next morning when I turned the computer on, VirtualBox would no longer start.

Problem:
I receive the following error message when I attempt to start VirtualBox on the Kubuntu (Linux) host.

Code: Select all

Failed to initialize COM or to find the VirtualBox COM server. Most likely, the VirtualBox server is not running or failed to start.
The application will now terminate.
Details:
Callee RC: 
NS_ERROR_FAILURE (0x80004005)
Notes:
I searched VirtualBox.org for each of the following:
"Failed to initialize COM", "VirtualBox server is not running", and something else but i can't remember what it was.
Only one result was returned with no answers to that persons post.
I searched google with:
"VirtualBox server is not running"
I received multiple posts that applied to other OS's and situations and were mostly unhelpful, outdated, or were not in English.
When I have more time to waste thinking up search terms that by some miracle might pinpoint this error on someone else's machine who has my setup and got a solution I'll try again, but until then...

Questions:

If any one has any idea's on how they might go about beginning to troubleshooting this problem please feel free to share them here.
I already tried reinstalling VirtualBox and it still gives the same exact error message when I try to start it.
Thank you for taking the time to read this post.
Last edited by vboxmember on 6. Jun 2009, 17:20, edited 4 times in total.
jowilkin
Posts: 14
Joined: 28. Apr 2009, 01:20
Primary OS: Ubuntu 8.04
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu 8.04

Re: VirtualBox failed to start.

Post by jowilkin »

I would guess that the one possibility is that the virtual box kernel module was not loaded correctly when you rebooted. When you startup, if you exit out of the splash screen during startup, you should see things being initialized and modules being loaded in a list like:

Starting ssh server [OK]
Loading module some_module [OK]

One of the modules is the virtual box kernel module. You might want to reboot your computer and see what it says when it load the vbox module. You can log the boot process, but it's kind of a pain in Ubuntu (http://dailyvim.blogspot.com/2008/08/ub ... tlogd.html).

The "modprobe" command can also let you know what's loaded. Try

Code: Select all

modprobe -l | grep vbox
and a couple modules should be listed. For me it shows

Code: Select all

user@computer ~ $ modprobe -l | grep vbox
/lib/modules/2.6.24-23-server/misc/vboxdrv.ko
/lib/modules/2.6.24-23-server/misc/vboxnetflt.ko
vboxmember
Posts: 33
Joined: 19. Apr 2009, 05:08
Primary OS: Ubuntu 8.04
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP

Re: VirtualBox failed to start.

Post by vboxmember »

jowilkin,
Thank you very much for your response. I figured out what was happening this morning and solved the problem for which I will explain the answer, but first your post has raised a few questions that I desperately need some answers for.

Questions:
1. Ever since I installed VirtualBox, my text mode boot screen has gone away. You mentioned being able to "exit the splash screen", how are you doing that?
2. I haven't tried your fix for bootlogd yet because of the reason it was disabled in the first place by the Ubuntu team. In the link you gave to the bug-tracking-report it states the following: "...and the reason this has been disabled is that it caused several other processes to crash unexpectedly" Before I can try your fix for bootlogd I need to know that it doesn't cause the same problems. Did your setup experience this behavior after fixing the boot-logging problem?
3. Could you please privately message me the answers to these questions so the thread does not go to far off topic?
Thank you for raising these issues. I sincerely appreciate it, and if I can get bootlogd working it will be a HUGE help towards solving the problems that lead to VBox failing on start in the first place (see SOLVED below).

SOLVED:
The file system was mounted improperly because the /etc/fstab file is getting rewritten incorrectly and intermittently between reboots. This meant that VirtualBox could not find its startup files and was unable to start. Once I fixed the mount points for my file system, VirtualBox found everything it needed and started just fine.

Note:
I haven't researched the /etc/fstab file problem yet because I don't have a lot of time to spend fixing my computer, and it doesn't happen often enough for it to be a real pain.

Again, thanks for your help. I look forward to hearing from you.
vboxmember
Posts: 33
Joined: 19. Apr 2009, 05:08
Primary OS: Ubuntu 8.04
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP

Re: VirtualBox failed to start.

Post by vboxmember »

[UPDATE]
This problem is reoccurring.

Description of problem (detailed):
The mount points for my computers system had to be changed in order to fix some mount point errors. My fstab is now using UUID's which has stabilized the computer and solved many problems. I also reorganized the naming scheme I was using for my mount points so that they would sort correctly by name in the Dolphin file manager.

Description of problem (short):
Before the change: The mount point where the .VirtualBox (the one that houses the "Machines" and "HardDisks" folders) file was located, was in:
/media/ic3_1/.VirtualBox/
After the change: The mount point where the .VirtualBox file is located, is now in:
/media/ic3_01/.VirtualBox/

Error caused:
Now that the above changes have been made. Any time I start VirtualBox I get the same error message as in my first Post to this thread.

Notes:
Ubuntu seems unable to log the boot screen no matter what fix or work around is applied, but if its relevant I would be happy to transcribe or look for any specific messages (using CTRL+S and CTRL+Q) that might reveal some insight to this problem. Also note, that none of the file permissions have been changed since VirtualBox was last successfully used, and in fact the above changes are the only changes that have been made since the last successful VirtualBox session.

Questions:
How can I trouble shoot this further? How can I get VirtualBox to start?
vboxmember
Posts: 33
Joined: 19. Apr 2009, 05:08
Primary OS: Ubuntu 8.04
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP

Re: VirtualBox failed to start.

Post by vboxmember »

[bump-0000]
Last edited by vboxmember on 6. Jun 2009, 18:09, edited 1 time in total.
fixedwheel
Volunteer
Posts: 1699
Joined: 13. Sep 2008, 02:18

Re: VirtualBox failed to start.

Post by fixedwheel »

The file system was mounted improperly because the /etc/fstab file is getting rewritten incorrectly and intermittently between reboots.
strange, i can hardly imagine which application, program or deamon could arbitrarily rewite fstab
Before the change: The mount point where the .VirtualBox (the one that houses the "Machines" and "HardDisks" folders) file was located, was in:
/media/ic3_1/.VirtualBox/
After the change: The mount point where the .VirtualBox file is located, is now in:
/media/ic3_01/.VirtualBox/
:?: is this ic3_1 a hotplug, removable device that it gets a mount point in /media :?:
Ubuntu seems unable to log the boot screen no matter what fix or work around is applied,
dmesg|less
/var/log doesnt exist?
How can I get VirtualBox to start?
looks like vbox doesnt find its files after the mountpoint change, their path/name is stored in ~/.VirtualBox/VirtualBox.xml
vboxmember
Posts: 33
Joined: 19. Apr 2009, 05:08
Primary OS: Ubuntu 8.04
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP

Re: VirtualBox failed to start.

Post by vboxmember »

fixedwheel,
Thank you for your response.

When I had things referenced in fstab by dev instead of UUID the system was unstable because the device names change between reboots and this would confuse where the mount points were pointing too. Ever since fstab was switched to UUID references the systems mount points stay the same between reboots and stability is achieved.

/media/ic3_1/ doesn't exist because it was renamed to /media/ic3_01/
It is not a hotplug device and if /media/ is meant for hotplug devices, then ic3_01 is located in /media/ most likely because I misread or misinterpreted the definitions for the file system. I was under the impression /media/ or /mnt/ were both satisfactory places to mount Hard Disks. Does /media/ get special treatment in fstab?

Yes you are correct. /var/log does not exist.

Also, I have no ~/.VirtualBox folder, instead I have a /root/.VirtualBox folder, and the /root/.VirtualBox/VirtualBox.xml file does not contain a reference to any mount points at all. Here is a copy of the xml's contents with the network addresses renamed to ###.###.###.### for security purposes.

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!-- Sun VirtualBox Global Configuration -->
<VirtualBox xmlns="http://www.innotek.de/VirtualBox-settings" version="1.7-linux">
  <Global>
    <MachineRegistry/>
    <MediaRegistry/>
    <NetserviceRegistry>
      <DHCPServers>
        <DHCPServer networkName="HostInterfaceNetworking-vboxnet0" IPAddress="###.###.###.###" networkMask="###.###.###.###" lowerIP="###.###.###.###" upperIP="###.###.###.###" enabled="1"/>
      </DHCPServers>
    </NetserviceRegistry>
    <USBDeviceFilters/>
    <SystemProperties/>
    <ExtraData>
      <ExtraDataItem name="GUI/LicenseAgreed" value="7"/>
      <ExtraDataItem name="GUI/UpdateCheckCount" value="2"/>
      <ExtraDataItem name="GUI/UpdateDate" value="1 d, 2009-04-27"/>
      <ExtraDataItem name="GUI/RegistrationData" value="triesLeft=2"/>
      <ExtraDataItem name="GUI/LastWindowPostion" value="575,310,770,550"/>
    </ExtraData>
  </Global>
</VirtualBox>
Note: The .VirtualBox folder is located in /root/ because VB needs to be started from two separate user accounts.

Questions:
If the path name is supposed to be stored in VirtualBox.xml, could you please post an example of what your xml file looks like so I might be able to test something similar in my xml file?

Again thank you for taking the time to respond.
Last edited by vboxmember on 6. Jun 2009, 18:10, edited 1 time in total.
fixedwheel
Volunteer
Posts: 1699
Joined: 13. Sep 2008, 02:18

Re: [UNSolved] VirtualBox failed to start.

Post by fixedwheel »

I was under the impression /media/ or /mnt/ were both satisfactory places to mount Hard Disks. Does /media/ get special treatment in fstab?
it doesnt get a special treatment in fstab, its just that the automount deamons use /media ... while /mnt was the traditional place for the admin to do temporary mounts. You may use both places, for a permanent mount not fitting in standard hirarchy i would use an off standard hirarchy named directory at top level just below / but thats only my personal way and you can do as you want. I was just a little confused about your ic3_01 could have been automounted.
Yes you are correct. /var/log does not exist.
are you kidding?
Also, I have no ~/.VirtualBox folder, instead I have a /root/.VirtualBox folder, and the /root/.VirtualBox/VirtualBox.xml file does not contain a reference to any mount points at all. (...)
Note: The .VirtualBox folder is located in /root/ because VB needs to be started from two separate user accounts.
:?: when virtualbox is started from a user account there normally should be a .VirtualBox directory in the users home directory

please post an example of what your xml file looks like
uuids renamed ...

Code: Select all

<?xml version="1.0"?>
<!-- Automatically converted from version '1.6-linux' -->
<!-- Automatically converted from version '1.5-linux' -->
<!-- Automatically converted from version '1.4-linux' -->
<!-- Automatically converted from version '1.3-linux' -->
<!-- Sun xVM VirtualBox Global Configuration -->
<VirtualBox xmlns="http://www.innotek.de/VirtualBox-settings" version="1.7-linux">
  <Global>
    <ExtraData>
      <ExtraDataItem name="GUI/LicenseAgreed" value="7"/>
      <ExtraDataItem name="GUI/UpdateDate" value="1 d, 2009-06-06"/>
      <ExtraDataItem name="GUI/RegistrationData" value="triesLeft=0"/>
      <ExtraDataItem name="GUI/LastWindowPostion" value="446,322,770,669"/>
      <ExtraDataItem name="GUI/LastVMSelected" value="{########-####-####-####-############}"/>
      <ExtraDataItem name="GUI/SuppressMessages" value=",confirmInputCapture"/>
    </ExtraData>
    <MachineRegistry>
      <MachineEntry uuid="{########-####-####-####-############}" src="/VBOX/Machines/CentOS47/CentOS47.xml"/>
    </MachineRegistry>
    <MediaRegistry>
      <HardDisks>
        <HardDisk uuid="{########-####-####-####-############}" location="/VBOX/VDI/CentOS47.vdi" format="VDI" type="Normal"/>
      </HardDisks>
      <DVDImages>
        <Image uuid="{########-####-####-####-############}" location="/VBOX/ISO/CentOS-4.7-i386-bin1of4.iso"/>
        <Image uuid="{########-####-####-####-############}" location="/VBOX/ISO/CentOS-4.7-i386-bin2of4.iso"/>
        <Image uuid="{########-####-####-####-############}" location="/VBOX/ISO/CentOS-4.7-i386-bin3of4.iso"/>
        <Image uuid="{########-####-####-####-############}" location="/VBOX/ISO/CentOS-4.7-i386-bin4of4.iso"/>
        <Image uuid="{########-####-####-####-############}" location="/VBOX/ISO/CentOS-4.7-x86_64-bin1of5.iso"/>
        <Image uuid="{########-####-####-####-############}" location="/VBOX/ISO/CentOS-4.7-x86_64-bin2of5.iso"/>
        <Image uuid="{########-####-####-####-############}" location="/VBOX/ISO/CentOS-4.7-x86_64-bin3of5.iso"/>
        <Image uuid="{########-####-####-####-############}" location="/VBOX/ISO/CentOS-4.7-x86_64-bin4of5.iso"/>
        <Image uuid="{########-####-####-####-############}" location="/VBOX/ISO/CentOS-4.7-x86_64-bin5of5.iso"/>
        <Image uuid="{########-####-####-####-############}" location="/VBOX/ISO/CentOS-4.7.ServerCD-i386.iso"/>
        <Image uuid="{########-####-####-####-############}" location="/VBOX/ISO/CentOS-4.7.ServerCD-x86_64.iso"/>
      </DVDImages>
      <FloppyImages/>
    </MediaRegistry>
    <NetserviceRegistry>
      <DHCPServers>
        <DHCPServer networkName="HostInterfaceNetworking-vboxnet0" IPAddress="192.168.56.2" networkMask="255.255.255.0" lowerIP="192.168.56.3" upperIP="192.168.56.255" enabled="1"/>
      </DHCPServers>
    </NetserviceRegistry>
    <USBDeviceFilters/>
    <SystemProperties defaultMachineFolder="/VBOX/Machines" defaultHardDiskFolder="/VBOX/VDI" defaultHardDiskFormat="VDI" remoteDisplayAuthLibrary="VRDPAuth" webServiceAuthLibrary="VRDPAuth" HWVirtExEnabled="false" LogHistoryCount="3"/>
  </Global>
</VirtualBox>
vboxmember
Posts: 33
Joined: 19. Apr 2009, 05:08
Primary OS: Ubuntu 8.04
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP

Re: VirtualBox failed to start.

Post by vboxmember »

fixedwheel,
I have no idea what was wrong with me on June 4th when I reported that I did not have a /var/log/ directory because I checked and of course I do have one. I must have been out of my mind from sleep deprivation (Finals week at school). Any way, its the weekend now and I finally got some rest and hopefully I'm thinking a little more clearly.

[Problems]
You have raised two very important yet slightly disturbing points.
1. I don't appear to have a /home/username/.VirtualBox/ directory. (This is true for all user accounts except root).
2. The xml file in /root/.VirtualBox/ doesn't appear to have any path information relevant to starting VitrtualBox in VitrtualBox.xml

[Actions to be taken]
1. I will check the logs to see if I can find any information related to VirtualBox not starting in any of the files. (If there is a particular file I should be looking at, I would appreciate a tip as to which one that would be. Thanks.)
2. I will try to manually edit /root/.VirtualBox/VirtualBox.xml to reflect all the important paths that I have on this computer that are equivalent to the ones mentioned in your xml file. I will then attempt to start a VB session as root to see if that fixed anything or raises any new error messages.
3. If that works I will attempt to make a ~/.VirtualBox folder in a users home directory and copy /root/.VirtualBox/VirtualBox.xml as well as compreg.dat and xpti.dat to that directory to see if that will help fix the problem for that users account.

[Questions]
1. How would changing the directory name from /media/ic3_1/.VirtualBox/ (where Machines and HardDisks folders are located) to /media/ic3_01/.VirtualBox cause the ~/.VirtualBox directories to disappear?
2. Shouldn't there be a mechanism for smoothly changing a folder name without causing all these problems? Or is this something that might need to be put on a wish list for future releases?

[Notes]
I will report back soon, when I'm able to find out more information about what happened and whether or not I was able to fix it.

fixedwheel,
Thank you for all the tips and hints you've given me to try out some new avenues for fixing this problem. I really appreciate your taking the time to help. Thanks.
Last edited by vboxmember on 6. Jun 2009, 18:11, edited 1 time in total.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: [UNSolved] VirtualBox failed to start.

Post by Sasquatch »

Ok, if you want to have the same VMs for both users accessible, you can do two things to get that working. One involves symlinking ~/.VirtualBox folder to your /media one. The other is setting the system variable VBOX_USER_HOME to the /media one. Advantage of the last one, is that it's a system wide variable, you can change in one place if the location is changed.

Now assuming the above to be true, you have to check another thing for your users. Are they a member of the VBoxUsers group? If they aren't, then that will explain the error you got. The users can't access the kernel module unless they are in the group.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
vboxmember
Posts: 33
Joined: 19. Apr 2009, 05:08
Primary OS: Ubuntu 8.04
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP

Re: VirtualBox failed to start.

Post by vboxmember »

[Update:]

SOLVED:
I had updated the environment variables to point to the correct mount point (e.g. /media/ic3_01/.VirtualBox/), but VirtualBox would still not start correctly. When I exited to a CLI, and issued "printenv VBOX_USER_HOME" it gave "/media/ic3_1/.VirtualBox/" which is completely not what I had set in all the system wide environment variable files. However, once I rebooted the computer, I was able to start VirtualBox just like before and everything seemed to be working ok with one exception: When I start up a shell and type "printenv" it told me that VBOX_USER_HOME was still pointing to "/media/ic3_1/.VirtualBox/" which no longer exists. This suggested there was an environment variable being set in one of the local session files, in my case it was in ~/.bashrc. I erased that reference to VBOX_USER_HOME since it is now set correctly in /etc/environment which should pertain to all sessions for all users. VirtualBox is now working correctly just like it was before I changed the computers mount point for it.

Sasquatch,
Thanks for the reminder about environment variables. I've been making a list of things to check when troubleshooting VB but I forgot to add that one to the list. Also I think I'm beginning to understand your symbolic link solution, but I have one question about it. Does the symbolic link get automatically updated by the OS if you move or rename the target that the link is pointing to? If thats the case then that might be a better solution then to write a bash script to update /etc/environment any time the mount point is changed.

Thanks again for all the helpful tips and tricks to get things working again.

[Detailed decsription of solution (for people searching for one)]: (In the context of VirtualBox giving the specific error message listed in the first post of this thread, and in the context of using it for multiple user accounts.)
Step 1. There was a need to change the mount point for VirtualBox. So the mount point was changed.

Step 2. VirtualBox was no longer able to find its files because the environment variables were still pointing to the old path where VirtualBox used to be before the mount point for it was changed. The environment variable was updated in "/etc/environment" from "export VBOX_USER_HOME=/media/ic3_1/.VirtualBox/" to "export VBOX_USER_HOME=/media/ic3_01/.VirtualBox/" (where "/media/ic3_01/.VirtualBox" is equivalent to where ever your keeping the ".VirtualBox" folder for multiple users.)

Step 3. Check that the changes are thorough and complete. Start VirtualBox to see if it starts as it did before. In my case it did not. So I rebooted the computer, (I probably could have just restarted my KDE session by logging out then back in again), and the environment variables were updated and VirtualBox started as it did before. Also check the environment variables using the "printenv VBOX_USER_HOME" command in the CLI. In my case it returned an incorrect result which meant I had a reference to VBOX_USER_HOME in a local session file someplace. If thats the case you'll want to check in any of the following files for the "VBOX_USER_HOME" variable to see if its set. If you find it in any of these files you can probably just delete it since its set in /etc/environment.
~/.profile
~/.bash_profile or ~./bash_login
~/.bashrc
(where "~/" is referring to your "/home/username" folder and "username" is the name of the account your checking in)

Step 4. Write a document of how the problem was fixedand file it someplace so you can troubleshoot it on your own the next time. ;)
Post Reply