Page 1 of 1

[Resolved] Failed to acquire the VirtualBox COM object:NS_ERROR_INVALID_ARG (0x80070057)

Posted: 1. May 2019, 07:28
by avinashm
I was following the steps in installing the OpenSTF tool .
It requires installation of guests using vagrant. Had some problems with it and in the process DELETED the virtual OS's files created without gracefully removing it.
From then on, I am unable to open VBox or run any commands with VBoxManage.

Getting this below error message,

Code: Select all

'Failed to acquire the VirtualBox COM object.
The application will now terminate.

Cannot register the hard disk '/Users/avinash/VirtualBox VMs/core-01/coreos_production_vagrant_image.vmdk' {7f07cb38-0a0e-45ed-aa54-a095afa277c0} because a hard disk '/Users/avinash/VirtualBox VMs/core-01/coreos_production_vagrant_image.vmdk' with UUID {56322b27-3a0f-4f87-9282-3ca6be32bd62} already exists.

Result Code: NS_ERROR_INVALID_ARG (0x80070057)
Component: VirtualBoxWrap
Interface: IVirtualBox {d0a0163f-e254-4e5b-a1f2-011cf991c38d}
Callee: IVirtualBoxClient {d2937a8e-cb8d-4382-90ba-b7da78a74573} '
Tried uninstalling VBox using the uninstall tool and reinstalled again. Still the issue happens.
Please help to fix this issue.

Versions:
OS version: 10.14.4
VirtualBox Manager 6.0.6

Re: Failed to acquire the VirtualBox COM object:NS_ERROR_INVALID_ARG (0x80070057)

Posted: 1. May 2019, 08:11
by socratis
  1. Uninstall Vagrant, uninstall VirtualBox.
  2. Install VirtualBox.
  3. Post the two following files, ZIPPED together:
    • The "VirtualBox.xml" file located in "/Users/avinash/Library/VirtualBox/VirtualBox.xml".
    • The ".vbox" file located in "/Users/avinash/VirtualBox VMs/core-01/". Because of the discrepancies in the VM name and the VDI name, I unfortunately can't tell what the exact name will be, use your judgement.

Re: Failed to acquire the VirtualBox COM object:NS_ERROR_INVALID_ARG (0x80070057)

Posted: 1. May 2019, 13:24
by avinashm
I have added the files requested.
Please note that i had earlier deleted the entire folder 'Virtual VMs'. Then later created a folder in the same path, generated an empty vmdk file in another PC and placed it in the same path with the same name just to check if it works. So the .vbox file is a new one created but just modified the UUID.

Re: Failed to acquire the VirtualBox COM object:NS_ERROR_INVALID_ARG (0x80070057)

Posted: 1. May 2019, 13:46
by avinashm
Thanks Socratis.

Issue is solved.
Removed that particular UUID which is causing the problem from The "VirtualBox.xml" file located in "/Users/avinash/Library/VirtualBox/VirtualBox.xml.
Now the application opens. Bunch of thanks for your quick support.

Re: Failed to acquire the VirtualBox COM object:NS_ERROR_INVALID_ARG (0x80070057)

Posted: 1. May 2019, 16:55
by socratis
avinashm wrote:Bunch of thanks for your quick support.
I did nothing, don't blame me! :D

Maybe I pushed you in the right direction, sure, that's why I wanted to take a look at these two files.
avinashm wrote:Please note that i had earlier deleted the entire folder 'Virtual VMs'
If you had deleted the "VirtualBox.xml" file as well, it would have been as VirtualBox was never installed in your host, fresh start.
avinashm wrote:Then later created a folder in the same path, generated an empty vmdk file in another PC and placed it in the same path with the same name just to check if it works
There's no way in the known universe that such a setup would work. That would be similar to deleting your "/System" directory, then creating an empty one, and expect your OS to boot. Nope...

Glad you got it going, marking as [Resolved], however,

I would NOT suggest your solution for people that don't know what XML is!