I haven't used my Windows VM in about a week or so, the only thing I can think of that I've done within that week that may have caused this is cleared out my ~/.cache.

Anyway, now when I try and launch VirtualBox I get the following error:

VirtualBox - Critical Error

Failed to create the VirtualBox COM object.

The application will now terminate.

Document is empty.

Location: '/home/kalenpw/.config/VirtualBox/VirtualBox.xml', line 1 (0), column 1.

/build/virtualbox-VDAABr/virtualbox-4.3.36-dfsg/src/VBox/Main/src-server/VirtualBoxImpl.cpp[536] (nsresult VirtualBox::init()).

sure enough, ~/.config/VirtualBox/VirtualBox.xml is in fact empty, the only issue is I can't figure out what I need that file to be in order for virtual box to work. I've googled the error and everything says I need to change permissions of VirtualBox.xml, but I've already verified my user has permissions. VirtualBox will run if I do sudo virtualbox so clearly I've messed something up with that file I am just not sure what. Thanks.

  • @Christopher ah, good call didn't think of that. I did in fact have VirtualBox.xml-prev and copying the contents of that into VirtualBox.xml resolved the issue. If you post this as answer I'll accept it
    – kalenpw
    Commented Nov 18, 2016 at 21:23

2 Answers 2


Take a look to see if you have an automatic backup of that file, VirtualBox.xml-prev. If so, use that file to try to get VirtualBox happy again.

cat VirtualBox.xml-prev > VirtualBox.xml


rm VirtualBox.xml && cp VirtualBox.xml-prev VirtualBox.xml

Or maybe find the original in a recent backup.

  • Thanks! This same strategy worked for me on windows as well.
    – dB'
    Commented Nov 7, 2018 at 23:58
  • After I removed VirtualBox.xml-prev and VirtualBox.xml Virtualbox started working again :) tks
    – Memonic
    Commented Apr 17, 2019 at 20:20
  • @Memonic That way, you loose all your non-default settings I believe. Didn't the accepted anwer work for you ?
    – smido
    Commented Mar 9, 2022 at 16:08

I had the same problem too after deleting all the files/folders in Downloads to free space on my hard drive. After then, when I try to launch VirtualBox again, I get the same thing. I was trying to fix it by using the VirtualBox installer and choosing the option repair. This did nothing at all. I removed VirtualBox then reinstalled it, but it didn't work. NOTE: The actual error when I deleted everything in Downloads is a failure in VirtualBox.xml - Well that happened first, the repair made the VirtualBox.xml empty, not files/folders.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .