Virtualbox cannot create .COM object

6,237

Solution 1

  1. Remove the VirtualBox.xml file.

  2. Launch VirtualBox once again.

  3. VirtualBox will generate the VirtualBox.xml file it self and it's not your responsibility to recreate it.

  4. Make a new virtual machine and import your previous .vdi file.

Solution 2

The solution that worked for me and no need to import again the VDIs (importing or creating new vboxes from VDI will lost your snapshots, so i did not like that solution). The solution is:

cp VirtualBox.xml-prev VirtualBox.xml

And all is back to normal. The solution saying sudo virtualbox to launch virtualbox will not show your previous VBoxes as if virtualbox had an amnesia.

Share:
6,237

Related videos on Youtube

Al Wilcox
Author by

Al Wilcox

Updated on September 18, 2022

Comments

  • Al Wilcox
    Al Wilcox over 1 year

    After a rebooting of Ubuntu 16.04, I can no longer launch VirtualBox. It errors out with the following error message:

    Failed to create the VirtualBoxClient COM object.
    The application will now terminate.
    Document is empty.
    Location: '/home/al/.config/VirtualBox/VirtualBox.xml', line 1 (0), column 1.
    /build/virtualbox-Xs7cR9/virtualbox-5.0.24-dfsg/src/VBox/Main/src-server/VirtualBoxImpl.cpp[534] (nsresult VirtualBox::init()).
    Result Code: NS_ERROR_FAILURE (0x80004005)
    Component: VirtualBoxWrap
    Interface: IVirtualBox {0169423f-46b4-cde9-91af-1e9d5b6cd945}
    

    I've tried VirtualBox support, but they say I need to go through Ubuntu support. (Discussion follows)

    VirtualBox Support

    Is the document really empty? What is the contents of /home/al/.config/VirtualBox/VirtualBox.xml?

    Did you do anything to the host recently, such as create a new user account?

    My response

    The .VBOX file is empty. It is a Windows 10 session, so that is the name of the .VBOX file. There is a Windows 10.VBOX-Prev file, which does have XML code. I tried renaming the empty file, and copying Prev file to Windows 10.VBOX. When I try to run it, I get the same error message. When renamed, the file does change to a VBox icon. Did not do anything lately except apply system updates, which required a reboot. Before rebooting, I ended my VM session normally, shut down any open programs, then rebooted. That's when it occurred. Strange! Windows 10. is the only session I run on VM, since my OS is Ubuntu 16.04 LTS, and I have some software that only runs on Windows. Nice solution until this occurred.

    VirtualBox Support

    Also a VM log wouldn't go amiss. Any affected VM will do.You can find a log in the "Logs" subfolder of the VM folder. Compress "VBox.log" (ONLY) to a zip file. Attach the zip here.

    How do I troubleshoot from here?

  • Al Wilcox
    Al Wilcox over 7 years
    But the result is still the same. I have not found any .XML file yet.
  • Ammar Bozorgvar
    Ammar Bozorgvar over 7 years
    @AlWilcox use this command to run VirtualBox "sudo virtualbox"
  • Al Wilcox
    Al Wilcox over 7 years
    Thanks!. I can create a new session this way. How do I import my old (and highly desired) session into this machine? The import option only pulls in OVF files
  • Ammar Bozorgvar
    Ammar Bozorgvar over 7 years
    read this link to add your previous Virtual Machine linuxbsdos.com/2015/11/13/…
  • Al Wilcox
    Al Wilcox over 7 years
    ,Thanks!! Worked like a charm. Life is good again!
  • Emiliano Sangoi
    Emiliano Sangoi almost 7 years
    Worked for me!. This problem happened to me after remove manually a vbox.