NS_ERROR_FAILURE

Discussions related to using VirtualBox on Linux hosts.
Post Reply
wiill
Posts: 6
Joined: 8. Jun 2017, 15:12

NS_ERROR_FAILURE

Post by wiill »

Hi,

My bad: vbox was working fine but I updated it :roll:
Call me stupid :evil:

Result is I can't start my vm anymore :(

Guest OS : Ubuntu 14.04.05
Virtualbox version : 5.1.22 r115126 (Qt5.6.1)
Runtime error opening '/home/pascal/vbox/machine/Windows/Windows.vbox' for reading: -38(Access denied.).
/home/vbox/vbox-5.1.22/src/VBox/Main/src-server/MachineImpl.cpp[745] (nsresult Machine::i_registeredInit()).
Code d'erreur :
NS_ERROR_FAILURE (0x80004005)
Composant :
MachineWrap
Interface :
IMachine {b2547866-a0a1-4391-8b86-6952d82efaa0}
How can I solve that and retrieve access to my vm?

Thanks for the help
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: NS_ERROR_FAILURE

Post by socratis »

wiill wrote:Runtime error opening '/home/pascal/vbox/machine/Windows/Windows.vbox' for reading: -38(Access denied.).
The error seems pretty obvious to me. You don't have read access to that file mentioned above.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
wiill
Posts: 6
Joined: 8. Jun 2017, 15:12

Re: NS_ERROR_FAILURE

Post by wiill »

Yes, but I don't understand why the required permission level would have changed between versions? Up to to root level?
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: NS_ERROR_FAILURE

Post by socratis »

I wouldn't have the faintest idea what you could have done with your system, I'm not sitting in front of it. And, no, the requirements did not change in between versions, maybe your permissions have changed.

They security requirements are pretty basic: 1) you need read-write access to whatever you're going to be working on (your VMs and their configurations), and 2) VirtualBox needs to be owned by root (only) and everyone else having read-only access.

Note that I said "owned by root". That does NOT mean "run by root". You should be running VirtualBox with the least available privileges, even as low as guest VirtualBox should not have a problem. It might have a huge problem if you run as root.

So, check/fix your permissions and try again...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
wiill
Posts: 6
Joined: 8. Jun 2017, 15:12

Re: NS_ERROR_FAILURE

Post by wiill »

If I had done any change to my system, I would have mentioned it.
I only clicked the link to the update in virtualbox and then double-clicked .deb package that downloaded.
Period.

So please excuse me if I come here and ask for help because my VM won't start anymore after following the update suggestion from vbox.

That said, first I did "sudo apt-get autoremove --purge virtualbox*" and reinstalled vbox 4.3.36 from canonical sources (which didn't solve the problem, but at least I got rid of the problem maker).

Then I followed your advice and checked privileges on the .vbox file: as you guessed, all were set to root, so I changed to my profile (of course, not the owner).
Magic worked and the VM runs fine.

Thank you for pointing the source of the problem, but allow me to repeat this too:
1. No change was made to my system, except those performed by the official 5.1.22 r115126 (Qt5.6.1) vbox package
2. Culprit is the vbox update package, nothing dramatic, but still, it messed up the privileges on the VM files
3. Will definitely stick to the official package in my distribution and ignore the sneaky official "please update me" button
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: NS_ERROR_FAILURE

Post by socratis »

wiill wrote:1. No change was made to my system, except those performed by the official 5.1.22 r115126 (Qt5.6.1) vbox package
I didn't mean intentionally. Accidents happen. Installers happen. Misbehaving programs happen. The sure thing is that the VirtualBox installer does not mess with your user account. At all! Heck, there were complaints that the installer doesn't add your account automatically to the "vboxusers" group for convenience.
wiill wrote:2. Culprit is the vbox update package, nothing dramatic, but still, it messed up the privileges on the VM files
See above. Nothing like that happened due to the installer. You can check out the scripts after all...
wiill wrote:3. Will definitely stick to the official package in my distribution and ignore the sneaky official "please update me" button
If you do, then you should stick to the official support for your distribution, because in the VirtualBox forums the only VirtualBox supported is the official one, *not* the distro fork.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
wiill
Posts: 6
Joined: 8. Jun 2017, 15:12

Re: NS_ERROR_FAILURE

Post by wiill »

I managed to reproduce the glitch.
Install (update) vbox to 5.1.22 r115126 (Qt5.6.1)
Start vbox, the VM is there and ready to launch
Start the VM, do whatever you need, close it properly.
Close vbox.
Re-start vbox => Runtime error opening '/home/pascal/vbox/machine/Windows/Windows.vbox' for reading: -38(Access denied.).

Permissions were changed on the .vbox + vbox-prev files => you are right, the update doesn't change the permissions. The first launch does (?).

Restore proper permissions, start / close / start vbox/VM => works fine

PS: sorry, didn't know there was any difference between the official vbox and the version in ubuntu :oops:
Martin
Volunteer
Posts: 2561
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: NS_ERROR_FAILURE

Post by Martin »

How do you start Virtualbox? From a predefined launcher, from command line or from a manually created launcher?
wiill
Posts: 6
Joined: 8. Jun 2017, 15:12

Re: NS_ERROR_FAILURE

Post by wiill »

shortcut automatically created at install/update
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: NS_ERROR_FAILURE

Post by socratis »

You've got to check the permissions all the way to the .vbox file. You also have to check the "umask" of your host. And, please don't tell me you're running VirtualBox as root. Actually, can you please find out exactly what that shortcut does?

Here's what I'd like you to do. Before running VirtualBox, run:
  • ls -alR /home/pascal/vbox/ > /home/pascal/ls-alR.txt
Run VirtualBox and post the output of (notice the double ">"):
  • ls -alR /home/pascal/vbox/ >> /home/pascal/ls-alR.txt
ZIP "/home/pascal/ls-alR.txt" and post it here...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
wiill
Posts: 6
Joined: 8. Jun 2017, 15:12

Re: NS_ERROR_FAILURE

Post by wiill »

I'm not running virtualbox as root ;)

The shortcut is automatically created by Ubuntu when installing virtualbox. Here's the command line of the shortcut:

Code: Select all

VirtualBox %U
Here's the file you ask for. Please note this is the ubuntu flavor (4.3.36)
Attachments
ls-alR.txt.zip
(580 Bytes) Downloaded 7 times
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: NS_ERROR_FAILURE

Post by socratis »

/home/pascal/vbox/machine/Windows/Logs:
...
-rw------- 1 pascal pascal  95302 juin   9 15:42 VBox.log
-rw------- 1 root   root   123880 juin   7 16:24 VBox.log.1
-rw------- 1 pascal pascal 120716 mai    9 11:15 VBox.log.2
At some point you tried to(?) run as root. Please delete all the files that are not owned by you. And I'd like a similar output from the 5.1.22 session (after you've deleted the "rogue" files).
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply