Page 1 of 1
NS_ERROR_FAILURE
Posted: 8. Jun 2017, 15:20
by wiill
Hi,
My bad: vbox was working fine but I updated it
Call me stupid
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
Re: NS_ERROR_FAILURE
Posted: 8. Jun 2017, 16:55
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.
Re: NS_ERROR_FAILURE
Posted: 9. Jun 2017, 10:48
by wiill
Yes, but I don't understand why the required permission level would have changed between versions? Up to to root level?
Re: NS_ERROR_FAILURE
Posted: 9. Jun 2017, 11:03
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...
Re: NS_ERROR_FAILURE
Posted: 9. Jun 2017, 15:56
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
Re: NS_ERROR_FAILURE
Posted: 9. Jun 2017, 17:46
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.
Re: NS_ERROR_FAILURE
Posted: 9. Jun 2017, 18:15
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

Re: NS_ERROR_FAILURE
Posted: 9. Jun 2017, 18:26
by Martin
How do you start Virtualbox? From a predefined launcher, from command line or from a manually created launcher?
Re: NS_ERROR_FAILURE
Posted: 9. Jun 2017, 18:59
by wiill
shortcut automatically created at install/update
Re: NS_ERROR_FAILURE
Posted: 9. Jun 2017, 20:24
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:
Run VirtualBox and post the output of (notice the double ">"):
ZIP "
/home/pascal/ls-alR.txt" and post it here...
Re: NS_ERROR_FAILURE
Posted: 10. Jun 2017, 12:20
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:
Here's the file you ask for. Please note this is the ubuntu flavor (4.3.36)
Re: NS_ERROR_FAILURE
Posted: 10. Jun 2017, 12:44
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).