Vagrantfile 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # -*- mode: ruby -*-
  2. # vi: set ft=ruby :
  3. #
  4. # Tails: The Amnesic Incognito Live System
  5. #
  6. # This program is free software: you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation, either version 3 of the License, or
  9. # (at your option) any later version.
  10. #
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. require_relative 'lib/tails_build_settings'
  19. ENV['VAGRANT_DEFAULT_PROVIDER'] = 'libvirt'
  20. Vagrant.configure("2") do |config|
  21. config.vm.box = 'tails-builder-amd64-jessie-20160226'
  22. config.vm.box_url = "http://dl.amnesia.boum.org/tails/project/vagrant/#{config.vm.box}.box"
  23. config.vm.box_download_checksum_type = "sha256"
  24. config.vm.box_download_checksum = 'a63298b7cae7cbc2ad3e2c01763a11b29ee8ac879398e007ae22857da5b2c6de'
  25. config.vm.provision "shell", inline: <<-EOF
  26. sudo http_proxy='#{ENV['http_proxy']}' /vagrant/provision/setup-tails-builder
  27. EOF
  28. config.vm.synced_folder '.', '/vagrant', type: '9p', readonly: true
  29. config.vm.synced_folder '../.git', '/amnesia.git', type: '9p', readonly: true
  30. config.vm.provider :libvirt do |domain|
  31. domain.default_prefix = config.vm.box
  32. domain.driver = 'kvm'
  33. domain.management_network_guest_ipv6 = 'no'
  34. domain.connect_via_ssh = false
  35. domain.machine_arch = 'x86_64'
  36. domain.machine_type = 'q35'
  37. domain.cpu_mode = 'host-passthrough'
  38. domain.emulator_path = '/usr/bin/qemu-system-x86_64'
  39. domain.memory = ENV['TAILS_RAM_BUILD'] ? VM_MEMORY_FOR_RAM_BUILDS :
  40. VM_MEMORY_FOR_DISK_BUILDS
  41. cpus = ENV['TAILS_BUILD_CPUS']
  42. domain.cpus = cpus unless cpus.nil?
  43. end
  44. end