2012-08-14 03:03:35 +00:00
|
|
|
module VagrantPlugins
|
|
|
|
module ProviderVirtualBox
|
|
|
|
module Action
|
|
|
|
class Boot
|
|
|
|
def initialize(app, env)
|
|
|
|
@app = app
|
|
|
|
end
|
|
|
|
|
|
|
|
def call(env)
|
|
|
|
@env = env
|
|
|
|
|
2012-12-25 17:00:06 +00:00
|
|
|
boot_mode = @env[:machine].provider_config.gui ? "gui" : "headless"
|
|
|
|
|
2012-08-14 03:03:35 +00:00
|
|
|
# Start up the VM and wait for it to boot.
|
|
|
|
env[:ui].info I18n.t("vagrant.actions.vm.boot.booting")
|
2012-12-25 17:00:06 +00:00
|
|
|
env[:machine].provider.driver.start(boot_mode)
|
2012-08-14 03:03:35 +00:00
|
|
|
|
|
|
|
@app.call(env)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|