Failed to acquire the VirtualBox COM object on Ubuntu 14.04 LTS

I encountered this situation after a power loss and reboot of my host system.

Overview

VirtualBox stores its global configuration in ~/.config/VirtualBox/VirtualBox.xml, (if you've upgraded from early versions it may be in ~/.VirtualBox/VirtualBox.xml). The file includes global configuration options and the list of registered virtual machines with pointers to their XML settings files (for each machine under ~/VirtualBox VMs).

Options

To solve a corrupted VirtualBox.xml do one of the following, in order of preference:

  1. Restore a backup. Ubuntu comes with Backups (Déjà Dup) installed by default. If you're using it, you can easily restore the file by navigating to ~/.config/VirtualBox/, right-clicking on VirtualBox.xml, and choose Revert to previous version... more details

  2. Restore a copy. Each time VirtualBox Manager starts up, it creates a backup copy of ~/.config/VirtualBox/VirtualBox.xml (called ~/.config/VirtualBox/VirtualBox.xml-prev). The drawback is this file will/may only be useful if you haven't started VirtualBox Manager.

    Steps to restore a copy

    1. Ensure VirtualBox Manager is not running.
    2. Navigate to ~/.config/VirtualBox/
    3. Rename ~/.config/VirtualBox/VirtualBox.xml to something like ~/.config/VirtualBox/VirtualBox.xml-original
    4. Rename the backup ~/.config/VirtualBox/VirtualBox.xml-prev to ~/.config/VirtualBox/VirtualBox.xml
    5. Start VirtualBox Manager. This is a copy of the state of the last VirtualBox Manager startup, and hopefully resolves your situation.
  3. Remove the file. Always Backup first, including VirtualBox VMs. This is a last resort.

    Steps to remove the file

    1. Backup
    2. Navigate to ~/.config/VirtualBox/
    3. Delete/rename the VirtualBox.xml file.
    4. Start VirtualBox Manager. This will recreate a file during startup.
      The result of removing the file will likely be a loss of some/all of your machines in the list. Any missing machines might be able to be restored by re-registering .vbox files and {snapshot}.vdi files stored by default in the ~/VirtualBox VMs folder. Full details of how to recover this condition are beyond the scope of this question. Always

Notes:

  • The tilde (~) is a shortcut representation for the $HOME environment variable. It can be cut-and-paste into a GUI program like Gnome Files (Nautilus) (which supports freedesktop.org conventions), or in a terminal.
    • To past a path in the location bar of Gnome Files (Nautilus), press CTRL-L. Then type or paste a path.
  • Before upgrading: It is prudent to shutdown each virtual machine (in lieu of a suspended\snapshot state).
  • Before upgrading: It is also important to eject/unmount any VBoxGuestAdditions.iso in CD drive. Then, new version can be inserted and installed after upgrade.

I faced the similar issue, removing the xml file resolved this for me. So for you please do

rm /home/user/.config/VirtualBox/VirtualBox.xml

and start virtualbox again.