# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.provider :lxc do |provider|
    provider.backingstore = "loop"
    provider.customize "cgroup.memory.limit_in_bytes", get_env_var_rb("RAMSIZE") + 'M'
    provider.backingstore_option "--fssize", get_env_var_rb("DRIVESIZE") + 'G'
  end
  config.ssh.username = "vagrant"
  config.ssh.forward_agent = FORWARD_SSH
  config.vm.hostname = VM_NAME
  config.vm.network :forwarded_port,
    :guest => 5000,
    :host => 5000,
    auto_correct: true
  config.vm.network :forwarded_port,
    :guest => 80,
    :host => 8080,
    auto_correct: true
  box =  'terminal-labs/tl-' + get_env_var_rb("GUEST_OS") + '-64bit-lxc'
  config.vm.box = box
  config.vm.box_url = box
end
