14

I cannot shutdown a VirtualBox VM on a Linux host, launched by Vagrant:

$ vagrant halt -f my-vm
$ vagrant status
Current machine states:

my-vm                stopping (virtualbox)

The VM is stopping.

This seems to be stuck. I try to poweroff with VBox commands, but that also fails:

$ VBoxManage list vms
"my-vm-id_my-vm_1516891695543_61345" {cb29c90c-30c7-4798-9bd7-9d8ee32e1530}

$ VBoxManage controlvm cb29c90c-30c7-4798-9bd7-9d8ee32e1530 poweroff
VBoxManage: error: The virtual machine is being powered down
VBoxManage: error: Details: code VBOX_E_INVALID_VM_STATE (0x80bb0002), component ConsoleWrap, interface IConsole, callee nsISupports
VBoxManage: error: Context: "PowerDown(progress.asOutParam())" at line 231 of file VBoxManageControlVM.cpp

What is the best way to halt now?

26

Only way I could do it is by killing the process:

ps aux | grep VBox

Then, select the appropiate vm process pid and:

kill $pid

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.