module VagrantPlugins::VSphere::Util::MachineHelpers

Public Instance Methods

wait_for_ssh(env) click to toggle source
# File lib/vSphere/util/machine_helpers.rb, line 5
def wait_for_ssh(env)
  if !env[:machine].config.vm.communicator.nil? && 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

  loop do
    break if env[:machine].communicate.ready?
    sleep 5
  end
end