Force vm shutdown

3,727 views
Skip to first unread message

Ian Kallen

unread,
Nov 8, 2010, 5:57:31 PM11/8/10
to vagra...@googlegroups.com
I seemed have to developed something corrupted on a VM, when I vagrant up'd it ssh didn't start; I'm assuming it was stuck in single user mode. I had to drop down to irb to do

require 'virtualbox'
vm = VirtualBox::VM.find("vm name")
vm.stop

Then I brought it up from VirtualBox to get a console and fsck. A shutdown and vagrant up later, I'm back in the saddle. vagrant halt doesn't help in this case; without ssh it's helpless. Did I miss something in Vagrant to do the vm shutdown for me?

thanks,
-Ian


Mike Williams

unread,
Nov 8, 2010, 6:25:18 PM11/8/10
to vagra...@googlegroups.com
On 09/11/2010, at 09:57 , Ian Kallen wrote:

> ... A shutdown and vagrant up later, I'm back in the saddle. vagrant halt doesn't help in this case; without ssh it's helpless. Did I miss something in Vagrant to do the vm shutdown for me?

Try "vagrant halt --force"

--
cheers,
Mike Williams

Mitchell Hashimoto

unread,
Nov 8, 2010, 6:39:22 PM11/8/10
to vagra...@googlegroups.com
Mike has the magic command for you :)

But do you have any idea what could be causing this? What changes you
made to your VM/Vagrantfile to make this start occurring?

Mitchell

Ian Kallen

unread,
Nov 8, 2010, 7:00:37 PM11/8/10
to vagra...@googlegroups.com
Don't know, I've been running ubuntu 9.10, postgres, a buncha ruby code and spec tests for the last few weeks. Today, after one of many random test iterations, read-only filesystem :( 

Since bringing things back, it's been fine (so far). I'm wondering if I should be suspending or halting vm's prior to laptop sleeps but I don't know, that wasn't a problem with my prior uses of vagrant earlier this year. "vagrant help halt" didn't mention a "--force" option, Vagrant::VERSION == 0.6.6
thanks,
-Ian
Reply all
Reply to author
Forward
0 new messages