VB 5.1 fails to start VMs after upgrade to 5.1.10 on debian stretch amd64

Discussions related to using VirtualBox on Linux hosts.
Post Reply
ukrcald
Posts: 6
Joined: 7. Jul 2009, 21:45
Primary OS: Debian Lenny
VBox Version: PUEL
Guest OSses: win xp

VB 5.1 fails to start VMs after upgrade to 5.1.10 on debian stretch amd64

Post by ukrcald »

First post so please don't be too brutal with me.

I've just upgraded from the previous latest VB in the VB debian repo:
deb haych tee tee pee dot dot dot debian stretch contrib - (i'm too new to post urls)
to 5.1.10 and my VM's fail to start.

I get:
Failed to open a session for the virtual machine win10_64.

The virtual machine 'win10_64' has terminated unexpectedly during startup with exit code 1 (0x1).

Result Code: NS_ERROR_FAILURE (0x80004005)
Component: MachineWrap
Interface: IMachine {b2547866-a0a1-4391-8b86-6952d82efaa0}

then another box sayign kernel driver no installed please run '/sbin/vboxconfig'

So...
root@black:/home/rich/work# /sbin/vboxconfig

Created symlink /etc/systemd/system/multi-user.target.wants/vboxdrv.service → /lib/systemd/system/vboxdrv.service.
Created symlink /etc/systemd/system/multi-user.target.wants/vboxballoonctrl-service.service → /lib/systemd/system/vboxballoonctrl-service.service.
Created symlink /etc/systemd/system/multi-user.target.wants/vboxautostart-service.service → /lib/systemd/system/vboxautostart-service.service.
Created symlink /etc/systemd/system/multi-user.target.wants/vboxweb-service.service → /lib/systemd/system/vboxweb-service.service.
vboxdrv.sh: Building VirtualBox kernel modules.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
vboxdrv.sh: failed: modprobe vboxdrv failed. Please use 'dmesg' to find out why.

There were problems setting up VirtualBox. To re-start the set-up process, run
/sbin/vboxconfig
as root.


dmesg
gives:
[11735.600209] vboxdrv: Unknown symbol mcount (err 0)
[11747.014131] vboxdrv: Unknown symbol mcount (err 0)
[11747.080583] vboxdrv: Unknown symbol mcount (err 0)
[11758.463109] vboxdrv: Unknown symbol mcount (err 0)


modprobe vboxdrv
gives:
modprobe: ERROR: could not insert 'vboxdrv': Unknown symbol in module, or unknown parameter (see dmesg)


and round we go...


Is there any way I can help fix this?

Or better still has it alreay been fixed?

Hopefully yours, Rich
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: VB 5.1 fails to start VMs after upgrade to 5.1.10 on debian stretch amd64

Post by Perryg »

First thing to try is to remove VirtualBox and then install the new version. It really matters more if you are upgrading to a new major version ( you didn't state what version you had previously ) but I have see if a few times with minor versions that had updates to critical areas.
ukrcald
Posts: 6
Joined: 7. Jul 2009, 21:45
Primary OS: Debian Lenny
VBox Version: PUEL
Guest OSses: win xp

Re: VB 5.1 fails to start VMs after upgrade to 5.1.10 on debian stretch amd64

Post by ukrcald »

Hi Perryg
Yup, I tried this already, probably should have mentioned that.

apt-get purge VirtualBox-5.1
apt-get update
apt-get install VirtualBox-5.1

the install gives me:
...
Preparing to unpack .../virtualbox-5.1_5.1.10-112026~Debian~stretch_amd64.deb ...
Unpacking virtualbox-5.1 (5.1.10-112026~Debian~stretch) ...
...
addgroup: The group `vboxusers' already exists as a system group. Exiting.
Created symlink /etc/systemd/system/multi-user.target.wants/vboxdrv.service → /lib/systemd/system/vboxdrv.service.
Created symlink /etc/systemd/system/multi-user.target.wants/vboxballoonctrl-service.service → /lib/systemd/system/vboxballoonctrl-service.service.
Created symlink /etc/systemd/system/multi-user.target.wants/vboxautostart-service.service → /lib/systemd/system/vboxautostart-service.service.
Created symlink /etc/systemd/system/multi-user.target.wants/vboxweb-service.service → /lib/systemd/system/vboxweb-service.service.
vboxdrv.sh: failed: modprobe vboxdrv failed. Please use 'dmesg' to find out why.

There were problems setting up VirtualBox. To re-start the set-up process, run
/sbin/vboxconfig
as root.
Processing triggers for systemd (232-3) ...
Processing triggers for shared-mime-info (1.7-1) ...
Unknown media type in type 'all/all'
Unknown media type in type 'all/allfiles'
Processing triggers for hicolor-icon-theme (0.15-1) ...
.


and just for completeness:
root@black:/home/rich/work# /sbin/vboxconfig
Created symlink /etc/systemd/system/multi-user.target.wants/vboxdrv.service → /lib/systemd/system/vboxdrv.service.
Created symlink /etc/systemd/system/multi-user.target.wants/vboxballoonctrl-service.service → /lib/systemd/system/vboxballoonctrl-service.service.
Created symlink /etc/systemd/system/multi-user.target.wants/vboxautostart-service.service → /lib/systemd/system/vboxautostart-service.service.
Created symlink /etc/systemd/system/multi-user.target.wants/vboxweb-service.service → /lib/systemd/system/vboxweb-service.service.
vboxdrv.sh: Building VirtualBox kernel modules.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
vboxdrv.sh: failed: modprobe vboxdrv failed. Please use 'dmesg' to find out why.

There were problems setting up VirtualBox. To re-start the set-up process, run
/sbin/vboxconfig
as root.

with dmesg giving the same as before :-/
...
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: VB 5.1 fails to start VMs after upgrade to 5.1.10 on debian stretch amd64

Post by Perryg »

vboxconfig was for the old systemD and replaced with "rcvboxdrv setup" IIRC. So you did have a older version before. I would purge the install as before and then make sure all related vbox information is gone. After that I would download the deb package from virtualbox.org and manually install it using dpkg all in a hope that it clears up the mess.
ukrcald
Posts: 6
Joined: 7. Jul 2009, 21:45
Primary OS: Debian Lenny
VBox Version: PUEL
Guest OSses: win xp

Re: VB 5.1 fails to start VMs after upgrade to 5.1.10 on debian stretch amd64

Post by ukrcald »

OK, will give that a try,
It look like then, that there is at least some issue with the VB debian package, as it is that that is sugesting to run:
vboxconfig

more later ...

Cheers!
ukrcald
Posts: 6
Joined: 7. Jul 2009, 21:45
Primary OS: Debian Lenny
VBox Version: PUEL
Guest OSses: win xp

Re: VB 5.1 fails to start VMs after upgrade to 5.1.10 on debian stretch amd64

Post by ukrcald »

Same as before I'm affraid:
rich@black:~$ VirtualBox
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (4.8.0-1-custom) or it failed to
load. Please recompile the kernel module and install it by

sudo /sbin/vboxconfig

You will not be able to start VMs until this problem is fixed.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: VB 5.1 fails to start VMs after upgrade to 5.1.10 on debian stretch amd64

Post by Perryg »

Same end result but different warning. I'll get back later after I run some tests.
Where did you get the custom kernel, how was it installed, and do you actually have the right headers?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: VB 5.1 fails to start VMs after upgrade to 5.1.10 on debian stretch amd64

Post by Perryg »

I just tested this on SID that has 4.8 kernel and the findings are below
  • * Updated to today on SID
    * Downloaded and installed 5.1.10 using dpkg.
    * Got errors about missing packages.
    * Ran apt-get install -f to obtain the missing packages and finish the install
    * Ended up with a working VirtualBox. So I know it works, but my kernel does not say custom, so I am still waiting for your answer on that one.
Only difference in what I did and you is mine was a clean install not an upgrade, but a purge should take care of that for you and of course use dpkg to install the package until you get this resolved.
ukrcald
Posts: 6
Joined: 7. Jul 2009, 21:45
Primary OS: Debian Lenny
VBox Version: PUEL
Guest OSses: win xp

Re: VB 5.1 fails to start VMs after upgrade to 5.1.10 on debian stretch amd64

Post by ukrcald »

Hi there Perryg
Hum.. this looks like a custom kernel thing then.
I compiled the kernel myself, from kernel.org, make-kpkg etc...
and have the headers for the kernel installed.

I've install linux-image-amd64 linux-headers-amd64 and VB works again... had a little trouble re aligning them with the newer extension pack, but that's fixed.

So... what is missing from the installation that means it can't detect custom kernels???

--- thanks for you help on this my the way! are you an Oracle man or just a concerded passer by?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: VB 5.1 fails to start VMs after upgrade to 5.1.10 on debian stretch amd64

Post by Perryg »

It's not that it does not detect the custom kernel it is just that the custom kernel has something wrong/different with it. "vboxdrv: Unknown symbol mcount" suggests an issue with gcc. gcc -v will give you the running version then you need to check and see what the custom kernel needs to properly compile external modules. Also installing newer gcc and not removing/replacing may give you two versions installed and that will confuse things for sure.
ukrcald
Posts: 6
Joined: 7. Jul 2009, 21:45
Primary OS: Debian Lenny
VBox Version: PUEL
Guest OSses: win xp

Re: VB 5.1 fails to start VMs after upgrade to 5.1.10 on debian stretch amd64

Post by ukrcald »

OK, I may be in some kind or debian - testing - gcc hole here.
I'm running gcc version 6.2.0 20161109 (Debian 6.2.0-13)

i don't know how to "see what the custom kernel needs to properly compile external modules"
But in the mean time I wondered if i needed to make sure that the new modules are compiled with the same compiler which compiled the running kernel...

so I tried to recompile the kernel.....
This failed : ...." Cannot use CONFIG_CC_STACKPROTECTOR_REGULAR: -fstack-protector not supported by compiler ..."
if you are interested. :-)

So maybe this whole thing is somehow due to me being in the middle of a gcc - make-kpkg - newer kernels - type snafoo?

So unless you can suggest anything else that might be the problem on the VB side, I'm kind of happy to leave it this for a while as I can make do with the running stock debian kernel and I have my working VB machines back..
I'm happy to help test anything out, but mostly thank you for all your help with this! Double thumbs up to Perryg!
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: VB 5.1 fails to start VMs after upgrade to 5.1.10 on debian stretch amd64

Post by Perryg »

fstack-protector not supported by compiler
There's your confirmation.

That said My gcc is "gcc version 6.2.0 20161109 (Debian 6.2.0-13) " and compiles properly with the stock 4.8.0-1-amd64 kernel just fine. So if it were me I would look at the requirements of the custom kernel or the configuration of it some how or approach the kernel folks to see what they may have eliminated in the tree ( wouldn't be the first time ).

May I ask why the custom kernel? Is there a reason or just to see if you can?
Post Reply