The Linux Community Forum

Support => General Help & Advice => Topic started by: mikep on March 19, 2019, 08:38:39 pm

Title: Virtualbox machines failing to start [Solved]
Post by: mikep on March 19, 2019, 08:38:39 pm
My working installation of Virtualbox has just stopped working. I haven't made any changes, so I assume a recent update broke it.

The error is as follows.
Failed to open a session for the virtual machine Windows XP.

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

Result Code: NS_ERROR_FAILURE (0x80004005)
Component: MachineWrap
Interface: IMachine {85cd948e-a71f-4289-281e-0ca7ad48cd89}

Followed by..
Kernel driver not installed (rc=-1908)

The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or
there is a permission problem with /dev/vboxdrv. Please reinstall the
kernel module by executing

'/sbin/vboxconfig'

as root.

where: suplibOsinit what: 3 VERR_VM_DRIVER_NOT_INSTALLED
(-1908) - The support driver is not installed. On linux, open returned
ENOENT.


I've tried running vboxconfig, but that failed as follows,

mike@xubuntu:~$ sudo /sbin/vboxconfig
[sudo] password for mike:
vboxdrv.sh: Stopping VirtualBox services.
depmod: WARNING: could not open /lib/modules/4.4.0-141-generic/modules.order: No such file or directory
depmod: WARNING: could not open /lib/modules/4.4.0-141-generic/modules.builtin: No such file or directory
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
vboxdrv.sh: failed: Look at /var/log/vbox-setup.log to find out what went wrong.

There were problems setting up VirtualBox.  To re-start the set-up process, run
  /sbin/vboxconfig
as root.
mike@xubuntu:~$ sudo /sbin/vboxconfig
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
vboxdrv.sh: failed: Look at /var/log/vbox-setup.log to find out what went wrong.

There were problems setting up VirtualBox.  To re-start the set-up process, run
  /sbin/vboxconfig
as root.
mike@xubuntu:~$

Any suggestions much appreciated. Virtualbox keeps telling me a new version is avaiable but so far I haven't upgraded. I'm now thinking that might fix this problem..


Title: Re: Virtualbox machines failing to start
Post by: mikep on March 26, 2019, 12:41:53 am
Anyone? Was it something I said?  :-\
Title: Re: Virtualbox machines failing to start
Post by: Mark Greaves (PCNetSpec) on March 26, 2019, 02:19:47 pm
Try
Code: [Select]
sudo apt-get install build-essential linux-headers-generic dkms module-assistant
then
Code: [Select]
sudo m-a prepare
then
Code: [Select]
sudo /etc/init.d/vboxdrv setup
Title: Re: Virtualbox machines failing to start
Post by: mikep on March 28, 2019, 08:56:30 pm
Thanks Mark,

I ran the first two commands. Module-assistant got installed but everything else was already on the newest version.

The third command fails because vboxdrv doesn't exist in etc/init.d/
Title: Re: Virtualbox machines failing to start
Post by: Mark Greaves (PCNetSpec) on March 28, 2019, 11:36:42 pm
Okay so now what does
Code: [Select]
sudo /sbin/vboxconfig
return ?

and what's the output from
Code: [Select]
uname -a
and
Code: [Select]
dpkg -l | grep linux-modules
Title: Re: Virtualbox machines failing to start
Post by: mikep on March 29, 2019, 11:05:04 pm
Here are the three commands..

mike@xubuntu:~$ sudo /sbin/vboxconfig
[sudo] password for mike:
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
vboxdrv.sh: failed: Look at /var/log/vbox-setup.log to find out what went wrong.

There were problems setting up VirtualBox.  To re-start the set-up process, run
  /sbin/vboxconfig
as root.
mike@xubuntu:~$ uname -a
Linux xubuntu 4.4.0-143-generic #169-Ubuntu SMP Thu Feb 7 07:56:38 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
mike@xubuntu:~$ dpkg -l | grep linux-modules
ii  linux-modules-4.4.0-143-generic             4.4.0-143.169                              amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
ii  linux-modules-extra-4.4.0-143-generic       4.4.0-143.169                              amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
mike@xubuntu:~$ ^C
mike@xubuntu:~$


and here's /var/log/vbox-setup.log

(click to show/hide)
Title: Re: Virtualbox machines failing to start
Post by: Mark Greaves (PCNetSpec) on March 30, 2019, 12:29:39 am
Okay it seems this is a known bug in virtualbox 5.n.n
https://forums.virtualbox.org/viewtopic.php?f=7&t=91814
and
https://askubuntu.com/questions/1126591/virtualbox-error-after-last-ubuntu-software-update
so let's try a different tack and install the latest virtualbox 6.0.4, where it's supposed to be fixed.

What's the output from:
Code: [Select]
cat /etc/lsb-release
and:
Code: [Select]
dpkg -l | grep virtualbox
and (if any):
Code: [Select]
cat /etc/apt/sources.list | grep -i virtualbox
Title: Re: Virtualbox machines failing to start
Post by: mikep on March 30, 2019, 09:46:59 pm
mike@xubuntu:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.6 LTS"
mike@xubuntu:~$ dpkg -l | grep virtualbox
ii  virtualbox-5.2                              5.2.22-126460~Ubuntu~xenial                amd64        Oracle VM VirtualBox
mike@xubuntu:~$ cat /etc/apt/sources.list | grep -i virtualbox
###### Oracle VirtualBox repo
deb http://download.virtualbox.org/virtualbox/debian (http://download.virtualbox.org/virtualbox/debian) trusty contrib
mike@xubuntu:~$

I checked the links you provided, but half the info went over my head!
VB keeps offering me an upgrade to vn 5.2.26, but I've been leaving well alone thus far. I'm willing to give it a go though - I just hope I don't lose my VMs in the process.....
Title: Re: Virtualbox machines failing to start
Post by: Mark Greaves (PCNetSpec) on March 31, 2019, 04:35:50 pm
Okay first let's uninstall the old 5.2.22 version of VirtualBox .. run:
Code: [Select]
sudo apt-get remove --purge virtaulbox*
Now let's install version 6.x.x

First you need to add the repo keys, so run:
Code: [Select]
wget -q http://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
then
Code: [Select]
wget -q http://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
Now you need to fix a line that you've previously added to your sources.list, but is currently for the wrong version of Ubuntu .. so run:
Code: [Select]
sudo gedit /etc/apt/sources.list
and change these two lines from:-
Code: [Select]
###### Oracle VirtualBox repo
deb http://download.virtualbox.org/virtualbox/debian trusty contrib
to:-
Code: [Select]
###### Oracle VirtualBox repo
deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian xenial contrib
SAVE the file, and exit gedit.

Now update your package cache:
Code: [Select]
sudo apt-get update
and finally install VirtualBox 6.x.x:
Code: [Select]
sudo apt-get install virtualbox-6.0
Now see if VirtualBox works ?



If it does, it'd now be a good idea to install the extension pack .. so go to this page
https://www.virtualbox.org/wiki/Downloads (https://www.virtualbox.org/wiki/Downloads)
and under the heading:-

VirtualBox 6.0.4 Oracle VM VirtualBox Extension Pack

click the blue writing "All supported platforms" to download the extension pack.

Once you've downloaded Oracle_VM_VirtualBox_Extension_Pack-6.x.x.vbox-extpack .. double-click it to install it.
(if asked which app to use to open it, select VirtualBox)
Title: Re: Virtualbox machines failing to start
Post by: mikep on April 02, 2019, 08:50:56 pm
I'll do as you suggest in the next couple of days Mark, but first I'll back up my VMs, especially as we're doing a fresh install rather than an update.

I'll report back asap.

Thanks.
Title: Re: Virtualbox machines failing to start
Post by: Mark Greaves (PCNetSpec) on April 03, 2019, 12:50:19 am
They shouldn't need backing up, but it can't hurt :)
Title: Re: Virtualbox machines failing to start
Post by: mikep on April 20, 2019, 07:24:04 pm
Mark, you've done it again! Thank you.

VB is back up and running nicely.

I had to install the extension pack before it would work - something to do with the version of USB 2 I'd set up in the VMs. Having done that, it's fine.

Thanks again.

Mike
Title: Re: Virtualbox machines failing to start [Solved]
Post by: Mark Greaves (PCNetSpec) on April 20, 2019, 11:19:03 pm
Glad I could help :)
SimplePortal 2.3.3 © 2008-2010, SimplePortal