Deleting inaccessible VMs from the VirtualBox GUI via the command line

Phil Wolstenholme
Oct 11, 2016 · 1 min read

I recently had a big clear out of my Virtual Machines directory and deleted quite a few VMs that I wasn’t using anymore. Perhaps I should have done this via VirtualBox itself, as when I next opened up VirtualBox the application’s user interface seemed frozen or locked, and all I could see was an error message about my inaccessible VMs (the ones I had deleted outside of VirtualBox).

To get VirtualBox’s UI working again, I needed to get rid of these inaccessible machines, but I couldn’t remove anything via the unresponsive user interface.

I ended up unregistering the inaccessible VMs by using the VirtualBox command line interface, in particular the commands

VBoxManage list vms


VBoxManage unregistervm

These give a list of the VMs managed by VirtualBox, and then make it easy to unregister/remove the inaccessible ones.

To get started, close the VirtualBox GUI and run the commands below. This will help you identify all the inaccessible VMs and then allow you to unregister them by refering to a particular VM’s UUID (the long identifier wrapped up in the curly brackets).

➜ VBoxManage list vms
"<inaccessible>" {c9d3f17a-8f97-11e6-ae22-56b6b6499611}
"<inaccessible>" {93e61830-8f98-11e6-bdf4-0800200c9a66}
"IE8 - Win7" {db83c590-07a6-4101-8519-22eef9ea26b5}
➜ VBoxManage unregistervm c9d3f17a-8f97-11e6-ae22-56b6b6499611
➜ VBoxManage unregistervm 93e61830-8f98-11e6-bdf4-0800200c9a66

After doing this, you can reopen the VirtualBox GUI and it should be operational again.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store