Page 1 of 1

[Resolved] Details: code NS_ERROR_FAILURE (0x80004005), component MachineWrap, interface IMachine

Posted: 8. Feb 2019, 17:55
by Joshua Schlichting
Hello, all! This is my first post here, and I'd like to note that I've searched this problem for a few hours, coming across mostly "Vagrant" related posts/solutions. Nothing has quite been what I need. With that said, I apologize if this same issue has been solved here. I did attempt to search different keywords from my error, but I didn't run into anything that was what I needed.

I'm attempting to install a virtual machine via SSH on a server using VBoxManage. The server is running Ubuntu 18.10. The goal is to set this up completely via SSH, so that in the future, I can do this on a server without any sort of GUI. So, let's just pretend I don't have physical access to this server to use the qt virtual box package.

VDI Image being used from: osboxes centos-7-1804-vbox (no link allowed on first post ¯\_(ツ)_/¯ )

Code: Select all

$ vboxmanage -version
6.0.4r128413
$ id reflects that the current user IS in vboxusers


Here's what I've done so far:

Code: Select all

$ VBoxManage createvm --name "CentOS7" --ostype Linux_64 --register
$ VBoxManage storagectl CentOS7 --name SATA --add sata --controller IntelAhci --bootable on --hostiocache off
$ VBoxManage storageattach CentOS7 --storagectl SATA --port 0 --device 0 --type hdd --medium '/path/to/VirtualBox VMs/CentOS7/centos7.vdi'
$ VBoxManage modifyvm CentOS7 --memory 10240 --cpus 2 --chipset piix3
$ VBoxManage startvm CentOS7 --type headless
Waiting for VM "CentOS7" to power on...
VBoxManage: error: The virtual machine 'CentOS7' has terminated unexpectedly during startup with exit code 1 (0x1)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component MachineWrap, interface IMachine
I'm really not sure where I should be searching next. I'm thinking that there are probably some necessary settings that I'm missing. Would anyone mind pointing me in the right direction? Thanks in advance!

Re: Details: code NS_ERROR_FAILURE (0x80004005), component MachineWrap, interface IMachine

Posted: 8. Feb 2019, 18:29
by socratis
Joshua Schlichting wrote:I'm thinking that there are probably some necessary settings that I'm missing
First of all, CentOS is not "Linux_64", that's the generic Linux template. CentOS is "RedHat_64". And since you're missing a lot of defaults changes, a lot of defaults are going to be wrong.

But, 99.9% you're right. Here's a technique that you can try while you have the GUI as well. Create a "CentOS-GUI" VM from... the GUI, with the settings that you want and then compare the output of "VBoxManage showvminfo <VMname>" for the two VMs.

Another thing is to try starting the VM from the GUI, before going "VBoxHeadless". See what's the error that you get there. Do *NOT* touch the settings before starting it.

Re: Details: code NS_ERROR_FAILURE (0x80004005), component MachineWrap, interface IMachine

Posted: 8. Feb 2019, 21:40
by Joshua Schlichting
Alright, I ended up walking over to the server and trying to run the VDI from the GUI. I got the exact error posted here:
askubuntu dot com /questions/837427/virtualbox-kernel-modules-do-not-match-this-version-of-virtualbox ( I'm still too new to this forum to post legitimate hyperlinks ¯\_(ツ)_/¯ )
RTR3InitEx failed with rc=-1912 (rc=-1912)
The VirtualBox kernel modules do not match this version of VirtualBox. The installation of VirtualBox was apparently not successful. Executing '/sbin/vboxconfig' may correct this. Make sure that you do not mix the OSE version and the PUEL version of VirtualBox.

where: supR3HardenedMainInitRuntime what: 4
VERR_VM_DRIVER_VERSION_MISMATCH (-1912) - The installed support driver doesn't match the version of the user.
and the accepted answer worked for me!!!

Code: Select all

$ sudo apt remove --purge virtualbox
$ sudo apt install virtualbox
$ sudo apt install virtualbox-dkms

Re: Details: code NS_ERROR_FAILURE (0x80004005), component MachineWrap, interface IMachine

Posted: 8. Feb 2019, 21:51
by socratis
So it was a broken VirtualBox installation after all? Is it working now? Can we close this?

Re: Details: code NS_ERROR_FAILURE (0x80004005), component MachineWrap, interface IMachine

Posted: 8. Feb 2019, 21:55
by Joshua Schlichting
It appears so. I think it's safe to close this. Thanks for your time!

Re: [Resolved] Details: code NS_ERROR_FAILURE (0x80004005), component MachineWrap, interface IMachin

Posted: 9. May 2019, 17:55
by soyouzz
Hello,
I have exactly the same issue (NS_ERROR_FAILURE (0x80004005), component MachineWrap, interface IMachine) with VirtualBox 6.0.6r130049 after upgrading to Ubuntu 18.04. The .deb file is installed from the website directly. What I've tried:
- I tried to run the command:

Code: Select all

sudo /sbin/vboxconfig
it restart the service and rebuild the kernel modules but no success
- I tried to uninstall it and install virtualbox and virtualbox-dkms from the repository but no success also.

What can I do ?

Re: [Resolved] Details: code NS_ERROR_FAILURE (0x80004005), component MachineWrap, interface IMachin

Posted: 25. Dec 2020, 12:05
by bluegroper
soyouzz wrote: What can I do ?
You can try the following :
Completely delete the Virtualbox, then
modinfo vboxdrv
Manually delete any redundant (unwanted) module/s.
Then do fresh install of latest VirtualBox, followed by rebuild of kernel modules
/usr/sbin/vboxconfig
Worked for me.
HTH