From 2694f746a7c3e0defa4867595fd3defbaec5df39 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 27 Apr 2014 17:26:24 -0700 Subject: [PATCH] providers/virtualbox: no SSH info if not running --- plugins/providers/virtualbox/provider.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/providers/virtualbox/provider.rb b/plugins/providers/virtualbox/provider.rb index a52c07fb3..70adf34ef 100644 --- a/plugins/providers/virtualbox/provider.rb +++ b/plugins/providers/virtualbox/provider.rb @@ -56,9 +56,8 @@ module VagrantPlugins # Returns the SSH info for accessing the VirtualBox VM. def ssh_info - # If the VM is not created then we cannot possibly SSH into it, so - # we return nil. - return nil if state.id == :not_created + # If the VM is not running that we can't possibly SSH into it + return nil if state.id != :running # Return what we know. The host is always "127.0.0.1" because # VirtualBox VMs are always local. The port we try to discover