providers/virtualbox: no SSH info if not running

This commit is contained in:
Mitchell Hashimoto 2014-04-27 17:26:24 -07:00
parent 03e18d1668
commit 2694f746a7
1 changed files with 2 additions and 3 deletions

View File

@ -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