How do I delete a virtualbox machine in the GURU_MEDITATION error state?
Solution 1:
Kill the VBoxHeadless process and run "vagrant destroy"
Destroying vagrant and sending the kill signal with the "killall" command looks like:
killall -9 VBoxHeadless && vagrant destroy
Solution 2:
If you can't power off the machine from VirtualBox GUI, then try from the command line using vboxmanage
command (VBoxManage
on OS X), e.g.:
vboxmanage controlvm NAMEOFVM poweroff
Change NAMEOFVM
with the name from vboxmanage list vms
command.
then unregister and delete the VM:
vboxmanage unregistervm NAMEOFVM --delete
Or delete it manually:
rm -fr ~/"VirtualBox VMs/NAMEOFVM"
Solution 3:
I hit this problem. Eveything I read recommend that you should always manage the boxes via Virtual Box, not directly access files. But when I had an invalid box, the unregistervm command refused to delete it and vagrant destroy did not work. In the end the following process worked.
- Kill all running VBox* processes
- Delete the folder "boxname" from the folder "VirtualBox VMs"
- Edit the file "VirtualBox.xml" and remove the tag corresponding to the invalid box.
I then ran this command the verify the box was gone.
VBoxManage list vms
After that I was able to create a new vm with the same name.