Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a Virtualbox VM running Ubuntu that was started by Vagrant, on an OSX host.

At some point, my ssh session to the guest stopped responding. I tried vagrant halt from a terminal window on the host (OS X). The shutdown process seemed to also hang and shutting down the Oracle VM VirtualBox Manager doesn't shut down the VMs themselves.

When running desktop guest OSes, closing the GUI window presents several options for shutting down the guest, but I don't know how to do the equivalent when the guest is running headless.

Is there a way in either Vagrant or VirtualBox to force the running VM to shutdown?

share|improve this question
    
it happens to me all the time, have you figured out what actually causes the crash? –  Yurik Jan 7 '13 at 9:27
    
I don't know for certain that it's connected, but adding more memory to my machine seems to have significantly cut down on the problem for me. –  Matt V. Jan 9 '13 at 16:42

2 Answers 2

up vote 6 down vote accepted

Try using the VBoxManage command:

VBoxManage list runningvms

Which gives you the name of the VM you want to shut down. For example:

"rails_1366055054" {8144df4b-941f-40d6-ba5f-6e83d398ffd3}

To shut down this VM, you run

VBoxManage controlvm "rails_1366055054" poweroff

Note that this advice only applies when using the VirtualBox provider.

share|improve this answer

You can issue the following command from the Vagrant VM dir:

vagrant halt --force
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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