Error when resizing VirtualBox disk on Windows

I recently needed to resize my CentOS VDI using the following command:

"c:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyhd "c:\CentOS\CentOS.vdi" --resize 20480

Unfortunately it kept failing with this error message:

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.

After pulling my hair for almost an hour I finally tried running the command from a NON-elevated command prompt. Yes, that’s right, this command apparently MUST NOT be run with administrator privileges. Weird.

Also, this is CentOS with an LVM partition which can’t be resized with GParted. To resize an LVM partition follow these steps.

15 thoughts on “Error when resizing VirtualBox disk on Windows

  1. Thank you, i was stuck on the elevated command prompt as well. Probably wouldnt have tried it without your suggestion.

    Lifesaver!

  2. Excellent! I had an old backup of a hard disk that I wanted to load up in VBox, but there was a UUID conflict. Both “VBoxManage clonevdi disk1.vdi disk2.vdi” and “VBoxManage internalcommands sethduuid disk.vdi” were giving me this same error.

  3. I have not idea how you figured that out. that’s the most ridiculous sh*t. it works at a non-admin command prompt but not an elevated command prompt?? thank you!

  4. Wow,

    Who would have thought. Usually commands like this have to be run with administrative privileges. And usually things that work as a normal user also work as an administrator.

    I had to try this myself as I didn’t believe it.

    This really needs to be written up and put in the documentation.

    I had tried ALL of the remades I could find on the virtualbox site, all to no avail.

    Gary

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.