providers/virtualbox: no SSH info if not running
This commit is contained in:
parent
03e18d1668
commit
2694f746a7
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue