Mitchell Hashimoto 261d0ef6cd core: WaitForCommunicator - more robust wait for boot
This is a new built-in middleware that is more robust for
waiting for boots. The "max_tries" configuration is now gone, it is
timeout based. Future commits will make this even better as the
SSH communicator will implement the new "wait_for_ready" in a better
way.
2013-08-29 16:27:00 -07:00

24 lines
517 B
Ruby

module VagrantPlugins
module ProviderVirtualBox
module Action
class Boot
def initialize(app, env)
@app = app
end
def call(env)
@env = env
boot_mode = @env[:machine].provider_config.gui ? "gui" : "headless"
# Start up the VM and wait for it to boot.
env[:ui].info I18n.t("vagrant.actions.vm.boot.booting")
env[:machine].provider.driver.start(boot_mode)
@app.call(env)
end
end
end
end
end