Handle box url from Vagrantfile

Closes #17
This commit is contained in:
Fabio Rehm 2013-03-04 19:35:50 -03:00
parent 6f6d14aee7
commit d31769984f
2 changed files with 2 additions and 0 deletions

1
example/Vagrantfile vendored
View file

@ -10,6 +10,7 @@ Vagrant.configure("2") do |config|
config.vm.synced_folder "/tmp", "/vagrant_data" config.vm.synced_folder "/tmp", "/vagrant_data"
config.vm.provider :lxc do |lxc| config.vm.provider :lxc do |lxc|
config.vm.box_url = '../boxes/output/ubuntu-cloud.box'
lxc.start_opts << 'lxc.cgroup.memory.limit_in_bytes=400M' lxc.start_opts << 'lxc.cgroup.memory.limit_in_bytes=400M'
lxc.start_opts << 'lxc.cgroup.memory.memsw.limit_in_bytes=500M' lxc.start_opts << 'lxc.cgroup.memory.memsw.limit_in_bytes=500M'
end end

View file

@ -106,6 +106,7 @@ module Vagrant
b.use Vagrant::Action::Builtin::Call, Created do |env, b2| b.use Vagrant::Action::Builtin::Call, Created do |env, b2|
# If the VM is NOT created yet, then do the setup steps # If the VM is NOT created yet, then do the setup steps
if !env[:result] if !env[:result]
b2.use Vagrant::Action::Builtin::HandleBoxUrl
b2.use HandleBoxMetadata b2.use HandleBoxMetadata
b2.use Create b2.use Create
end end