Vagrant Up fails with “VBoxManage.exe: error: Code CO_E_SERVER_EXEC_FAILURE (0x80080005)”

I’m trying out Vagrant, and ran into a problem.  The vagrant up command failed: 

Bringing machine 'default' up with 'virtualbox' provider... 
[default] Setting the name of the VM... 
[default] Clearing any previously set forwarded ports... 
There was an error while executing `VBoxManage`, a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below.

Command: ["list", "hostonlyifs"]

Stderr: VBoxManage.exe: error: Failed to create the VirtualBox object! 
VBoxManage.exe: error: Code CO_E_SERVER_EXEC_FAILURE (0x80080005) - Server execution failed (extended info not available) 
VBoxManage.exe: error: Most likely, the VirtualBox COM server is not running or failed to start.

A Google search revealed a lot of other people having the same problem, but not too many solutions, so I’ll document how I got past it.

This is using:

  • Vagrant 1.2.7
  • VirtualBox 4.2.16
  • Windows 7 Professional, 64-bit, SP 1

I could also reproduce the same error by running the vboxmanage list hostonlyifs command from C:\Program Files\Oracle\VirtualBox on a my command line — so this is a problem with VirtualBox and Windows, not with Vagrant itself.

Mitchell Hashimoto very helpfully pointed out that this might just be a permissions issue with Vagrant running under a different userid than VirtualBox, and that does seem to be the case.  I had started my command prompt using Run As Administrator.

Simply running from an un-elevated command line didn’t solve my problem, however. The fix was to grant some DCOM permissions on the VirtualBox Application component.

On Windows 7, that’s accomplished as follows:

  • Open Component Services from the Administrative Tools folder.
  • Drill down to Component Services > Computers > My Computer > DCOM Config.
  • Click through a couple of warnings about unregistered classes from other apps installed on my system.
  • Right click on VirtualBox Application.
  • Go to the Security tab.
  • Change Launch and Activation Permissions from Default to Customize

It’s hard to say whether any specific permission was needed or whether simply opening up the permissions for edit and then re-saving them did the trick, because once it started working, I returned my permissions back to the original defaults and it continued to work. Maybe something in my registry was corrupted and the DCOM Config editor fixed it.

12 thoughts on “Vagrant Up fails with “VBoxManage.exe: error: Code CO_E_SERVER_EXEC_FAILURE (0x80080005)”

  1. msilverboard Post author

    Thanks Josh. I’m actually trying to see if I can use Vagrant to set up developer VMs with GUI and an IDE, so rather than using forwarded ports, I wanted to set up a bridged network. Maybe that requires more permission from Windows than forwarding?

  2. Jeremy Bass

    I was hoping this would do it, but in my case, for some odd reason, I follow this and when I go back to check, it doesn’t save the change. No change in the state of the issues either. Still trying to figure it out.

  3. Elkripper

    I was also having the issue described. From the article:

    “this might just be a permissions issue with Vagrant running under a different userid than VirtualBox”

    Based on this insight (thank you!), I launched both VirtualBox and PowerShell via right-clicking and choosing “Run as Administrator” and the problem disappeared.

  4. Pingback: Why You Want to Develop in Production-Like Conditions, and How to Do it with Vagrant - Olivier Travers

  5. Radek

    Thank You so much! I have the same problem with VirtualBox list hostonlyifs, on Win7 x64 wich couses Vagrant not to work. After the security upgrade it works.
    I would never find this. Thanks!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s