VirtualBox error NS_ERROR_INVALID_ARG (0X80070057) when adding an existing virtual machine

If you've ever encountered the following error when adding an existing VM to your host:

 

Failed to open virtual machine located in *********.vbox.
Callee RC: NS_ERROR_INVALID_ARG (0X80070057)

 

or from the commandline  VBoxManage registervm VirtualMachineNameSample.vbox

VBoxManage: error: Code NS_ERROR_INVALID_ARG (0x80070057) - Invalid argument value (extended info not available)
VBoxManage: error: Context: "OpenMachine(Bstr(szVMFileAbs).raw(), Bstr(strPassword).raw(), machine.asOutParam())" at line 153 of file VBoxManageMisc.cpp

One thing that you can check is see if there's a non-existing file. In my case, the solution is to edit the .vbox file manually (which is in XML format) and remove the following line:

      <DVDImages>
        <Image uuid="{a82fec76-40db-4b60-9054-4fd156c8982a}" location="/usr/share/virtualbox/VBoxGuestAdditions.iso"/>
      </DVDImages>

 

Some people say that it could also because of insufficient disk space. In my case, there was plenty of space, but this file no longer exists since it's from a different machine.

Latest

VirtualBox error NS_ERROR_INVALID_ARG (0X80070057) when adding an existing virtual machine

1.Oct.2024
If you've ever encountered the following error when adding an existing VM to your host:   ...

Tik Tok algorithm is interesting

17.Apr.2024
I don't know how Tik Tok does it and honestly I don't know how its algorithm works. It can't be alg...

How to upgrade Gitlab safely with zero downtime

30.Mar.2024
GitLab is a complex piece of software. If you are planning on upgrading your self-hosted GitLab mac...

How to reduce Proxmox VE guest machine backup size

30.Mar.2024
To reduce a guest machine before you perform a backup, first set the discard flag on the guest mach...

Proxmox and CSF - LAN vmbr2 not working

29.Mar.2024
If somehow you have Proxmox & CSF for blocking outside traffic vmbr0 (WAN), and have a vmbr2 LA...