Can't open Virtual Box, "failed to acquire the VirtualBox COM object"

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
dan casebeer
Posts: 1
Joined: 10. Dec 2017, 01:15

Can't open Virtual Box, "failed to acquire the VirtualBox COM object"

Post by dan casebeer »

So I had VirtualBox running just fine for the past month or two and then when the new update came out I tried logging onto one of my Linux VM's and I got a whole bunch of errors, so I uninstalled and tried to start fresh with the new update. After installing, when I try to open the program I get
"Failed to acquire the VirtualBox COM object"

Details: Document is empty
Location: '/Users/Library/VirtualBox/VirtualBox.xml', line 1 (0), column 1.
/Users/vbox/tinderbox/mac-rel/src/VBox/Main/src-server/VirtualBoxImpl.cpp[554] (nsresult VirtualBox::init()).

Result Code: NS_ERROR_FAILURE (0x8004005)
I've uninstalled, reinstalled, rebooted and this keeps happening. Any ideas?

EDIT: running High Sierra 10.13.1
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: Can't open Virtual Box, "failed to acquire the VirtualBox COM object"

Post by socratis »

dan casebeer wrote:Document is empty
Location: '/Users/Library/VirtualBox/VirtualBox.xml', line 1 (0), column 1.
That file is obviously corrupted. If you go to that location [1], you'll see a 0-bytes file. In that same folder, chances are you're going to find a file named "VirtualBox.xml-prev". Delete the "VirtualBox.xml" file (the 0-bytes one) and rename the "VirtualBox.xml-prev" to "VirtualBox.xml".

If there is no "VirtualBox.xml-prev", or if it's also a 0-bytes file, then don't worry, it's still fixable. Just delete both of these files, they will be re-created when VirtualBox runs again. You simply would have lost any VirtualBox preferences and registered VMs that you might have had. Not the VMs themselves, the list of the VMs. You need to re-register your VMs, by either double-clicking on the .vbox file of every VM that you have, or go to the menu "Machine" » "Add" and navigate to the .vbox file of each of your existing VMs. Your VMs are located (by default) in "/Users/<username>/VirtualBox VMs".

Also, please read (and consider voting) about this in ticket #10851: VM config file lost after host power off.


[1]: One thing that I noticed... There should be no "/Users/Library" folder, only a "/Users/<username>/Library" one. Did you try to obfuscate things by deleting your username from the path?
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.
charlene
Posts: 2
Joined: 9. Jan 2019, 02:01

Re: Can't open Virtual Box, "failed to acquire the VirtualBox COM object"

Post by charlene »

Dear Socratis,
Location: '/Users/Library/VirtualBox/VirtualBox.xml', line 1 (0), column 1.
I have the same issue where VirtualBox won't run anymore, but I do not have VirtualBox in my Library so VirtualBox.xml and VirtualBox.xml-prev is non-existent as well. I've installed/un-installed/re-installed/re-booted but the folder is still gone. Could you help? Thank you!!

/Users/Library --> no VirtualBox folder!
My VirtualBox VMs are still available.
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: Can't open Virtual Box, "failed to acquire the VirtualBox COM object"

Post by socratis »

I honestly don't know why you're seeing this! The only place VirtualBox should be looking is under the Library in your home folder, i.e. "/Users/charlene/Library/VirtualBox/VirtualBox.xml" (assuming "charlene" is your username on your OSX host). Can you check in that location?
charlene wrote:VirtualBox won't run anymore
You mean it used to run?
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.
charlene
Posts: 2
Joined: 9. Jan 2019, 02:01

Re: Can't open Virtual Box, "failed to acquire the VirtualBox COM object"

Post by charlene »

Hi Socratis,

Thank you so much for your quick reply! Yes, Virtual Box was working, and I checked my library multiple times yesterday and it was missing! However.....I just checked again this morning and the folder was back! ? :? :? confused, but I'm glad it's back... I followed your steps above and it works again. Sorry for taking up your time and thank you for your 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: Can't open Virtual Box, "failed to acquire the VirtualBox COM object"

Post by socratis »

I highly doubt the following, but... have you manually relocated your "/Users" folder? To an external HD for portability perhaps?

Because as long as I've used computers I've never seen a folder pull a... "Houdini" on me! :)
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.
jochor
Posts: 2
Joined: 27. Jul 2019, 07:41

Re: Can't open Virtual Box, "failed to acquire the VirtualBox COM object"

Post by jochor »

Hello, I have the same problem. The error is:
Fallo al adquirir el objeto VirtualBox COM.
La aplicación terminará ahora.
Document is empty.
Location: '/Users/Pepe/Library/VirtualBox/VirtualBox.xml', line 1 (0), column 1.
/Users/vbox/tinderbox/6.0-mac-rel/src/VBox/Main/src-server/VirtualBoxImpl.cpp[624] (nsresult VirtualBox::init()).
Código resultado: NS_ERROR_FAILURE (0x80004005)
Componente: VirtualBoxWrap
Interfaz: IVirtualBox {d0a0163f-e254-4e5b-a1f2-011cf991c38d}
Receptor: IVirtualBoxClient {d2937a8e-cb8d-4382-90ba-b7da78a74573}
But my problem is that I can´t find the folder Library. Inside /Users/Pepe/ there is not a carpet named Library either a carpet named Virtualbox.
Before i was using de virtual machine without problems

Any help?, Thanks!
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: Can't open Virtual Box, "failed to acquire the VirtualBox COM object"

Post by socratis »

jochor wrote:But my problem is that I can´t find the folder Library
The Library folder is hidden by default (thanks Apple). You can either go there manually from the Finder by using the menu "Go" » "Go to Folder... (⌘⇧G)" and entering "/Users/Pepe/Library/VirtualBox", or by showing all the files in Finder. You can do the latter by issuing the command from the Terminal:
  • 
    defaults write com.apple.Finder AppleShowAllFiles TRUE ; killall Finder
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.
jochor
Posts: 2
Joined: 27. Jul 2019, 07:41

Re: Can't open Virtual Box, "failed to acquire the VirtualBox COM object"

Post by jochor »

Thanks, It Worked! :D
Post Reply