allow setting mode to boot into, so can boot with gui which makes debugging networking setup easier

This commit is contained in:
Michael Johnston 2010-04-09 00:11:02 -07:00 committed by Mitchell Hashimoto
parent b1a16a7b3d
commit 4149313e7a
4 changed files with 7 additions and 3 deletions

View File

@ -20,6 +20,7 @@ Vagrant::Config.run do |config|
config.vm.provisioner = nil config.vm.provisioner = nil
config.vm.shared_folder_uid = nil config.vm.shared_folder_uid = nil
config.vm.shared_folder_gid = nil config.vm.shared_folder_gid = nil
config.vm.boot_mode = "vrdp"
config.package.name = 'vagrant' config.package.name = 'vagrant'
config.package.extension = '.box' config.package.extension = '.box'

View File

@ -21,7 +21,7 @@ module Vagrant
def boot def boot
logger.info "Booting VM..." logger.info "Booting VM..."
@runner.vm.start("vrdp") @runner.vm.start(@runner.env.config.vm.boot_mode)
end end
def wait_for_boot(sleeptime=5) def wait_for_boot(sleeptime=5)

View File

@ -77,6 +77,7 @@ module Vagrant
attr_accessor :box attr_accessor :box
attr_accessor :box_ovf attr_accessor :box_ovf
attr_accessor :base_mac attr_accessor :base_mac
attr_accessor :boot_mode
attr_accessor :project_directory attr_accessor :project_directory
attr_reader :forwarded_ports attr_reader :forwarded_ports
attr_reader :shared_folders attr_reader :shared_folders

View File

@ -32,8 +32,10 @@ class BootActionTest < Test::Unit::TestCase
end end
context "booting" do context "booting" do
should "start the VM in headless mode" do should "start the VM in specified mode" do
@vm.expects(:start).with("vrdp").once mode = mock("boot_mode")
@runner.env.config.vm.boot_mode = mode
@vm.expects(:start).with(mode).once
@action.boot @action.boot
end end
end end