Module: VagrantPlugins::VSphere::Util::MachineHelpers

Included in:
Action::Clone, Action::IsRunning, Action::PowerOn
Defined in:
lib/vSphere/util/machine_helpers.rb

Instance Method Summary collapse

Instance Method Details

#wait_for_ssh(env) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/vSphere/util/machine_helpers.rb', line 5

def wait_for_ssh(env)
  if not env[:machine].config.vm.communicator.nil? and env[:machine].config.vm.communicator == :winrm
    env[:ui].info(I18n.t("vsphere.waiting_for_winrm"))
  else
    env[:ui].info(I18n.t("vsphere.waiting_for_ssh"))
  end
  
  while true                        
    break if env[:machine].communicate.ready?
    sleep 5
  end  
end