├── .gitignore ├── .travis.yml ├── Gemfile ├── Gemfile.lock ├── LICENSE ├── README.md ├── Rakefile ├── Vagrantfile ├── archlinux-x86_64.json ├── centos-6.9-x86_64.json ├── centos-7.4-x86_64.json ├── debian-7.11-amd64.json ├── debian-8.10-amd64.json ├── debian-9.4-amd64.json ├── fedora-26-x86_64.json ├── fedora-27-x86_64.json ├── fedora-28-x86_64.json ├── freebsd-10.4-amd64.json ├── freebsd-11.1-amd64.json ├── freebsd-9.3-amd64.json ├── http ├── archlinux │ ├── install-chroot.sh │ └── install.sh ├── centos-6.9 │ └── anaconda-ks.cfg ├── centos-7.4 │ └── anaconda-ks.cfg ├── debian-7.11 │ └── preseed.cfg ├── debian-8.10 │ └── preseed.cfg ├── debian-9.4 │ └── preseed.cfg ├── fedora-26 │ └── anaconda-ks.cfg ├── fedora-27 │ └── anaconda-ks.cfg ├── fedora-28 │ └── anaconda-ks.cfg ├── freebsd-10.4 │ └── installerconfig ├── freebsd-11.1 │ └── installerconfig ├── freebsd-9.3 │ └── installerconfig ├── openbsd-6.1 │ ├── install-chroot.sh │ ├── install.conf │ └── install.sh ├── openbsd-6.2 │ ├── install-chroot.sh │ ├── install.conf │ └── install.sh ├── openbsd-6.3 │ ├── install-chroot.sh │ ├── install.conf │ └── install.sh ├── ubuntu-14.04 │ └── preseed.cfg ├── ubuntu-16.04 │ └── preseed.cfg ├── ubuntu-17.10 │ └── preseed.cfg └── ubuntu │ └── preseed.cfg ├── openbsd-6.1-amd64.json ├── openbsd-6.2-amd64.json ├── openbsd-6.3-amd64.json ├── scripts ├── archlinux │ ├── cleanup.sh │ ├── virtualbox.sh │ └── vmware.sh ├── centos-6.9 │ ├── cleanup.sh │ ├── init.sh │ └── repo.sh ├── centos-7.4 │ ├── cleanup.sh │ └── repo.sh ├── centos │ ├── locale.sh │ ├── virtualbox.sh │ └── vmware.sh ├── common │ ├── minimize.sh │ ├── sshd.sh │ └── vagrant.sh ├── debian-9.4 │ └── vmware.sh ├── debian │ ├── cleanup.sh │ ├── init.sh │ ├── virtualbox.sh │ └── vmware.sh ├── fedora │ ├── cleanup.sh │ ├── locale.sh │ ├── virtualbox.sh │ └── vmware.sh ├── freebsd │ ├── cleanup.sh │ ├── init.sh │ ├── minimize.sh │ ├── virtualbox.sh │ └── vmware.sh ├── openbsd │ ├── init.sh │ └── minimize.sh ├── ubuntu-14.04 │ └── vmware.sh ├── ubuntu │ ├── apt.sh │ ├── cleanup.sh │ ├── init.sh │ ├── virtualbox.sh │ └── vmware.sh └── vyos │ ├── cleanup.sh │ ├── init.sh │ ├── minimize.sh │ ├── repo.sh │ ├── vagrant.sh │ ├── virtualbox.sh │ └── vmware.sh ├── spec ├── epel_spec.rb ├── network_spec.rb ├── selinux_spec.rb ├── spec_helper.rb ├── sshd_spec.rb ├── time_spec.rb ├── vagrant_spec.rb ├── virtualbox_spec.rb └── vmware_spec.rb ├── ubuntu-14.04-amd64.json ├── ubuntu-16.04-amd64.json ├── ubuntu-17.10-amd64.json ├── vagrantfile_templates ├── freebsd.rb └── openbsd.rb ├── vars ├── development.json └── release.json └── vyos-1.1.7-amd64.json /.gitignore: -------------------------------------------------------------------------------- 1 | *.box 2 | .bundle/ 3 | .vagrant/ 4 | output-*/ 5 | packer_cache/ 6 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: ruby 2 | rvm: 3 | - 2.5 4 | install: 5 | - bundle install 6 | - curl -L -o packer.zip https://releases.hashicorp.com/packer/1.2.2/packer_1.2.2_linux_amd64.zip && unzip -d bin packer.zip 7 | script: 8 | - PATH=$(pwd)/bin:$PATH bundle exec rake 9 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | group :test do 4 | gem 'rainbow' 5 | gem 'rake' 6 | gem 'serverspec' 7 | end 8 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | diff-lcs (1.3) 5 | multi_json (1.12.1) 6 | net-scp (1.2.1) 7 | net-ssh (>= 2.6.5) 8 | net-ssh (4.1.0) 9 | net-telnet (0.1.1) 10 | rainbow (2.2.2) 11 | rake 12 | rake (12.0.0) 13 | rspec (3.6.0) 14 | rspec-core (~> 3.6.0) 15 | rspec-expectations (~> 3.6.0) 16 | rspec-mocks (~> 3.6.0) 17 | rspec-core (3.6.0) 18 | rspec-support (~> 3.6.0) 19 | rspec-expectations (3.6.0) 20 | diff-lcs (>= 1.2.0, < 2.0) 21 | rspec-support (~> 3.6.0) 22 | rspec-its (1.2.0) 23 | rspec-core (>= 3.0.0) 24 | rspec-expectations (>= 3.0.0) 25 | rspec-mocks (3.6.0) 26 | diff-lcs (>= 1.2.0, < 2.0) 27 | rspec-support (~> 3.6.0) 28 | rspec-support (3.6.0) 29 | serverspec (2.40.0) 30 | multi_json 31 | rspec (~> 3.0) 32 | rspec-its 33 | specinfra (~> 2.68) 34 | sfl (2.3) 35 | specinfra (2.70.1) 36 | net-scp 37 | net-ssh (>= 2.7, < 5.0) 38 | net-telnet 39 | sfl 40 | 41 | PLATFORMS 42 | ruby 43 | 44 | DEPENDENCIES 45 | rainbow 46 | rake 47 | serverspec 48 | 49 | BUNDLED WITH 50 | 1.15.3 51 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Satoshi Matsumoto 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # packer-templates 2 | 3 | [![Travis](https://img.shields.io/travis/kaorimatz/packer-templates.svg?style=flat-square)](https://travis-ci.org/kaorimatz/packer-templates) 4 | 5 | [Packer](https://www.packer.io/) templates for [Vagrant](https://www.vagrantup.com/) base boxes 6 | 7 | ## Usage 8 | 9 | Clone the repository: 10 | 11 | $ git clone https://github.com/kaorimatz/packer-templates && cd packer-templates 12 | 13 | Build a machine image from the template in the repository: 14 | 15 | $ packer build -only=virtualbox-iso archlinux-x86_64.json 16 | 17 | Add the built box to Vagrant: 18 | 19 | $ vagrant box add archlinux-x86_64 archlinux-x86_64-virtualbox.box 20 | 21 | ## Configuration 22 | 23 | You can configure each template to match your requirements by setting the following [user variables](https://packer.io/docs/templates/user-variables.html). 24 | 25 | User Variable | Default Value | Description 26 | ---------------------|---------------|---------------------------------------------------------------------------------------- 27 | `compression_level` | 6 | [Documentation](https://packer.io/docs/post-processors/vagrant.html#compression_level) 28 | `cpus` | 1 | Number of CPUs 29 | `disk_size` | 40000 | [Documentation](https://packer.io/docs/builders/virtualbox-iso.html#disk_size) 30 | `headless` | 0 | [Documentation](https://packer.io/docs/builders/virtualbox-iso.html#headless) 31 | `memory` | 512 | Memory size in MB 32 | `mirror` | | A URL of the mirror where the ISO image is available 33 | 34 | ### Example 35 | 36 | Build an uncompressed Arch Linux vagrant box with a 4GB hard disk using the VirtualBox provider: 37 | 38 | $ packer build -only=virtualbox-iso -var compression_level=0 -var disk_size=4000 archlinux-x86_64.json 39 | 40 | ## Pre-built Boxes 41 | 42 | You can also use the pre-built boxes hosted on [Atlas](https://atlas.hashicorp.com/kaorimatz). 43 | 44 | $ vagrant box add kaorimatz/archlinux-x86_64 45 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | require 'json' 2 | require 'net/http' 3 | require 'pathname' 4 | require 'rainbow' 5 | require 'rspec/core/rake_task' 6 | require 'uri' 7 | 8 | VAGRANT_PROVIDERS = { 9 | virtualbox: { 10 | builder_type: 'virtualbox-iso' 11 | }, 12 | vmware_desktop: { 13 | builder_type: 'vmware-iso' 14 | } 15 | }.freeze 16 | 17 | task default: ['packer:validate', 'packer:check_iso_url'] 18 | 19 | namespace :packer do 20 | desc 'Validate all the packer templates' 21 | task :validate do 22 | Pathname.glob('*.json').sort.each do |template| 23 | puts Rainbow("Validating #{template}...").green 24 | unless system "packer validate #{template}" 25 | puts Rainbow("#{template} is not a valid packer template").red 26 | raise "#{template} is not a valid packer template" 27 | end 28 | end 29 | end 30 | 31 | desc 'Check if all the ISO URLs are available' 32 | task :check_iso_url do 33 | Pathname.glob('*.json').sort.each do |template| 34 | json = JSON.parse(template.read) 35 | mirror = json['variables']['mirror'] 36 | iso_urls = json['builders'].map do |builder| 37 | builder['iso_url'].sub('{{user `mirror`}}', mirror) 38 | end 39 | iso_urls.uniq.each do |iso_url| 40 | puts Rainbow("Checking if #{iso_url} is available...").green 41 | request_head(iso_url) do |response| 42 | unless available?(response) 43 | puts Rainbow("#{iso_url} is not available: uri=#{response.uri}, message=#{response.message}").red 44 | raise "#{iso_url} is not available" 45 | end 46 | end 47 | end 48 | end 49 | end 50 | 51 | desc 'Build and upload the vagrant box to Atlas' 52 | task :release, [:template, :slug, :version, :provider] do |_t, args| 53 | template = Pathname.new(args[:template]) 54 | slug = args[:slug] 55 | version = args[:version] 56 | provider = args[:provider] 57 | 58 | json = JSON.parse(template.read) 59 | 60 | builders = json['builders'] 61 | builders.select! do |builder| 62 | builder['type'] == VAGRANT_PROVIDERS[provider.to_sym][:builder_type] 63 | end 64 | 65 | post_processors = json['post-processors'] 66 | post_processors << atlas_post_processor_config(slug, version, provider) 67 | json['post-processors'] = [post_processors] 68 | 69 | file = Tempfile.open('packer-templates') do |f| 70 | f.tap do |f| 71 | JSON.dump(json, f) 72 | end 73 | end 74 | 75 | unless system("packer build -var-file=vars/release.json '#{file.path}'") 76 | puts Rainbow("Failed to release #{slug} to Atlas").red 77 | raise "Failed to release #{slug} to Atlas" 78 | end 79 | end 80 | end 81 | 82 | desc 'Run serverspec tests' 83 | RSpec::Core::RakeTask.new(:spec, :host) do |_t, args| 84 | ENV['HOST'] = args[:host] 85 | end 86 | 87 | def request_head(uri, &block) 88 | uri = URI(uri) 89 | response = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == 'https') do |http| 90 | http.request_head(uri) 91 | end 92 | if response.is_a?(Net::HTTPRedirection) 93 | request_head(response['Location'], &block) 94 | else 95 | yield response 96 | end 97 | end 98 | 99 | def available?(response) 100 | response.is_a?(Net::HTTPSuccess) 101 | end 102 | 103 | def atlas_post_processor_config(slug, version, provider) 104 | { 105 | 'type' => 'atlas', 106 | 'artifact' => slug, 107 | 'artifact_type' => 'vagrant.box', 108 | 'metadata' => { 109 | 'version' => version, 110 | 'provider' => provider 111 | } 112 | } 113 | end 114 | -------------------------------------------------------------------------------- /Vagrantfile: -------------------------------------------------------------------------------- 1 | Vagrant.configure('2') do |config| 2 | 7.times do 3 | config.vm.network :private_network, type: :dhcp 4 | end 5 | 6 | Pathname.glob('*.json').sort.each do |template| 7 | name = template.basename('.json').to_s 8 | escaped_name = name.gsub(/[.]/, '_') 9 | 10 | config.vm.define "#{escaped_name}-libvirt" do |c| 11 | c.vm.box = name 12 | 13 | c.vm.provider :libvirt do |v, override| 14 | override.vm.synced_folder '', '/vagrant', disabled: true 15 | end 16 | end 17 | 18 | config.vm.define "#{escaped_name}-virtualbox" do |c| 19 | c.vm.box = name 20 | 21 | c.vm.provider :virtualbox do |v| 22 | v.name = name 23 | v.gui = false 24 | end 25 | end 26 | 27 | config.vm.define "#{escaped_name}-vmware_fusion" do |c| 28 | c.vm.box = name 29 | 30 | c.vm.provider :vmware_fusion do |v| 31 | v.gui = false 32 | end 33 | end 34 | end 35 | end 36 | -------------------------------------------------------------------------------- /archlinux-x86_64.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [{ 3 | "type": "qemu", 4 | "iso_url": "{{user `mirror`}}/iso/2018.04.01/archlinux-2018.04.01-x86_64.iso", 5 | "iso_checksum": "{{user `iso_checksum`}}", 6 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 7 | "output_directory": "output-archlinux-x86_64-{{build_type}}", 8 | "vm_name": "packer-archlinux-x86_64", 9 | "disk_size": "{{user `disk_size`}}", 10 | "headless": "{{user `headless`}}", 11 | "http_directory": "http", 12 | "boot_wait": "5s", 13 | "boot_command": [ 14 | "", 15 | "curl -O 'http://{{.HTTPIP}}:{{.HTTPPort}}/archlinux/install{,-chroot}.sh'", 16 | "bash install.sh < install-chroot.sh && systemctl reboot" 17 | ], 18 | "ssh_timeout": "{{user `ssh_timeout`}}", 19 | "ssh_username": "vagrant", 20 | "ssh_password": "vagrant", 21 | "shutdown_command": "sudo systemctl poweroff", 22 | "qemuargs": [ 23 | ["-m", "{{user `memory`}}"], 24 | ["-smp", "{{user `cpus`}}"] 25 | ] 26 | }, { 27 | "type": "virtualbox-iso", 28 | "guest_os_type": "ArchLinux_64", 29 | "iso_url": "{{user `mirror`}}/iso/2018.04.01/archlinux-2018.04.01-x86_64.iso", 30 | "iso_checksum": "{{user `iso_checksum`}}", 31 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 32 | "output_directory": "output-archlinux-x86_64-{{build_type}}", 33 | "vm_name": "packer-archlinux-x86_64", 34 | "disk_size": "{{user `disk_size`}}", 35 | "headless": "{{user `headless`}}", 36 | "http_directory": "http", 37 | "boot_wait": "5s", 38 | "boot_command": [ 39 | "", 40 | "curl -O 'http://{{.HTTPIP}}:{{.HTTPPort}}/archlinux/install{,-chroot}.sh'", 41 | "bash install.sh < install-chroot.sh && systemctl reboot" 42 | ], 43 | "ssh_timeout": "{{user `ssh_timeout`}}", 44 | "ssh_username": "vagrant", 45 | "ssh_password": "vagrant", 46 | "guest_additions_mode": "disable", 47 | "shutdown_command": "sudo systemctl poweroff", 48 | "vboxmanage": [ 49 | ["modifyvm", "{{.Name}}", "--memory", "{{user `memory`}}"], 50 | ["modifyvm", "{{.Name}}", "--cpus", "{{user `cpus`}}"] 51 | ] 52 | }, { 53 | "type": "vmware-iso", 54 | "guest_os_type": "other3xlinux-64", 55 | "iso_url": "{{user `mirror`}}/iso/2018.04.01/archlinux-2018.04.01-x86_64.iso", 56 | "iso_checksum": "{{user `iso_checksum`}}", 57 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 58 | "output_directory": "output-archlinux-x86_64-{{build_type}}", 59 | "vm_name": "packer-archlinux-x86_64", 60 | "disk_size": "{{user `disk_size`}}", 61 | "headless": "{{user `headless`}}", 62 | "http_directory": "http", 63 | "boot_wait": "5s", 64 | "boot_command": [ 65 | "", 66 | "curl -O 'http://{{.HTTPIP}}:{{.HTTPPort}}/archlinux/install{,-chroot}.sh'", 67 | "bash install.sh < install-chroot.sh && systemctl reboot" 68 | ], 69 | "ssh_timeout": "{{user `ssh_timeout`}}", 70 | "ssh_username": "vagrant", 71 | "ssh_password": "vagrant", 72 | "shutdown_command": "sudo systemctl poweroff", 73 | "vmx_data": { 74 | "memsize": "{{user `memory`}}", 75 | "numvcpus": "{{user `cpus`}}" 76 | }, 77 | "vmx_remove_ethernet_interfaces": true 78 | }], 79 | "provisioners": [{ 80 | "type": "shell", 81 | "scripts": [ 82 | "scripts/archlinux/virtualbox.sh", 83 | "scripts/archlinux/vmware.sh", 84 | "scripts/common/vagrant.sh", 85 | "scripts/common/sshd.sh", 86 | "scripts/archlinux/cleanup.sh", 87 | "scripts/common/minimize.sh" 88 | ] 89 | }], 90 | "post-processors": [{ 91 | "type": "vagrant", 92 | "compression_level": "{{user `compression_level`}}", 93 | "output": "archlinux-x86_64-{{.Provider}}.box" 94 | }], 95 | "variables": { 96 | "compression_level": "6", 97 | "cpus": "1", 98 | "disk_size": "40000", 99 | "headless": "false", 100 | "iso_checksum": "42cf488fb6cba31c57f8ad875cb03784760c4b94", 101 | "iso_checksum_type": "sha1", 102 | "memory": "512", 103 | "mirror": "http://mirrors.kernel.org/archlinux", 104 | "ssh_timeout": "60m" 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /centos-6.9-x86_64.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [{ 3 | "type": "qemu", 4 | "iso_url": "{{user `mirror`}}/6/isos/x86_64/CentOS-6.9-x86_64-minimal.iso", 5 | "iso_checksum": "{{user `iso_checksum`}}", 6 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 7 | "output_directory": "output-centos-6.9-x86_64-{{build_type}}", 8 | "vm_name": "packer-centos-6.9-x86_64", 9 | "disk_size": "{{user `disk_size`}}", 10 | "headless": "{{user `headless`}}", 11 | "http_directory": "http", 12 | "boot_wait": "5s", 13 | "boot_command": [ 14 | "", 15 | "", 16 | "linux ks=http://{{.HTTPIP}}:{{.HTTPPort}}/centos-6.9/anaconda-ks.cfg", 17 | "" 18 | ], 19 | "ssh_timeout": "{{user `ssh_timeout`}}", 20 | "ssh_username": "vagrant", 21 | "ssh_password": "vagrant", 22 | "shutdown_command": "sudo poweroff", 23 | "qemuargs": [ 24 | ["-m", "{{user `memory`}}"], 25 | ["-smp", "{{user `cpus`}}"] 26 | ] 27 | }, { 28 | "type": "virtualbox-iso", 29 | "guest_os_type": "RedHat_64", 30 | "iso_url": "{{user `mirror`}}/6/isos/x86_64/CentOS-6.9-x86_64-minimal.iso", 31 | "iso_checksum": "{{user `iso_checksum`}}", 32 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 33 | "output_directory": "output-centos-6.9-x86_64-{{build_type}}", 34 | "vm_name": "packer-centos-6.9-x86_64", 35 | "disk_size": "{{user `disk_size`}}", 36 | "headless": "{{user `headless`}}", 37 | "http_directory": "http", 38 | "boot_wait": "5s", 39 | "boot_command": [ 40 | "", 41 | "", 42 | "linux ks=http://{{.HTTPIP}}:{{.HTTPPort}}/centos-6.9/anaconda-ks.cfg", 43 | "" 44 | ], 45 | "ssh_timeout": "{{user `ssh_timeout`}}", 46 | "ssh_username": "vagrant", 47 | "ssh_password": "vagrant", 48 | "shutdown_command": "sudo poweroff", 49 | "vboxmanage": [ 50 | ["modifyvm", "{{.Name}}", "--memory", "{{user `memory`}}"], 51 | ["modifyvm", "{{.Name}}", "--cpus", "{{user `cpus`}}"] 52 | ] 53 | }, { 54 | "type": "vmware-iso", 55 | "guest_os_type": "centos-64", 56 | "iso_url": "{{user `mirror`}}/6/isos/x86_64/CentOS-6.9-x86_64-minimal.iso", 57 | "iso_checksum": "{{user `iso_checksum`}}", 58 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 59 | "output_directory": "output-centos-6.9-x86_64-{{build_type}}", 60 | "vm_name": "packer-centos-6.9-x86_64", 61 | "disk_size": "{{user `disk_size`}}", 62 | "headless": "{{user `headless`}}", 63 | "http_directory": "http", 64 | "boot_wait": "5s", 65 | "boot_command": [ 66 | "", 67 | "", 68 | "linux ks=http://{{.HTTPIP}}:{{.HTTPPort}}/centos-6.9/anaconda-ks.cfg", 69 | "" 70 | ], 71 | "ssh_timeout": "{{user `ssh_timeout`}}", 72 | "ssh_username": "vagrant", 73 | "ssh_password": "vagrant", 74 | "tools_upload_flavor": "linux", 75 | "shutdown_command": "sudo poweroff", 76 | "vmx_data": { 77 | "memsize": "{{user `memory`}}", 78 | "numvcpus": "{{user `cpus`}}" 79 | }, 80 | "vmx_remove_ethernet_interfaces": true 81 | }], 82 | "provisioners": [{ 83 | "type": "shell", 84 | "scripts": [ 85 | "scripts/centos-6.9/repo.sh", 86 | "scripts/centos/virtualbox.sh", 87 | "scripts/centos/vmware.sh", 88 | "scripts/centos-6.9/init.sh", 89 | "scripts/common/vagrant.sh", 90 | "scripts/common/sshd.sh", 91 | "scripts/centos/locale.sh", 92 | "scripts/centos-6.9/cleanup.sh", 93 | "scripts/common/minimize.sh" 94 | ] 95 | }], 96 | "post-processors": [{ 97 | "type": "vagrant", 98 | "compression_level": "{{user `compression_level`}}", 99 | "output": "centos-6.9-x86_64-{{.Provider}}.box" 100 | }], 101 | "variables": { 102 | "compression_level": "6", 103 | "cpus": "1", 104 | "disk_size": "40000", 105 | "headless": "false", 106 | "iso_checksum": "422af57b493b8af49d485885a730c5a1d955f803fac85aa51311c393168b9080", 107 | "iso_checksum_type": "sha256", 108 | "memory": "768", 109 | "mirror": "http://mirrors.kernel.org/centos", 110 | "ssh_timeout": "60m" 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /centos-7.4-x86_64.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [{ 3 | "type": "qemu", 4 | "iso_url": "{{user `mirror`}}/7/isos/x86_64/CentOS-7-x86_64-NetInstall-1804.iso", 5 | "iso_checksum": "{{user `iso_checksum`}}", 6 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 7 | "output_directory": "output-centos-7.4-x86_64-{{build_type}}", 8 | "vm_name": "packer-centos-7.4-x86_64", 9 | "disk_size": "{{user `disk_size`}}", 10 | "headless": "{{user `headless`}}", 11 | "http_directory": "http", 12 | "boot_wait": "5s", 13 | "boot_command": [ 14 | "", 15 | "", 16 | "linux inst.ks=http://{{.HTTPIP}}:{{.HTTPPort}}/centos-7.4/anaconda-ks.cfg biosdevname=0 net.ifnames=0", 17 | "" 18 | ], 19 | "ssh_timeout": "{{user `ssh_timeout`}}", 20 | "ssh_username": "vagrant", 21 | "ssh_password": "vagrant", 22 | "shutdown_command": "sudo systemctl poweroff", 23 | "qemuargs": [ 24 | ["-m", "{{user `memory`}}"], 25 | ["-smp", "{{user `cpus`}}"] 26 | ] 27 | }, { 28 | "type": "virtualbox-iso", 29 | "guest_os_type": "RedHat_64", 30 | "iso_url": "{{user `mirror`}}/7/isos/x86_64/CentOS-7-x86_64-NetInstall-1804.iso", 31 | "iso_checksum": "{{user `iso_checksum`}}", 32 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 33 | "output_directory": "output-centos-7.4-x86_64-{{build_type}}", 34 | "vm_name": "packer-centos-7.4-x86_64", 35 | "disk_size": "{{user `disk_size`}}", 36 | "headless": "{{user `headless`}}", 37 | "http_directory": "http", 38 | "boot_wait": "5s", 39 | "boot_command": [ 40 | "", 41 | "", 42 | "linux inst.ks=http://{{.HTTPIP}}:{{.HTTPPort}}/centos-7.4/anaconda-ks.cfg biosdevname=0 net.ifnames=0", 43 | "" 44 | ], 45 | "ssh_timeout": "{{user `ssh_timeout`}}", 46 | "ssh_username": "vagrant", 47 | "ssh_password": "vagrant", 48 | "shutdown_command": "sudo systemctl poweroff", 49 | "vboxmanage": [ 50 | ["modifyvm", "{{.Name}}", "--memory", "{{user `memory`}}"], 51 | ["modifyvm", "{{.Name}}", "--cpus", "{{user `cpus`}}"] 52 | ] 53 | }, { 54 | "type": "vmware-iso", 55 | "guest_os_type": "centos-64", 56 | "iso_url": "{{user `mirror`}}/7/isos/x86_64/CentOS-7-x86_64-NetInstall-1804.iso", 57 | "iso_checksum": "{{user `iso_checksum`}}", 58 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 59 | "output_directory": "output-centos-7.4-x86_64-{{build_type}}", 60 | "vm_name": "packer-centos-7.4-x86_64", 61 | "disk_size": "{{user `disk_size`}}", 62 | "headless": "{{user `headless`}}", 63 | "http_directory": "http", 64 | "boot_wait": "5s", 65 | "boot_command": [ 66 | "", 67 | "", 68 | "linux inst.ks=http://{{.HTTPIP}}:{{.HTTPPort}}/centos-7.4/anaconda-ks.cfg biosdevname=0 net.ifnames=0", 69 | "" 70 | ], 71 | "ssh_timeout": "{{user `ssh_timeout`}}", 72 | "ssh_username": "vagrant", 73 | "ssh_password": "vagrant", 74 | "tools_upload_flavor": "linux", 75 | "shutdown_command": "sudo systemctl poweroff", 76 | "vmx_data": { 77 | "memsize": "{{user `memory`}}", 78 | "numvcpus": "{{user `cpus`}}" 79 | }, 80 | "vmx_remove_ethernet_interfaces": true 81 | }], 82 | "provisioners": [{ 83 | "type": "shell", 84 | "scripts": [ 85 | "scripts/centos-7.4/repo.sh", 86 | "scripts/centos/virtualbox.sh", 87 | "scripts/centos/vmware.sh", 88 | "scripts/common/vagrant.sh", 89 | "scripts/common/sshd.sh", 90 | "scripts/centos/locale.sh", 91 | "scripts/centos-7.4/cleanup.sh", 92 | "scripts/common/minimize.sh" 93 | ] 94 | }], 95 | "post-processors": [{ 96 | "type": "vagrant", 97 | "compression_level": "{{user `compression_level`}}", 98 | "output": "centos-7.4-x86_64-{{.Provider}}.box" 99 | }], 100 | "variables": { 101 | "compression_level": "6", 102 | "cpus": "1", 103 | "disk_size": "40000", 104 | "headless": "false", 105 | "iso_checksum": "937bf0a7b0932817f84f7230f15ed88911bbbd85c0c958680792b7f8d8f9c1a9", 106 | "iso_checksum_type": "sha256", 107 | "memory": "512", 108 | "mirror": "http://mirrors.kernel.org/centos", 109 | "ssh_timeout": "60m" 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /debian-7.11-amd64.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [{ 3 | "type": "qemu", 4 | "iso_url": "{{user `mirror`}}/7.11.0/amd64/iso-cd/debian-7.11.0-amd64-netinst.iso", 5 | "iso_checksum": "{{user `iso_checksum`}}", 6 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 7 | "output_directory": "output-debian-7.11-amd64-{{build_type}}", 8 | "vm_name": "packer-debian-7.11-amd64", 9 | "disk_size": "{{user `disk_size`}}", 10 | "headless": "{{user `headless`}}", 11 | "http_directory": "http", 12 | "boot_wait": "5s", 13 | "boot_command": [ 14 | "", 15 | "auto ", 16 | "preseed/url=http://{{.HTTPIP}}:{{.HTTPPort}}/debian-7.11/preseed.cfg ", 17 | "" 18 | ], 19 | "ssh_timeout": "{{user `ssh_timeout`}}", 20 | "ssh_username": "vagrant", 21 | "ssh_password": "vagrant", 22 | "shutdown_command": "sudo poweroff", 23 | "qemuargs": [ 24 | ["-m", "{{user `memory`}}"], 25 | ["-smp", "{{user `cpus`}}"] 26 | ] 27 | }, { 28 | "type": "virtualbox-iso", 29 | "guest_os_type": "Debian_64", 30 | "iso_url": "{{user `mirror`}}/7.11.0/amd64/iso-cd/debian-7.11.0-amd64-netinst.iso", 31 | "iso_checksum": "{{user `iso_checksum`}}", 32 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 33 | "output_directory": "output-debian-7.11-amd64-{{build_type}}", 34 | "vm_name": "packer-debian-7.11-amd64", 35 | "disk_size": "{{user `disk_size`}}", 36 | "headless": "{{user `headless`}}", 37 | "http_directory": "http", 38 | "boot_wait": "5s", 39 | "boot_command": [ 40 | "", 41 | "auto ", 42 | "preseed/url=http://{{.HTTPIP}}:{{.HTTPPort}}/debian-7.11/preseed.cfg ", 43 | "" 44 | ], 45 | "ssh_timeout": "{{user `ssh_timeout`}}", 46 | "ssh_username": "vagrant", 47 | "ssh_password": "vagrant", 48 | "shutdown_command": "sudo poweroff", 49 | "vboxmanage": [ 50 | ["modifyvm", "{{.Name}}", "--memory", "{{user `memory`}}"], 51 | ["modifyvm", "{{.Name}}", "--cpus", "{{user `cpus`}}"] 52 | ] 53 | }, { 54 | "type": "vmware-iso", 55 | "guest_os_type": "debian8-64", 56 | "iso_url": "{{user `mirror`}}/7.11.0/amd64/iso-cd/debian-7.11.0-amd64-netinst.iso", 57 | "iso_checksum": "{{user `iso_checksum`}}", 58 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 59 | "output_directory": "output-debian-7.11-amd64-{{build_type}}", 60 | "vm_name": "packer-debian-7.11-amd64", 61 | "disk_size": "{{user `disk_size`}}", 62 | "headless": "{{user `headless`}}", 63 | "http_directory": "http", 64 | "boot_wait": "5s", 65 | "boot_command": [ 66 | "", 67 | "auto ", 68 | "preseed/url=http://{{.HTTPIP}}:{{.HTTPPort}}/debian-7.11/preseed.cfg ", 69 | "" 70 | ], 71 | "ssh_timeout": "{{user `ssh_timeout`}}", 72 | "ssh_username": "vagrant", 73 | "ssh_password": "vagrant", 74 | "tools_upload_flavor": "linux", 75 | "shutdown_command": "sudo poweroff", 76 | "vmx_data": { 77 | "memsize": "{{user `memory`}}", 78 | "numvcpus": "{{user `cpus`}}" 79 | }, 80 | "vmx_remove_ethernet_interfaces": true 81 | }], 82 | "provisioners": [{ 83 | "type": "shell", 84 | "scripts": [ 85 | "scripts/debian/virtualbox.sh", 86 | "scripts/debian/vmware.sh", 87 | "scripts/debian/init.sh", 88 | "scripts/common/vagrant.sh", 89 | "scripts/common/sshd.sh", 90 | "scripts/debian/cleanup.sh", 91 | "scripts/common/minimize.sh" 92 | ] 93 | }], 94 | "post-processors": [{ 95 | "type": "vagrant", 96 | "compression_level": "{{user `compression_level`}}", 97 | "output": "debian-7.11-amd64-{{.Provider}}.box" 98 | }], 99 | "variables": { 100 | "compression_level": "6", 101 | "cpus": "1", 102 | "disk_size": "40000", 103 | "headless": "false", 104 | "iso_checksum": "62876fb786f203bc732ec1bd2ca4c8faea19d0a97c5936d69f3406ef92ff49bd", 105 | "iso_checksum_type": "sha256", 106 | "memory": "512", 107 | "mirror": "http://cdimage.debian.org/cdimage/archive", 108 | "ssh_timeout": "60m" 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /debian-8.10-amd64.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [{ 3 | "type": "qemu", 4 | "iso_url": "{{user `mirror`}}/8.10.0/amd64/iso-cd/debian-8.10.0-amd64-netinst.iso", 5 | "iso_checksum": "{{user `iso_checksum`}}", 6 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 7 | "output_directory": "output-debian-8.10-amd64-{{build_type}}", 8 | "vm_name": "packer-debian-8.10-amd64", 9 | "disk_size": "{{user `disk_size`}}", 10 | "headless": "{{user `headless`}}", 11 | "http_directory": "http", 12 | "boot_wait": "5s", 13 | "boot_command": [ 14 | "", 15 | "auto ", 16 | "preseed/url=http://{{.HTTPIP}}:{{.HTTPPort}}/debian-8.10/preseed.cfg ", 17 | "" 18 | ], 19 | "ssh_timeout": "{{user `ssh_timeout`}}", 20 | "ssh_username": "vagrant", 21 | "ssh_password": "vagrant", 22 | "shutdown_command": "sudo systemctl poweroff", 23 | "qemuargs": [ 24 | ["-m", "{{user `memory`}}"], 25 | ["-smp", "{{user `cpus`}}"] 26 | ] 27 | }, { 28 | "type": "virtualbox-iso", 29 | "guest_os_type": "Debian_64", 30 | "iso_url": "{{user `mirror`}}/8.10.0/amd64/iso-cd/debian-8.10.0-amd64-netinst.iso", 31 | "iso_checksum": "{{user `iso_checksum`}}", 32 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 33 | "output_directory": "output-debian-8.10-amd64-{{build_type}}", 34 | "vm_name": "packer-debian-8.10-amd64", 35 | "disk_size": "{{user `disk_size`}}", 36 | "headless": "{{user `headless`}}", 37 | "http_directory": "http", 38 | "boot_wait": "5s", 39 | "boot_command": [ 40 | "", 41 | "auto ", 42 | "preseed/url=http://{{.HTTPIP}}:{{.HTTPPort}}/debian-8.10/preseed.cfg ", 43 | "" 44 | ], 45 | "ssh_timeout": "{{user `ssh_timeout`}}", 46 | "ssh_username": "vagrant", 47 | "ssh_password": "vagrant", 48 | "shutdown_command": "sudo systemctl poweroff", 49 | "vboxmanage": [ 50 | ["modifyvm", "{{.Name}}", "--memory", "{{user `memory`}}"], 51 | ["modifyvm", "{{.Name}}", "--cpus", "{{user `cpus`}}"] 52 | ] 53 | }, { 54 | "type": "vmware-iso", 55 | "guest_os_type": "debian8-64", 56 | "iso_url": "{{user `mirror`}}/8.10.0/amd64/iso-cd/debian-8.10.0-amd64-netinst.iso", 57 | "iso_checksum": "{{user `iso_checksum`}}", 58 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 59 | "output_directory": "output-debian-8.10-amd64-{{build_type}}", 60 | "vm_name": "packer-debian-8.10-amd64", 61 | "disk_size": "{{user `disk_size`}}", 62 | "headless": "{{user `headless`}}", 63 | "http_directory": "http", 64 | "boot_wait": "5s", 65 | "boot_command": [ 66 | "", 67 | "auto ", 68 | "preseed/url=http://{{.HTTPIP}}:{{.HTTPPort}}/debian-8.10/preseed.cfg ", 69 | "" 70 | ], 71 | "ssh_timeout": "{{user `ssh_timeout`}}", 72 | "ssh_username": "vagrant", 73 | "ssh_password": "vagrant", 74 | "tools_upload_flavor": "linux", 75 | "shutdown_command": "sudo systemctl poweroff", 76 | "vmx_data": { 77 | "memsize": "{{user `memory`}}", 78 | "numvcpus": "{{user `cpus`}}" 79 | }, 80 | "vmx_remove_ethernet_interfaces": true 81 | }], 82 | "provisioners": [{ 83 | "type": "shell", 84 | "scripts": [ 85 | "scripts/debian/virtualbox.sh", 86 | "scripts/debian/vmware.sh", 87 | "scripts/common/vagrant.sh", 88 | "scripts/common/sshd.sh", 89 | "scripts/debian/cleanup.sh", 90 | "scripts/common/minimize.sh" 91 | ] 92 | }], 93 | "post-processors": [{ 94 | "type": "vagrant", 95 | "compression_level": "{{user `compression_level`}}", 96 | "output": "debian-8.10-amd64-{{.Provider}}.box" 97 | }], 98 | "variables": { 99 | "compression_level": "6", 100 | "cpus": "1", 101 | "disk_size": "40000", 102 | "headless": "false", 103 | "iso_checksum": "896cc42998edf65f1db4eba83581941fb2a584f2214976432b841af96b17ccda", 104 | "iso_checksum_type": "sha256", 105 | "memory": "512", 106 | "mirror": "http://cdimage.debian.org/cdimage/archive", 107 | "ssh_timeout": "60m" 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /debian-9.4-amd64.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [{ 3 | "type": "qemu", 4 | "iso_url": "{{user `mirror`}}/9.4.0/amd64/iso-cd/debian-9.4.0-amd64-netinst.iso", 5 | "iso_checksum": "{{user `iso_checksum`}}", 6 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 7 | "output_directory": "output-debian-9.4-amd64-{{build_type}}", 8 | "vm_name": "packer-debian-9.4-amd64", 9 | "disk_size": "{{user `disk_size`}}", 10 | "headless": "{{user `headless`}}", 11 | "http_directory": "http", 12 | "boot_wait": "5s", 13 | "boot_command": [ 14 | "", 15 | "auto ", 16 | "net.ifnames=0 ", 17 | "preseed/url=http://{{.HTTPIP}}:{{.HTTPPort}}/debian-9.4/preseed.cfg ", 18 | "" 19 | ], 20 | "ssh_timeout": "{{user `ssh_timeout`}}", 21 | "ssh_username": "vagrant", 22 | "ssh_password": "vagrant", 23 | "shutdown_command": "sudo systemctl poweroff", 24 | "qemuargs": [ 25 | ["-m", "{{user `memory`}}"], 26 | ["-smp", "{{user `cpus`}}"] 27 | ] 28 | }, { 29 | "type": "virtualbox-iso", 30 | "guest_os_type": "Debian_64", 31 | "iso_url": "{{user `mirror`}}/9.4.0/amd64/iso-cd/debian-9.4.0-amd64-netinst.iso", 32 | "iso_checksum": "{{user `iso_checksum`}}", 33 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 34 | "output_directory": "output-debian-9.4-amd64-{{build_type}}", 35 | "vm_name": "packer-debian-9.4-amd64", 36 | "disk_size": "{{user `disk_size`}}", 37 | "headless": "{{user `headless`}}", 38 | "http_directory": "http", 39 | "boot_wait": "5s", 40 | "boot_command": [ 41 | "", 42 | "auto ", 43 | "net.ifnames=0 ", 44 | "preseed/url=http://{{.HTTPIP}}:{{.HTTPPort}}/debian-9.4/preseed.cfg ", 45 | "" 46 | ], 47 | "ssh_timeout": "{{user `ssh_timeout`}}", 48 | "ssh_username": "vagrant", 49 | "ssh_password": "vagrant", 50 | "shutdown_command": "sudo systemctl poweroff", 51 | "vboxmanage": [ 52 | ["modifyvm", "{{.Name}}", "--memory", "{{user `memory`}}"], 53 | ["modifyvm", "{{.Name}}", "--cpus", "{{user `cpus`}}"] 54 | ] 55 | }, { 56 | "type": "vmware-iso", 57 | "guest_os_type": "debian8-64", 58 | "iso_url": "{{user `mirror`}}/9.4.0/amd64/iso-cd/debian-9.4.0-amd64-netinst.iso", 59 | "iso_checksum": "{{user `iso_checksum`}}", 60 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 61 | "output_directory": "output-debian-9.4-amd64-{{build_type}}", 62 | "vm_name": "packer-debian-9.4-amd64", 63 | "disk_size": "{{user `disk_size`}}", 64 | "headless": "{{user `headless`}}", 65 | "http_directory": "http", 66 | "boot_wait": "5s", 67 | "boot_command": [ 68 | "", 69 | "auto ", 70 | "net.ifnames=0 ", 71 | "preseed/url=http://{{.HTTPIP}}:{{.HTTPPort}}/debian-9.4/preseed.cfg ", 72 | "" 73 | ], 74 | "ssh_timeout": "{{user `ssh_timeout`}}", 75 | "ssh_username": "vagrant", 76 | "ssh_password": "vagrant", 77 | "shutdown_command": "sudo systemctl poweroff", 78 | "vmx_data": { 79 | "memsize": "{{user `memory`}}", 80 | "numvcpus": "{{user `cpus`}}" 81 | }, 82 | "vmx_remove_ethernet_interfaces": true 83 | }], 84 | "provisioners": [{ 85 | "type": "shell", 86 | "scripts": [ 87 | "scripts/debian/virtualbox.sh", 88 | "scripts/debian-9.4/vmware.sh", 89 | "scripts/common/vagrant.sh", 90 | "scripts/common/sshd.sh", 91 | "scripts/debian/cleanup.sh", 92 | "scripts/common/minimize.sh" 93 | ] 94 | }], 95 | "post-processors": [{ 96 | "type": "vagrant", 97 | "compression_level": "{{user `compression_level`}}", 98 | "output": "debian-9.4-amd64-{{.Provider}}.box" 99 | }], 100 | "variables": { 101 | "compression_level": "6", 102 | "cpus": "1", 103 | "disk_size": "40000", 104 | "headless": "false", 105 | "iso_checksum": "124d270006703f2111224dec3bf7a9d01450168be41d4834f88fdd035552b044", 106 | "iso_checksum_type": "sha256", 107 | "memory": "512", 108 | "mirror": "http://cdimage.debian.org/debian-cd", 109 | "ssh_timeout": "60m" 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /fedora-26-x86_64.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [{ 3 | "type": "qemu", 4 | "iso_url": "{{user `mirror`}}/releases/26/Server/x86_64/iso/Fedora-Server-netinst-x86_64-26-1.5.iso", 5 | "iso_checksum": "{{user `iso_checksum`}}", 6 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 7 | "output_directory": "output-fedora-26-x86_64-{{build_type}}", 8 | "vm_name": "packer-fedora-26-x86_64", 9 | "disk_size": "{{user `disk_size`}}", 10 | "headless": "{{user `headless`}}", 11 | "http_directory": "http", 12 | "boot_wait": "5s", 13 | "boot_command": [ 14 | " ", 15 | "inst.ks=http://{{.HTTPIP}}:{{.HTTPPort}}/fedora-26/anaconda-ks.cfg ", 16 | "biosdevname=0 ", 17 | "net.ifnames=0 ", 18 | "" 19 | ], 20 | "ssh_timeout": "{{user `ssh_timeout`}}", 21 | "ssh_username": "vagrant", 22 | "ssh_password": "vagrant", 23 | "shutdown_command": "sudo systemctl poweroff", 24 | "qemuargs": [ 25 | ["-m", "{{user `memory`}}"], 26 | ["-smp", "{{user `cpus`}}"] 27 | ] 28 | }, { 29 | "type": "virtualbox-iso", 30 | "guest_os_type": "Fedora_64", 31 | "iso_url": "{{user `mirror`}}/releases/26/Server/x86_64/iso/Fedora-Server-netinst-x86_64-26-1.5.iso", 32 | "iso_checksum": "{{user `iso_checksum`}}", 33 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 34 | "output_directory": "output-fedora-26-x86_64-{{build_type}}", 35 | "vm_name": "packer-fedora-26-x86_64", 36 | "disk_size": "{{user `disk_size`}}", 37 | "headless": "{{user `headless`}}", 38 | "http_directory": "http", 39 | "boot_wait": "5s", 40 | "boot_command": [ 41 | " ", 42 | "inst.ks=http://{{.HTTPIP}}:{{.HTTPPort}}/fedora-26/anaconda-ks.cfg ", 43 | "biosdevname=0 ", 44 | "net.ifnames=0 ", 45 | "" 46 | ], 47 | "ssh_timeout": "{{user `ssh_timeout`}}", 48 | "ssh_username": "vagrant", 49 | "ssh_password": "vagrant", 50 | "shutdown_command": "sudo systemctl poweroff", 51 | "vboxmanage": [ 52 | ["modifyvm", "{{.Name}}", "--memory", "{{user `memory`}}"], 53 | ["modifyvm", "{{.Name}}", "--cpus", "{{user `cpus`}}"] 54 | ] 55 | }, { 56 | "type": "vmware-iso", 57 | "guest_os_type": "fedora-64", 58 | "iso_url": "{{user `mirror`}}/releases/26/Server/x86_64/iso/Fedora-Server-netinst-x86_64-26-1.5.iso", 59 | "iso_checksum": "{{user `iso_checksum`}}", 60 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 61 | "output_directory": "output-fedora-26-x86_64-{{build_type}}", 62 | "vm_name": "packer-fedora-26-x86_64", 63 | "disk_size": "{{user `disk_size`}}", 64 | "headless": "{{user `headless`}}", 65 | "http_directory": "http", 66 | "boot_wait": "5s", 67 | "boot_command": [ 68 | " ", 69 | "inst.ks=http://{{.HTTPIP}}:{{.HTTPPort}}/fedora-26/anaconda-ks.cfg ", 70 | "biosdevname=0 ", 71 | "net.ifnames=0 ", 72 | "" 73 | ], 74 | "ssh_timeout": "{{user `ssh_timeout`}}", 75 | "ssh_username": "vagrant", 76 | "ssh_password": "vagrant", 77 | "shutdown_command": "sudo systemctl poweroff", 78 | "vmx_data": { 79 | "memsize": "{{user `memory`}}", 80 | "numvcpus": "{{user `cpus`}}" 81 | }, 82 | "vmx_remove_ethernet_interfaces": true 83 | }], 84 | "provisioners": [{ 85 | "type": "shell", 86 | "scripts": [ 87 | "scripts/fedora/virtualbox.sh", 88 | "scripts/fedora/vmware.sh", 89 | "scripts/common/vagrant.sh", 90 | "scripts/common/sshd.sh", 91 | "scripts/fedora/cleanup.sh", 92 | "scripts/common/minimize.sh" 93 | ] 94 | }], 95 | "post-processors": [{ 96 | "type": "vagrant", 97 | "compression_level": "{{user `compression_level`}}", 98 | "output": "fedora-26-x86_64-{{.Provider}}.box" 99 | }], 100 | "variables": { 101 | "compression_level": "6", 102 | "cpus": "1", 103 | "disk_size": "40000", 104 | "headless": "false", 105 | "iso_checksum": "e260921ef5c7bd5ee2a7b2f2f1156af6483014c73984e4cf37f2b6690e0155e5", 106 | "iso_checksum_type": "sha256", 107 | "memory": "768", 108 | "mirror": "http://download.fedoraproject.org/pub/fedora/linux", 109 | "ssh_timeout": "60m" 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /fedora-27-x86_64.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [{ 3 | "type": "qemu", 4 | "iso_url": "{{user `mirror`}}/releases/27/Server/x86_64/iso/Fedora-Server-netinst-x86_64-27-1.6.iso", 5 | "iso_checksum": "{{user `iso_checksum`}}", 6 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 7 | "output_directory": "output-fedora-27-x86_64-{{build_type}}", 8 | "vm_name": "packer-fedora-27-x86_64", 9 | "disk_size": "{{user `disk_size`}}", 10 | "headless": "{{user `headless`}}", 11 | "http_directory": "http", 12 | "boot_wait": "5s", 13 | "boot_command": [ 14 | " ", 15 | "inst.ks=http://{{.HTTPIP}}:{{.HTTPPort}}/fedora-27/anaconda-ks.cfg ", 16 | "biosdevname=0 ", 17 | "net.ifnames=0 ", 18 | "" 19 | ], 20 | "ssh_timeout": "{{user `ssh_timeout`}}", 21 | "ssh_username": "vagrant", 22 | "ssh_password": "vagrant", 23 | "shutdown_command": "sudo systemctl poweroff", 24 | "qemuargs": [ 25 | ["-m", "{{user `memory`}}"], 26 | ["-smp", "{{user `cpus`}}"] 27 | ] 28 | }, { 29 | "type": "virtualbox-iso", 30 | "guest_os_type": "Fedora_64", 31 | "iso_url": "{{user `mirror`}}/releases/27/Server/x86_64/iso/Fedora-Server-netinst-x86_64-27-1.6.iso", 32 | "iso_checksum": "{{user `iso_checksum`}}", 33 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 34 | "output_directory": "output-fedora-27-x86_64-{{build_type}}", 35 | "vm_name": "packer-fedora-27-x86_64", 36 | "disk_size": "{{user `disk_size`}}", 37 | "headless": "{{user `headless`}}", 38 | "http_directory": "http", 39 | "boot_wait": "5s", 40 | "boot_command": [ 41 | " ", 42 | "inst.ks=http://{{.HTTPIP}}:{{.HTTPPort}}/fedora-27/anaconda-ks.cfg ", 43 | "biosdevname=0 ", 44 | "net.ifnames=0 ", 45 | "" 46 | ], 47 | "ssh_timeout": "{{user `ssh_timeout`}}", 48 | "ssh_username": "vagrant", 49 | "ssh_password": "vagrant", 50 | "shutdown_command": "sudo systemctl poweroff", 51 | "vboxmanage": [ 52 | ["modifyvm", "{{.Name}}", "--memory", "{{user `memory`}}"], 53 | ["modifyvm", "{{.Name}}", "--cpus", "{{user `cpus`}}"] 54 | ] 55 | }, { 56 | "type": "vmware-iso", 57 | "guest_os_type": "fedora-64", 58 | "iso_url": "{{user `mirror`}}/releases/27/Server/x86_64/iso/Fedora-Server-netinst-x86_64-27-1.6.iso", 59 | "iso_checksum": "{{user `iso_checksum`}}", 60 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 61 | "output_directory": "output-fedora-27-x86_64-{{build_type}}", 62 | "vm_name": "packer-fedora-27-x86_64", 63 | "disk_size": "{{user `disk_size`}}", 64 | "headless": "{{user `headless`}}", 65 | "http_directory": "http", 66 | "boot_wait": "5s", 67 | "boot_command": [ 68 | " ", 69 | "inst.ks=http://{{.HTTPIP}}:{{.HTTPPort}}/fedora-27/anaconda-ks.cfg ", 70 | "biosdevname=0 ", 71 | "net.ifnames=0 ", 72 | "" 73 | ], 74 | "ssh_timeout": "{{user `ssh_timeout`}}", 75 | "ssh_username": "vagrant", 76 | "ssh_password": "vagrant", 77 | "shutdown_command": "sudo systemctl poweroff", 78 | "vmx_data": { 79 | "memsize": "{{user `memory`}}", 80 | "numvcpus": "{{user `cpus`}}" 81 | }, 82 | "vmx_remove_ethernet_interfaces": true 83 | }], 84 | "provisioners": [{ 85 | "type": "shell", 86 | "scripts": [ 87 | "scripts/fedora/virtualbox.sh", 88 | "scripts/fedora/vmware.sh", 89 | "scripts/common/vagrant.sh", 90 | "scripts/common/sshd.sh", 91 | "scripts/fedora/cleanup.sh", 92 | "scripts/common/minimize.sh" 93 | ] 94 | }], 95 | "post-processors": [{ 96 | "type": "vagrant", 97 | "compression_level": "{{user `compression_level`}}", 98 | "output": "fedora-27-x86_64-{{.Provider}}.box" 99 | }], 100 | "variables": { 101 | "compression_level": "6", 102 | "cpus": "1", 103 | "disk_size": "40000", 104 | "headless": "false", 105 | "iso_checksum": "2b93836c38833b26891345388ff5ddea60529b27a616b4539d432a3520d1c90b", 106 | "iso_checksum_type": "sha256", 107 | "memory": "768", 108 | "mirror": "http://download.fedoraproject.org/pub/fedora/linux", 109 | "ssh_timeout": "60m" 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /fedora-28-x86_64.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [{ 3 | "type": "qemu", 4 | "iso_url": "{{user `mirror`}}/releases/28/Server/x86_64/iso/Fedora-Server-netinst-x86_64-28-1.1.iso", 5 | "iso_checksum": "{{user `iso_checksum`}}", 6 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 7 | "output_directory": "output-fedora-28-x86_64-{{build_type}}", 8 | "vm_name": "packer-fedora-28-x86_64", 9 | "disk_size": "{{user `disk_size`}}", 10 | "headless": "{{user `headless`}}", 11 | "http_directory": "http", 12 | "boot_wait": "5s", 13 | "boot_command": [ 14 | " ", 15 | "inst.ks=http://{{.HTTPIP}}:{{.HTTPPort}}/fedora-28/anaconda-ks.cfg ", 16 | "biosdevname=0 ", 17 | "net.ifnames=0 ", 18 | "" 19 | ], 20 | "ssh_timeout": "{{user `ssh_timeout`}}", 21 | "ssh_username": "vagrant", 22 | "ssh_password": "vagrant", 23 | "shutdown_command": "sudo systemctl poweroff", 24 | "qemuargs": [ 25 | ["-m", "{{user `memory`}}"], 26 | ["-smp", "{{user `cpus`}}"] 27 | ] 28 | }, { 29 | "type": "virtualbox-iso", 30 | "guest_os_type": "Fedora_64", 31 | "iso_url": "{{user `mirror`}}/releases/28/Server/x86_64/iso/Fedora-Server-netinst-x86_64-28-1.1.iso", 32 | "iso_checksum": "{{user `iso_checksum`}}", 33 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 34 | "output_directory": "output-fedora-28-x86_64-{{build_type}}", 35 | "vm_name": "packer-fedora-28-x86_64", 36 | "disk_size": "{{user `disk_size`}}", 37 | "headless": "{{user `headless`}}", 38 | "http_directory": "http", 39 | "boot_wait": "5s", 40 | "boot_command": [ 41 | " ", 42 | "inst.ks=http://{{.HTTPIP}}:{{.HTTPPort}}/fedora-28/anaconda-ks.cfg ", 43 | "biosdevname=0 ", 44 | "net.ifnames=0 ", 45 | "" 46 | ], 47 | "ssh_timeout": "{{user `ssh_timeout`}}", 48 | "ssh_username": "vagrant", 49 | "ssh_password": "vagrant", 50 | "shutdown_command": "sudo systemctl poweroff", 51 | "vboxmanage": [ 52 | ["modifyvm", "{{.Name}}", "--memory", "{{user `memory`}}"], 53 | ["modifyvm", "{{.Name}}", "--cpus", "{{user `cpus`}}"] 54 | ] 55 | }, { 56 | "type": "vmware-iso", 57 | "guest_os_type": "fedora-64", 58 | "iso_url": "{{user `mirror`}}/releases/28/Server/x86_64/iso/Fedora-Server-netinst-x86_64-28-1.1.iso", 59 | "iso_checksum": "{{user `iso_checksum`}}", 60 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 61 | "output_directory": "output-fedora-28-x86_64-{{build_type}}", 62 | "vm_name": "packer-fedora-28-x86_64", 63 | "disk_size": "{{user `disk_size`}}", 64 | "headless": "{{user `headless`}}", 65 | "http_directory": "http", 66 | "boot_wait": "5s", 67 | "boot_command": [ 68 | " ", 69 | "inst.ks=http://{{.HTTPIP}}:{{.HTTPPort}}/fedora-28/anaconda-ks.cfg ", 70 | "biosdevname=0 ", 71 | "net.ifnames=0 ", 72 | "" 73 | ], 74 | "ssh_timeout": "{{user `ssh_timeout`}}", 75 | "ssh_username": "vagrant", 76 | "ssh_password": "vagrant", 77 | "shutdown_command": "sudo systemctl poweroff", 78 | "vmx_data": { 79 | "memsize": "{{user `memory`}}", 80 | "numvcpus": "{{user `cpus`}}" 81 | }, 82 | "vmx_remove_ethernet_interfaces": true 83 | }], 84 | "provisioners": [{ 85 | "type": "shell", 86 | "scripts": [ 87 | "scripts/fedora/virtualbox.sh", 88 | "scripts/fedora/vmware.sh", 89 | "scripts/common/vagrant.sh", 90 | "scripts/common/sshd.sh", 91 | "scripts/fedora/cleanup.sh", 92 | "scripts/common/minimize.sh" 93 | ] 94 | }], 95 | "post-processors": [{ 96 | "type": "vagrant", 97 | "compression_level": "{{user `compression_level`}}", 98 | "output": "fedora-28-x86_64-{{.Provider}}.box" 99 | }], 100 | "variables": { 101 | "compression_level": "6", 102 | "cpus": "1", 103 | "disk_size": "40000", 104 | "headless": "false", 105 | "iso_checksum": "ea1efdc692356b3346326f82e2f468903e8da59324fdee8b10eac4fea83f23fe", 106 | "iso_checksum_type": "sha256", 107 | "memory": "768", 108 | "mirror": "http://download.fedoraproject.org/pub/fedora/linux", 109 | "ssh_timeout": "60m" 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /freebsd-10.4-amd64.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [{ 3 | "type": "qemu", 4 | "iso_url": "{{user `mirror`}}/releases/ISO-IMAGES/10.4/FreeBSD-10.4-RELEASE-amd64-disc1.iso", 5 | "iso_checksum": "{{user `iso_checksum`}}", 6 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 7 | "output_directory": "output-freebsd-10.4-amd64-{{build_type}}", 8 | "vm_name": "packer-freebsd-10.4-amd64", 9 | "disk_size": "{{user `disk_size`}}", 10 | "headless": "{{user `headless`}}", 11 | "http_directory": "http", 12 | "boot_wait": "5s", 13 | "boot_command": [ 14 | "2", 15 | "", 16 | "mdmfs -s 100m md1 /tmp", 17 | "dhclient -l /tmp/dhclient.leases -p /tmp/dhclient.pid vtnet0", 18 | "fetch -o /tmp/installerconfig http://{{.HTTPIP}}:{{.HTTPPort}}/freebsd-10.4/installerconfig", 19 | "bsdinstall script /tmp/installerconfig && reboot" 20 | ], 21 | "ssh_timeout": "{{user `ssh_timeout`}}", 22 | "ssh_username": "vagrant", 23 | "ssh_password": "vagrant", 24 | "shutdown_command": "sudo poweroff", 25 | "qemuargs": [ 26 | ["-m", "{{user `memory`}}"], 27 | ["-smp", "{{user `cpus`}}"] 28 | ] 29 | }, { 30 | "type": "virtualbox-iso", 31 | "guest_os_type": "FreeBSD_64", 32 | "iso_url": "{{user `mirror`}}/releases/ISO-IMAGES/10.4/FreeBSD-10.4-RELEASE-amd64-disc1.iso", 33 | "iso_checksum": "{{user `iso_checksum`}}", 34 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 35 | "output_directory": "output-freebsd-10.4-amd64-{{build_type}}", 36 | "vm_name": "packer-freebsd-10.4-amd64", 37 | "disk_size": "{{user `disk_size`}}", 38 | "headless": "{{user `headless`}}", 39 | "http_directory": "http", 40 | "boot_wait": "10s", 41 | "boot_command": [ 42 | "2", 43 | "", 44 | "mdmfs -s 100m md1 /tmp", 45 | "dhclient -l /tmp/dhclient.leases -p /tmp/dhclient.pid em0", 46 | "fetch -o /tmp/installerconfig http://{{.HTTPIP}}:{{.HTTPPort}}/freebsd-10.4/installerconfig", 47 | "bsdinstall script /tmp/installerconfig && reboot" 48 | ], 49 | "ssh_timeout": "{{user `ssh_timeout`}}", 50 | "ssh_username": "vagrant", 51 | "ssh_password": "vagrant", 52 | "guest_additions_mode": "disable", 53 | "shutdown_command": "sudo poweroff", 54 | "vboxmanage": [ 55 | ["modifyvm", "{{.Name}}", "--memory", "{{user `memory`}}"], 56 | ["modifyvm", "{{.Name}}", "--cpus", "{{user `cpus`}}"] 57 | ] 58 | }, { 59 | "type": "vmware-iso", 60 | "guest_os_type": "freeBSD-64", 61 | "iso_url": "{{user `mirror`}}/releases/ISO-IMAGES/10.4/FreeBSD-10.4-RELEASE-amd64-disc1.iso", 62 | "iso_checksum": "{{user `iso_checksum`}}", 63 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 64 | "output_directory": "output-freebsd-10.4-amd64-{{build_type}}", 65 | "vm_name": "packer-freebsd-10.4-amd64", 66 | "disk_size": "{{user `disk_size`}}", 67 | "headless": "{{user `headless`}}", 68 | "http_directory": "http", 69 | "boot_wait": "10s", 70 | "boot_command": [ 71 | "2", 72 | "", 73 | "mdmfs -s 100m md1 /tmp", 74 | "dhclient -l /tmp/dhclient.leases -p /tmp/dhclient.pid em0", 75 | "fetch -o /tmp/installerconfig http://{{.HTTPIP}}:{{.HTTPPort}}/freebsd-10.4/installerconfig", 76 | "bsdinstall script /tmp/installerconfig && reboot" 77 | ], 78 | "ssh_timeout": "{{user `ssh_timeout`}}", 79 | "ssh_username": "vagrant", 80 | "ssh_password": "vagrant", 81 | "tools_upload_flavor": "freebsd", 82 | "shutdown_command": "sudo poweroff", 83 | "vmx_data": { 84 | "memsize": "{{user `memory`}}", 85 | "numvcpus": "{{user `cpus`}}" 86 | }, 87 | "vmx_remove_ethernet_interfaces": true 88 | }], 89 | "provisioners": [{ 90 | "type": "shell", 91 | "scripts": [ 92 | "scripts/freebsd/virtualbox.sh", 93 | "scripts/freebsd/vmware.sh", 94 | "scripts/freebsd/init.sh", 95 | "scripts/common/vagrant.sh", 96 | "scripts/common/sshd.sh", 97 | "scripts/freebsd/cleanup.sh", 98 | "scripts/freebsd/minimize.sh" 99 | ] 100 | }], 101 | "post-processors": [{ 102 | "type": "vagrant", 103 | "compression_level": "{{user `compression_level`}}", 104 | "output": "freebsd-10.4-amd64-{{.Provider}}.box", 105 | "vagrantfile_template": "vagrantfile_templates/freebsd.rb" 106 | }], 107 | "variables": { 108 | "compression_level": "6", 109 | "cpus": "1", 110 | "disk_size": "40000", 111 | "headless": "false", 112 | "iso_checksum": "7ac73b2a899024e1d9e71e55b5c9b9ac13938468206c72c5a1cf23c7e0a715b4", 113 | "iso_checksum_type": "sha256", 114 | "memory": "512", 115 | "mirror": "http://ftp.freebsd.org/pub/FreeBSD", 116 | "ssh_timeout": "60m" 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /freebsd-11.1-amd64.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [{ 3 | "type": "qemu", 4 | "iso_url": "{{user `mirror`}}/releases/ISO-IMAGES/11.1/FreeBSD-11.1-RELEASE-amd64-disc1.iso", 5 | "iso_checksum": "{{user `iso_checksum`}}", 6 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 7 | "output_directory": "output-freebsd-11.1-amd64-{{build_type}}", 8 | "vm_name": "packer-freebsd-11.1-amd64", 9 | "disk_size": "{{user `disk_size`}}", 10 | "headless": "{{user `headless`}}", 11 | "http_directory": "http", 12 | "boot_wait": "5s", 13 | "boot_command": [ 14 | "2", 15 | "", 16 | "mdmfs -s 100m md1 /tmp", 17 | "dhclient -l /tmp/dhclient.leases -p /tmp/dhclient.pid vtnet0", 18 | "fetch -o /tmp/installerconfig http://{{.HTTPIP}}:{{.HTTPPort}}/freebsd-11.1/installerconfig", 19 | "bsdinstall script /tmp/installerconfig && reboot" 20 | ], 21 | "ssh_timeout": "{{user `ssh_timeout`}}", 22 | "ssh_username": "vagrant", 23 | "ssh_password": "vagrant", 24 | "shutdown_command": "sudo poweroff", 25 | "qemuargs": [ 26 | ["-m", "{{user `memory`}}"], 27 | ["-smp", "{{user `cpus`}}"] 28 | ] 29 | }, { 30 | "type": "virtualbox-iso", 31 | "guest_os_type": "FreeBSD_64", 32 | "iso_url": "{{user `mirror`}}/releases/ISO-IMAGES/11.1/FreeBSD-11.1-RELEASE-amd64-disc1.iso", 33 | "iso_checksum": "{{user `iso_checksum`}}", 34 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 35 | "output_directory": "output-freebsd-11.1-amd64-{{build_type}}", 36 | "vm_name": "packer-freebsd-11.1-amd64", 37 | "disk_size": "{{user `disk_size`}}", 38 | "headless": "{{user `headless`}}", 39 | "http_directory": "http", 40 | "boot_wait": "10s", 41 | "boot_command": [ 42 | "2", 43 | "", 44 | "mdmfs -s 100m md1 /tmp", 45 | "dhclient -l /tmp/dhclient.leases -p /tmp/dhclient.pid em0", 46 | "fetch -o /tmp/installerconfig http://{{.HTTPIP}}:{{.HTTPPort}}/freebsd-11.1/installerconfig", 47 | "bsdinstall script /tmp/installerconfig && reboot" 48 | ], 49 | "ssh_timeout": "{{user `ssh_timeout`}}", 50 | "ssh_username": "vagrant", 51 | "ssh_password": "vagrant", 52 | "guest_additions_mode": "disable", 53 | "shutdown_command": "sudo poweroff", 54 | "vboxmanage": [ 55 | ["modifyvm", "{{.Name}}", "--memory", "{{user `memory`}}"], 56 | ["modifyvm", "{{.Name}}", "--cpus", "{{user `cpus`}}"] 57 | ] 58 | }, { 59 | "type": "vmware-iso", 60 | "guest_os_type": "freeBSD-64", 61 | "iso_url": "{{user `mirror`}}/releases/ISO-IMAGES/11.1/FreeBSD-11.1-RELEASE-amd64-disc1.iso", 62 | "iso_checksum": "{{user `iso_checksum`}}", 63 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 64 | "output_directory": "output-freebsd-11.1-amd64-{{build_type}}", 65 | "vm_name": "packer-freebsd-11.1-amd64", 66 | "disk_size": "{{user `disk_size`}}", 67 | "headless": "{{user `headless`}}", 68 | "http_directory": "http", 69 | "boot_wait": "10s", 70 | "boot_command": [ 71 | "2", 72 | "", 73 | "mdmfs -s 100m md1 /tmp", 74 | "dhclient -l /tmp/dhclient.leases -p /tmp/dhclient.pid em0", 75 | "fetch -o /tmp/installerconfig http://{{.HTTPIP}}:{{.HTTPPort}}/freebsd-11.1/installerconfig", 76 | "bsdinstall script /tmp/installerconfig && reboot" 77 | ], 78 | "ssh_timeout": "{{user `ssh_timeout`}}", 79 | "ssh_username": "vagrant", 80 | "ssh_password": "vagrant", 81 | "tools_upload_flavor": "freebsd", 82 | "shutdown_command": "sudo poweroff", 83 | "vmx_data": { 84 | "memsize": "{{user `memory`}}", 85 | "numvcpus": "{{user `cpus`}}" 86 | }, 87 | "vmx_remove_ethernet_interfaces": true 88 | }], 89 | "provisioners": [{ 90 | "type": "shell", 91 | "scripts": [ 92 | "scripts/freebsd/virtualbox.sh", 93 | "scripts/freebsd/vmware.sh", 94 | "scripts/freebsd/init.sh", 95 | "scripts/common/vagrant.sh", 96 | "scripts/common/sshd.sh", 97 | "scripts/freebsd/cleanup.sh", 98 | "scripts/freebsd/minimize.sh" 99 | ] 100 | }], 101 | "post-processors": [{ 102 | "type": "vagrant", 103 | "compression_level": "{{user `compression_level`}}", 104 | "output": "freebsd-11.1-amd64-{{.Provider}}.box", 105 | "vagrantfile_template": "vagrantfile_templates/freebsd.rb" 106 | }], 107 | "variables": { 108 | "compression_level": "6", 109 | "cpus": "1", 110 | "disk_size": "40000", 111 | "headless": "false", 112 | "iso_checksum": "ff4c749ea0aaaceedb2432ba3e0fd0c1b64f5a72141b1ec06b9ced52b5de0dbf", 113 | "iso_checksum_type": "sha256", 114 | "memory": "512", 115 | "mirror": "http://ftp.freebsd.org/pub/FreeBSD", 116 | "ssh_timeout": "60m" 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /freebsd-9.3-amd64.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [{ 3 | "type": "qemu", 4 | "iso_url": "{{user `mirror`}}/releases/ISO-IMAGES/9.3/FreeBSD-9.3-RELEASE-amd64-disc1.iso", 5 | "iso_checksum": "{{user `iso_checksum`}}", 6 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 7 | "output_directory": "output-freebsd-9.3-amd64-{{build_type}}", 8 | "vm_name": "packer-freebsd-9.3-amd64", 9 | "disk_size": "{{user `disk_size`}}", 10 | "headless": "{{user `headless`}}", 11 | "http_directory": "http", 12 | "boot_wait": "5s", 13 | "boot_command": [ 14 | "2", 15 | "", 16 | "mdmfs -s 100m md1 /tmp", 17 | "dhclient -l /tmp/dhclient.leases -p /tmp/dhclient.pid vtnet0", 18 | "fetch -o /tmp/installerconfig http://{{.HTTPIP}}:{{.HTTPPort}}/freebsd-9.3/installerconfig", 19 | "bsdinstall script /tmp/installerconfig && reboot" 20 | ], 21 | "ssh_timeout": "{{user `ssh_timeout`}}", 22 | "ssh_username": "vagrant", 23 | "ssh_password": "vagrant", 24 | "shutdown_command": "sudo poweroff", 25 | "qemuargs": [ 26 | ["-m", "{{user `memory`}}"], 27 | ["-smp", "{{user `cpus`}}"] 28 | ] 29 | }, { 30 | "type": "virtualbox-iso", 31 | "guest_os_type": "FreeBSD_64", 32 | "iso_url": "{{user `mirror`}}/releases/ISO-IMAGES/9.3/FreeBSD-9.3-RELEASE-amd64-disc1.iso", 33 | "iso_checksum": "{{user `iso_checksum`}}", 34 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 35 | "output_directory": "output-freebsd-9.3-amd64-{{build_type}}", 36 | "vm_name": "packer-freebsd-9.3-amd64", 37 | "disk_size": "{{user `disk_size`}}", 38 | "headless": "{{user `headless`}}", 39 | "http_directory": "http", 40 | "boot_wait": "10s", 41 | "boot_command": [ 42 | "2", 43 | "", 44 | "mdmfs -s 100m md1 /tmp", 45 | "dhclient -l /tmp/dhclient.leases -p /tmp/dhclient.pid em0", 46 | "fetch -o /tmp/installerconfig http://{{.HTTPIP}}:{{.HTTPPort}}/freebsd-9.3/installerconfig", 47 | "bsdinstall script /tmp/installerconfig && reboot" 48 | ], 49 | "ssh_timeout": "{{user `ssh_timeout`}}", 50 | "ssh_username": "vagrant", 51 | "ssh_password": "vagrant", 52 | "guest_additions_mode": "disable", 53 | "shutdown_command": "sudo poweroff", 54 | "vboxmanage": [ 55 | ["modifyvm", "{{.Name}}", "--memory", "{{user `memory`}}"], 56 | ["modifyvm", "{{.Name}}", "--cpus", "{{user `cpus`}}"] 57 | ] 58 | }, { 59 | "type": "vmware-iso", 60 | "guest_os_type": "freeBSD-64", 61 | "iso_url": "{{user `mirror`}}/releases/ISO-IMAGES/9.3/FreeBSD-9.3-RELEASE-amd64-disc1.iso", 62 | "iso_checksum": "{{user `iso_checksum`}}", 63 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 64 | "output_directory": "output-freebsd-9.3-amd64-{{build_type}}", 65 | "vm_name": "packer-freebsd-9.3-amd64", 66 | "disk_size": "{{user `disk_size`}}", 67 | "headless": "{{user `headless`}}", 68 | "http_directory": "http", 69 | "boot_wait": "10s", 70 | "boot_command": [ 71 | "2", 72 | "", 73 | "mdmfs -s 100m md1 /tmp", 74 | "dhclient -l /tmp/dhclient.leases -p /tmp/dhclient.pid em0", 75 | "fetch -o /tmp/installerconfig http://{{.HTTPIP}}:{{.HTTPPort}}/freebsd-9.3/installerconfig", 76 | "bsdinstall script /tmp/installerconfig && reboot" 77 | ], 78 | "ssh_timeout": "{{user `ssh_timeout`}}", 79 | "ssh_username": "vagrant", 80 | "ssh_password": "vagrant", 81 | "tools_upload_flavor": "freebsd", 82 | "shutdown_command": "sudo poweroff", 83 | "vmx_data": { 84 | "memsize": "{{user `memory`}}", 85 | "numvcpus": "{{user `cpus`}}" 86 | }, 87 | "vmx_remove_ethernet_interfaces": true 88 | }], 89 | "provisioners": [{ 90 | "type": "shell", 91 | "scripts": [ 92 | "scripts/freebsd/virtualbox.sh", 93 | "scripts/freebsd/vmware.sh", 94 | "scripts/freebsd/init.sh", 95 | "scripts/common/vagrant.sh", 96 | "scripts/common/sshd.sh", 97 | "scripts/freebsd/cleanup.sh", 98 | "scripts/freebsd/minimize.sh" 99 | ] 100 | }], 101 | "post-processors": [{ 102 | "type": "vagrant", 103 | "compression_level": "{{user `compression_level`}}", 104 | "output": "freebsd-9.3-amd64-{{.Provider}}.box", 105 | "vagrantfile_template": "vagrantfile_templates/freebsd.rb" 106 | }], 107 | "variables": { 108 | "compression_level": "6", 109 | "cpus": "1", 110 | "disk_size": "40000", 111 | "headless": "false", 112 | "iso_checksum": "5a3c82653d77bba7d7ded8bd7efbedc09d52cf4045d98ce52a82c9e0f8fa9b0e", 113 | "iso_checksum_type": "sha256", 114 | "memory": "512", 115 | "mirror": "http://ftp.freebsd.org/pub/FreeBSD", 116 | "ssh_timeout": "60m" 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /http/archlinux/install-chroot.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | set -x 5 | 6 | ln -sf /usr/share/zoneinfo/UTC /etc/localtime 7 | 8 | echo 'archlinux' > /etc/hostname 9 | 10 | sed -i -e 's/^#\(en_US.UTF-8\)/\1/' /etc/locale.gen 11 | locale-gen 12 | echo 'LANG=en_US.UTF-8' > /etc/locale.conf 13 | 14 | mkinitcpio -p linux 15 | 16 | echo -e 'vagrant\nvagrant' | passwd 17 | useradd -m -U vagrant 18 | echo -e 'vagrant\nvagrant' | passwd vagrant 19 | cat < /etc/sudoers.d/vagrant 20 | Defaults:vagrant !requiretty 21 | vagrant ALL=(ALL) NOPASSWD: ALL 22 | EOF 23 | chmod 440 /etc/sudoers.d/vagrant 24 | 25 | mkdir -p /etc/systemd/network 26 | ln -sf /dev/null /etc/systemd/network/99-default.link 27 | 28 | systemctl enable sshd 29 | systemctl enable dhcpcd@eth0 30 | 31 | grub-install "$device" 32 | sed -i -e 's/^GRUB_TIMEOUT=.*$/GRUB_TIMEOUT=1/' /etc/default/grub 33 | grub-mkconfig -o /boot/grub/grub.cfg 34 | -------------------------------------------------------------------------------- /http/archlinux/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | set -x 5 | 6 | if [ -e /dev/vda ]; then 7 | device=/dev/vda 8 | elif [ -e /dev/sda ]; then 9 | device=/dev/sda 10 | else 11 | echo "ERROR: There is no disk available for installation" >&2 12 | exit 1 13 | fi 14 | export device 15 | 16 | memory_size_in_kilobytes=$(free | awk '/^Mem:/ { print $2 }') 17 | swap_size_in_kilobytes=$((memory_size_in_kilobytes * 2)) 18 | sfdisk "$device" < /tmp/mirrolist 28 | grep '^#Server' /tmp/mirrolist | sort -R | head -n 50 | sed 's/^#//' > /tmp/mirrolist.50 29 | rankmirrors -v /tmp/mirrolist.50 | tee /etc/pacman.d/mirrorlist 30 | pacstrap /mnt base grub openssh sudo 31 | 32 | swapon "${device}1" 33 | genfstab -p /mnt >> /mnt/etc/fstab 34 | swapoff "${device}1" 35 | 36 | arch-chroot /mnt /bin/bash 37 | -------------------------------------------------------------------------------- /http/centos-6.9/anaconda-ks.cfg: -------------------------------------------------------------------------------- 1 | install 2 | text 3 | reboot 4 | cdrom 5 | lang en_US.UTF-8 6 | keyboard us 7 | timezone --utc Etc/UTC 8 | rootpw --plaintext vagrant 9 | user --name=vagrant --groups=vagrant --password=vagrant --plaintext 10 | zerombr 11 | clearpart --all 12 | part /boot --size=200 13 | part swap --recommended 14 | part / --size=1 --grow 15 | bootloader --timeout=1 16 | 17 | %packages --nobase 18 | @core 19 | -b43-openfwwf 20 | -device-mapper-multipath 21 | -efibootmgr 22 | -iscsi-initiator-utils 23 | -lvm2 24 | -mdadm 25 | %end 26 | 27 | %post --erroronfail 28 | yum -y update 29 | 30 | cat < /etc/sudoers.d/vagrant 31 | Defaults:vagrant !requiretty 32 | vagrant ALL=(ALL) NOPASSWD: ALL 33 | EOF 34 | chmod 440 /etc/sudoers.d/vagrant 35 | 36 | rm /etc/udev/rules.d/70-persistent-net.rules 37 | ln -s /dev/null /etc/udev/rules.d/75-persistent-net-generator.rules 38 | cat > /etc/sysconfig/network-scripts/ifcfg-eth0 < /etc/sudoers.d/vagrant 38 | Defaults:vagrant !requiretty 39 | vagrant ALL=(ALL) NOPASSWD: ALL 40 | EOF 41 | chmod 440 /etc/sudoers.d/vagrant 42 | 43 | ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules 44 | cat > /etc/sysconfig/network-scripts/ifcfg-eth0 < /target/etc/discover-pkginstall.conf" \ 51 | -e "/in-target/i echo 'discover=d' >> /target/etc/discover-pkginstall.conf" \ 52 | /usr/lib/pre-pkgsel.d/20install-hwpackages 53 | d-i preseed/late_command string \ 54 | echo 'Defaults:vagrant !requiretty' > /target/etc/sudoers.d/vagrant; \ 55 | echo 'vagrant ALL=(ALL) NOPASSWD: ALL' >> /target/etc/sudoers.d/vagrant; \ 56 | chmod 440 /target/etc/sudoers.d/vagrant 57 | -------------------------------------------------------------------------------- /http/debian-8.10/preseed.cfg: -------------------------------------------------------------------------------- 1 | d-i debian-installer/locale string en_US 2 | d-i keyboard-configuration/xkb-keymap select us 3 | 4 | d-i passwd/root-password-again password vagrant 5 | d-i passwd/root-password password vagrant 6 | d-i passwd/user-fullname string vagrant 7 | d-i passwd/username string vagrant 8 | d-i passwd/user-password password vagrant 9 | d-i passwd/user-password-again password vagrant 10 | 11 | d-i time/zone string UTC 12 | 13 | d-i partman-auto/method string regular 14 | d-i partman-auto/expert_recipe string \ 15 | scheme :: \ 16 | 200 0 200 ext4 \ 17 | $primary{ } \ 18 | $bootable{ } \ 19 | method{ format } \ 20 | format{ } \ 21 | use_filesystem{ } \ 22 | filesystem{ ext4 } \ 23 | mountpoint{ /boot } . \ 24 | 200% 0 200% linux-swap \ 25 | $primary{ } \ 26 | method{ swap } \ 27 | format{ } . \ 28 | 1 0 -1 ext4 \ 29 | $primary{ } \ 30 | method{ format } \ 31 | format{ } \ 32 | use_filesystem{ } \ 33 | filesystem{ ext4 } \ 34 | mountpoint{ / } . 35 | d-i partman-partitioning/confirm_write_new_label boolean true 36 | d-i partman/choose_partition select finish 37 | d-i partman/confirm boolean true 38 | d-i partman/confirm_nooverwrite boolean true 39 | 40 | d-i apt-setup/non-free boolean true 41 | d-i apt-setup/contrib boolean true 42 | 43 | tasksel tasksel/first multiselect 44 | d-i pkgsel/include string curl openssh-server sudo 45 | 46 | d-i grub-installer/bootdev string default 47 | 48 | d-i finish-install/reboot_in_progress note 49 | 50 | d-i preseed/early_command string \ 51 | sed -i \ 52 | -e "/in-target/i echo 'd() { /sbin/discover \"\$@\" | grep -v virtualbox; }' > /target/etc/discover-pkginstall.conf" \ 53 | -e "/in-target/i echo 'discover=d' >> /target/etc/discover-pkginstall.conf" \ 54 | /usr/lib/pre-pkgsel.d/20install-hwpackages 55 | d-i preseed/late_command string \ 56 | echo 'Defaults:vagrant !requiretty' > /target/etc/sudoers.d/vagrant; \ 57 | echo 'vagrant ALL=(ALL) NOPASSWD: ALL' >> /target/etc/sudoers.d/vagrant; \ 58 | chmod 440 /target/etc/sudoers.d/vagrant 59 | -------------------------------------------------------------------------------- /http/debian-9.4/preseed.cfg: -------------------------------------------------------------------------------- 1 | d-i debian-installer/locale string en_US 2 | d-i keyboard-configuration/xkb-keymap select us 3 | 4 | d-i passwd/root-password-again password vagrant 5 | d-i passwd/root-password password vagrant 6 | d-i passwd/user-fullname string vagrant 7 | d-i passwd/username string vagrant 8 | d-i passwd/user-password password vagrant 9 | d-i passwd/user-password-again password vagrant 10 | 11 | d-i time/zone string UTC 12 | 13 | d-i partman-auto/method string regular 14 | d-i partman-auto/expert_recipe string \ 15 | scheme :: \ 16 | 200 0 200 ext4 \ 17 | $primary{ } \ 18 | $bootable{ } \ 19 | method{ format } \ 20 | format{ } \ 21 | use_filesystem{ } \ 22 | filesystem{ ext4 } \ 23 | mountpoint{ /boot } . \ 24 | 200% 0 200% linux-swap \ 25 | $primary{ } \ 26 | method{ swap } \ 27 | format{ } . \ 28 | 1 0 -1 ext4 \ 29 | $primary{ } \ 30 | method{ format } \ 31 | format{ } \ 32 | use_filesystem{ } \ 33 | filesystem{ ext4 } \ 34 | mountpoint{ / } . 35 | d-i partman-partitioning/confirm_write_new_label boolean true 36 | d-i partman/choose_partition select finish 37 | d-i partman/confirm boolean true 38 | d-i partman/confirm_nooverwrite boolean true 39 | 40 | d-i apt-setup/non-free boolean true 41 | d-i apt-setup/contrib boolean true 42 | 43 | tasksel tasksel/first multiselect 44 | d-i pkgsel/include string curl openssh-server sudo 45 | 46 | d-i grub-installer/bootdev string default 47 | 48 | d-i finish-install/reboot_in_progress note 49 | 50 | d-i preseed/early_command string \ 51 | sed -i \ 52 | -e "/in-target/i echo 'd() { /sbin/discover \"\$@\" | grep -v virtualbox; }' > /target/etc/discover-pkginstall.conf" \ 53 | -e "/in-target/i echo 'discover=d' >> /target/etc/discover-pkginstall.conf" \ 54 | /usr/lib/pre-pkgsel.d/20install-hwpackages 55 | d-i preseed/late_command string \ 56 | echo 'Defaults:vagrant !requiretty' > /target/etc/sudoers.d/vagrant; \ 57 | echo 'vagrant ALL=(ALL) NOPASSWD: ALL' >> /target/etc/sudoers.d/vagrant; \ 58 | chmod 440 /target/etc/sudoers.d/vagrant 59 | -------------------------------------------------------------------------------- /http/fedora-26/anaconda-ks.cfg: -------------------------------------------------------------------------------- 1 | install 2 | text 3 | reboot 4 | url --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch 5 | lang en_US.UTF-8 6 | keyboard us 7 | timezone --utc Etc/UTC 8 | rootpw --plaintext vagrant 9 | user --name=vagrant --password=vagrant --plaintext 10 | zerombr 11 | autopart --type=plain 12 | clearpart --all --initlabel 13 | bootloader --timeout=1 14 | 15 | %packages --excludeWeakdeps 16 | @core 17 | kernel-core 18 | systemd-udev 19 | which 20 | -firewalld 21 | -kernel 22 | -NetworkManager 23 | -plymouth 24 | %end 25 | 26 | %post --erroronfail 27 | dnf -y update 28 | 29 | cat < /etc/sudoers.d/vagrant 30 | Defaults:vagrant !requiretty 31 | vagrant ALL=(ALL) NOPASSWD: ALL 32 | EOF 33 | chmod 440 /etc/sudoers.d/vagrant 34 | 35 | mkdir -p /etc/systemd/network 36 | ln -sf /dev/null /etc/systemd/network/99-default.link 37 | 38 | cat > /etc/sysconfig/network-scripts/ifcfg-eth0 < /etc/sysconfig/network < /etc/sudoers.d/vagrant 30 | Defaults:vagrant !requiretty 31 | vagrant ALL=(ALL) NOPASSWD: ALL 32 | EOF 33 | chmod 440 /etc/sudoers.d/vagrant 34 | 35 | mkdir -p /etc/systemd/network 36 | ln -sf /dev/null /etc/systemd/network/99-default.link 37 | 38 | cat > /etc/sysconfig/network-scripts/ifcfg-eth0 < /etc/sysconfig/network < /etc/sudoers.d/vagrant 30 | Defaults:vagrant !requiretty 31 | vagrant ALL=(ALL) NOPASSWD: ALL 32 | EOF 33 | chmod 440 /etc/sudoers.d/vagrant 34 | 35 | mkdir -p /etc/systemd/network 36 | ln -sf /dev/null /etc/systemd/network/99-default.link 37 | 38 | cat > /etc/sysconfig/network-scripts/ifcfg-eth0 < /etc/sysconfig/network <&2 9 | exit 1 10 | fi 11 | 12 | #!/bin/sh 13 | cat < /etc/resolv.conf 14 | nameserver 8.8.8.8 15 | EOF 16 | 17 | ASSUME_ALWAYS_YES=yes pkg install curl 18 | ASSUME_ALWAYS_YES=yes pkg install sudo 19 | 20 | interface=$(route get default | awk '/interface/ { print $2 }') 21 | cat < /etc/rc.conf 22 | ifconfig_${interface}="DHCP" 23 | sshd_enable="YES" 24 | EOF 25 | 26 | echo 'vagrant' | pw useradd vagrant -h 0 -m 27 | echo 'vagrant' | pw usermod root -h 0 28 | 29 | cat < /usr/local/etc/sudoers.d/vagrant 30 | Defaults:vagrant !requiretty 31 | vagrant ALL=(ALL) NOPASSWD: ALL 32 | EOF 33 | chmod 440 /usr/local/etc/sudoers.d/vagrant 34 | -------------------------------------------------------------------------------- /http/freebsd-11.1/installerconfig: -------------------------------------------------------------------------------- 1 | if [ -e /dev/vtbd0 ]; then 2 | PARTITIONS=vtbd0 3 | elif [ -e /dev/ada0 ]; then 4 | PARTITIONS=ada0 5 | elif [ -e /dev/da0 ]; then 6 | PARTITIONS=da0 7 | else 8 | echo "ERROR: There is no disk available for installation" >&2 9 | exit 1 10 | fi 11 | 12 | #!/bin/sh 13 | cat < /etc/resolv.conf 14 | nameserver 8.8.8.8 15 | EOF 16 | 17 | ASSUME_ALWAYS_YES=yes pkg install curl 18 | ASSUME_ALWAYS_YES=yes pkg install sudo 19 | 20 | interface=$(route get default | awk '/interface/ { print $2 }') 21 | cat < /etc/rc.conf 22 | ifconfig_${interface}="DHCP" 23 | sshd_enable="YES" 24 | EOF 25 | 26 | echo 'vagrant' | pw useradd vagrant -h 0 -m 27 | echo 'vagrant' | pw usermod root -h 0 28 | 29 | cat < /usr/local/etc/sudoers.d/vagrant 30 | Defaults:vagrant !requiretty 31 | vagrant ALL=(ALL) NOPASSWD: ALL 32 | EOF 33 | chmod 440 /usr/local/etc/sudoers.d/vagrant 34 | -------------------------------------------------------------------------------- /http/freebsd-9.3/installerconfig: -------------------------------------------------------------------------------- 1 | if [ -e /dev/vtbd0 ]; then 2 | PARTITIONS=vtbd0 3 | elif [ -e /dev/ada0 ]; then 4 | PARTITIONS=ada0 5 | elif [ -e /dev/da0 ]; then 6 | PARTITIONS=da0 7 | else 8 | echo "ERROR: There is no disk available for installation" >&2 9 | exit 1 10 | fi 11 | 12 | #!/bin/sh 13 | cat < /etc/resolv.conf 14 | nameserver 8.8.8.8 15 | EOF 16 | 17 | ASSUME_ALWAYS_YES=yes pkg install curl 18 | ASSUME_ALWAYS_YES=yes pkg install sudo 19 | 20 | interface=$(route get default | awk '/interface/ { print $2 }') 21 | cat < /etc/rc.conf 22 | ifconfig_${interface}="DHCP" 23 | sshd_enable="YES" 24 | EOF 25 | 26 | echo 'vagrant' | pw useradd vagrant -h 0 -m 27 | echo 'vagrant' | pw usermod root -h 0 28 | 29 | cat < /usr/local/etc/sudoers.d/vagrant 30 | Defaults:vagrant !requiretty 31 | vagrant ALL=(ALL) NOPASSWD: ALL 32 | EOF 33 | chmod 440 /usr/local/etc/sudoers.d/vagrant 34 | -------------------------------------------------------------------------------- /http/openbsd-6.1/install-chroot.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | set -x 5 | 6 | pkg_add sudo-- 7 | cat < /etc/sudoers 8 | 9 | #includedir /etc/sudoers.d 10 | EOF 11 | mkdir /etc/sudoers.d 12 | cat < /etc/sudoers.d/vagrant 13 | Defaults:vagrant !requiretty 14 | vagrant ALL=(ALL) NOPASSWD: ALL 15 | EOF 16 | chmod 440 /etc/sudoers.d/vagrant 17 | -------------------------------------------------------------------------------- /http/openbsd-6.1/install.conf: -------------------------------------------------------------------------------- 1 | System hostname = vagrantup.com 2 | Password for root account = vagrant 3 | Do you expect to run the X Window System = no 4 | Setup a user = vagrant 5 | Password for user vagrant = vagrant 6 | Location of sets = http 7 | Set name(s) = -game* 8 | Set name(s) = -x* 9 | What timezone are you in = Etc/UTC 10 | -------------------------------------------------------------------------------- /http/openbsd-6.1/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | set -x 5 | 6 | # Always use the first line of ftplist.cgi for the default answer of "HTTP Server?". 7 | # This is a workaround for the change introduced in the following commit: 8 | # https://github.com/openbsd/src/commit/bf983825822b119e4047eb99486f18c58351f347 9 | sed -i'' 's/\[\[ -z $_l \]\] && //' /install.sub 10 | 11 | /install -a -f /install.conf && chroot /mnt 12 | -------------------------------------------------------------------------------- /http/openbsd-6.2/install-chroot.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | set -x 5 | 6 | pkg_add sudo-- 7 | cat < /etc/sudoers 8 | 9 | #includedir /etc/sudoers.d 10 | EOF 11 | mkdir /etc/sudoers.d 12 | cat < /etc/sudoers.d/vagrant 13 | Defaults:vagrant !requiretty 14 | vagrant ALL=(ALL) NOPASSWD: ALL 15 | EOF 16 | chmod 440 /etc/sudoers.d/vagrant 17 | -------------------------------------------------------------------------------- /http/openbsd-6.2/install.conf: -------------------------------------------------------------------------------- 1 | System hostname = vagrantup.com 2 | Password for root account = vagrant 3 | Do you expect to run the X Window System = no 4 | Setup a user = vagrant 5 | Password for user vagrant = vagrant 6 | Location of sets = http 7 | Set name(s) = -game* 8 | Set name(s) = -x* 9 | What timezone are you in = Etc/UTC 10 | -------------------------------------------------------------------------------- /http/openbsd-6.2/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | set -x 5 | 6 | # Always use the first line of ftplist.cgi for the default answer of "HTTP Server?". 7 | # This is a workaround for the change introduced in the following commit: 8 | # https://github.com/openbsd/src/commit/bf983825822b119e4047eb99486f18c58351f347 9 | sed -i'' 's/\[\[ -z $_l \]\] && //' /install.sub 10 | 11 | /install -a -f /install.conf && chroot /mnt 12 | -------------------------------------------------------------------------------- /http/openbsd-6.3/install-chroot.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | set -x 5 | 6 | pkg_add sudo-- 7 | cat < /etc/sudoers 8 | 9 | #includedir /etc/sudoers.d 10 | EOF 11 | mkdir /etc/sudoers.d 12 | cat < /etc/sudoers.d/vagrant 13 | Defaults:vagrant !requiretty 14 | vagrant ALL=(ALL) NOPASSWD: ALL 15 | EOF 16 | chmod 440 /etc/sudoers.d/vagrant 17 | -------------------------------------------------------------------------------- /http/openbsd-6.3/install.conf: -------------------------------------------------------------------------------- 1 | System hostname = vagrantup.com 2 | Password for root account = vagrant 3 | Do you expect to run the X Window System = no 4 | Setup a user = vagrant 5 | Password for user vagrant = vagrant 6 | Location of sets = http 7 | Set name(s) = -game* 8 | Set name(s) = -x* 9 | What timezone are you in = Etc/UTC 10 | -------------------------------------------------------------------------------- /http/openbsd-6.3/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | set -x 5 | 6 | # Always use the first line of ftplist.cgi for the default answer of "HTTP Server?". 7 | # This is a workaround for the change introduced in the following commit: 8 | # https://github.com/openbsd/src/commit/bf983825822b119e4047eb99486f18c58351f347 9 | sed -i'' 's/\[\[ -z $_l \]\] && //' /install.sub 10 | 11 | /install -a -f /install.conf && chroot /mnt 12 | -------------------------------------------------------------------------------- /http/ubuntu-14.04/preseed.cfg: -------------------------------------------------------------------------------- 1 | d-i preseed/include string ../ubuntu/preseed.cfg 2 | 3 | d-i preseed/late_command string \ 4 | echo 'Defaults:vagrant !requiretty' > /target/etc/sudoers.d/vagrant; \ 5 | echo 'vagrant ALL=(ALL) NOPASSWD: ALL' >> /target/etc/sudoers.d/vagrant; \ 6 | chmod 440 /target/etc/sudoers.d/vagrant 7 | -------------------------------------------------------------------------------- /http/ubuntu-16.04/preseed.cfg: -------------------------------------------------------------------------------- 1 | d-i preseed/include string ../ubuntu/preseed.cfg 2 | 3 | d-i preseed/late_command string \ 4 | echo 'Defaults:vagrant !requiretty' > /target/etc/sudoers.d/vagrant; \ 5 | echo 'vagrant ALL=(ALL) NOPASSWD: ALL' >> /target/etc/sudoers.d/vagrant; \ 6 | chmod 440 /target/etc/sudoers.d/vagrant; \ 7 | ln -sf /dev/null /target/etc/systemd/network/99-default.link; \ 8 | in-target update-initramfs -u 9 | -------------------------------------------------------------------------------- /http/ubuntu-17.10/preseed.cfg: -------------------------------------------------------------------------------- 1 | d-i preseed/include string ../ubuntu/preseed.cfg 2 | 3 | d-i preseed/late_command string \ 4 | echo 'Defaults:vagrant !requiretty' > /target/etc/sudoers.d/vagrant; \ 5 | echo 'vagrant ALL=(ALL) NOPASSWD: ALL' >> /target/etc/sudoers.d/vagrant; \ 6 | chmod 440 /target/etc/sudoers.d/vagrant; \ 7 | ln -sf /dev/null /target/etc/systemd/network/99-default.link; \ 8 | in-target update-initramfs -u 9 | -------------------------------------------------------------------------------- /http/ubuntu/preseed.cfg: -------------------------------------------------------------------------------- 1 | d-i debian-installer/locale string en_US 2 | d-i time/zone string UTC 3 | 4 | d-i keyboard-configuration/xkb-keymap select us 5 | 6 | d-i partman-auto/method string regular 7 | d-i partman-auto/expert_recipe string \ 8 | scheme :: \ 9 | 200 0 200 ext4 \ 10 | $primary{ } \ 11 | $bootable{ } \ 12 | method{ format } \ 13 | format{ } \ 14 | use_filesystem{ } \ 15 | filesystem{ ext4 } \ 16 | mountpoint{ /boot } . \ 17 | 200% 0 200% linux-swap \ 18 | $primary{ } \ 19 | method{ swap } \ 20 | format{ } . \ 21 | 1 0 -1 ext4 \ 22 | $primary{ } \ 23 | method{ format } \ 24 | format{ } \ 25 | use_filesystem{ } \ 26 | filesystem{ ext4 } \ 27 | mountpoint{ / } . 28 | d-i partman-partitioning/confirm_write_new_label boolean true 29 | d-i partman/choose_partition select finish 30 | d-i partman/confirm boolean true 31 | d-i partman/confirm_nooverwrite boolean true 32 | 33 | d-i base-installer/excludes string laptop-detect 34 | 35 | d-i passwd/root-password-again password vagrant 36 | d-i passwd/root-password password vagrant 37 | d-i passwd/user-fullname string vagrant 38 | d-i passwd/username string vagrant 39 | d-i passwd/user-password password vagrant 40 | d-i passwd/user-password-again password vagrant 41 | d-i user-setup/allow-password-weak boolean true 42 | 43 | d-i pkgsel/include string curl openssh-server sudo 44 | d-i pkgsel/language-packs multiselect 45 | 46 | d-i finish-install/reboot_in_progress note 47 | 48 | d-i preseed/early_command string \ 49 | mkdir -p /usr/lib/post-base-installer.d && \ 50 | echo "sed -i -e 's/^in-target.*tasksel.*/#\\0/' /var/lib/dpkg/info/pkgsel.postinst" > /usr/lib/post-base-installer.d/90skip-tasksel && \ 51 | chmod +x /usr/lib/post-base-installer.d/90skip-tasksel 52 | -------------------------------------------------------------------------------- /openbsd-6.1-amd64.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [{ 3 | "type": "qemu", 4 | "iso_url": "{{user `mirror`}}/6.1/amd64/cd61.iso", 5 | "iso_checksum": "{{user `iso_checksum`}}", 6 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 7 | "output_directory": "output-openbsd-6.1-amd64-{{build_type}}", 8 | "vm_name": "packer-openbsd-6.1-amd64", 9 | "disk_size": "{{user `disk_size`}}", 10 | "headless": "{{user `headless`}}", 11 | "http_directory": "http", 12 | "boot_wait": "20s", 13 | "boot_command": [ 14 | "S", 15 | "dhclient vio0", 16 | "ftp -o install.conf http://{{.HTTPIP}}:{{.HTTPPort}}/openbsd-6.1/install.conf", 17 | "ftp -o install.sh http://{{.HTTPIP}}:{{.HTTPPort}}/openbsd-6.1/install.sh", 18 | "ftp -o install-chroot.sh http://{{.HTTPIP}}:{{.HTTPPort}}/openbsd-6.1/install-chroot.sh", 19 | "sh install.sh < install-chroot.sh && reboot" 20 | ], 21 | "ssh_timeout": "{{user `ssh_timeout`}}", 22 | "ssh_username": "vagrant", 23 | "ssh_password": "vagrant", 24 | "shutdown_command": "sudo shutdown -h -p now", 25 | "qemuargs": [ 26 | ["-m", "{{user `memory`}}"], 27 | ["-smp", "{{user `cpus`}}"] 28 | ] 29 | }, { 30 | "type": "virtualbox-iso", 31 | "guest_os_type": "OpenBSD_64", 32 | "iso_url": "{{user `mirror`}}/6.1/amd64/cd61.iso", 33 | "iso_checksum": "{{user `iso_checksum`}}", 34 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 35 | "output_directory": "output-openbsd-6.1-amd64-{{build_type}}", 36 | "vm_name": "packer-openbsd-6.1-amd64", 37 | "disk_size": "{{user `disk_size`}}", 38 | "headless": "{{user `headless`}}", 39 | "http_directory": "http", 40 | "boot_wait": "20s", 41 | "boot_command": [ 42 | "S", 43 | "dhclient em0", 44 | "ftp -o install.conf http://{{.HTTPIP}}:{{.HTTPPort}}/openbsd-6.1/install.conf", 45 | "ftp -o install.sh http://{{.HTTPIP}}:{{.HTTPPort}}/openbsd-6.1/install.sh", 46 | "ftp -o install-chroot.sh http://{{.HTTPIP}}:{{.HTTPPort}}/openbsd-6.1/install-chroot.sh", 47 | "sh install.sh < install-chroot.sh && reboot" 48 | ], 49 | "ssh_timeout": "{{user `ssh_timeout`}}", 50 | "ssh_username": "vagrant", 51 | "ssh_password": "vagrant", 52 | "guest_additions_mode": "disable", 53 | "shutdown_command": "sudo shutdown -h -p now", 54 | "vboxmanage": [ 55 | ["modifyvm", "{{.Name}}", "--memory", "{{user `memory`}}"], 56 | ["modifyvm", "{{.Name}}", "--cpus", "{{user `cpus`}}"] 57 | ] 58 | }, { 59 | "type": "vmware-iso", 60 | "guest_os_type": "freebsd-64", 61 | "iso_url": "{{user `mirror`}}/6.1/amd64/cd61.iso", 62 | "iso_checksum": "{{user `iso_checksum`}}", 63 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 64 | "output_directory": "output-openbsd-6.1-amd64-{{build_type}}", 65 | "vm_name": "packer-openbsd-6.1-amd64", 66 | "disk_size": "{{user `disk_size`}}", 67 | "headless": "{{user `headless`}}", 68 | "http_directory": "http", 69 | "boot_wait": "20s", 70 | "boot_command": [ 71 | "S", 72 | "dhclient em0", 73 | "ftp -o install.conf http://{{.HTTPIP}}:{{.HTTPPort}}/openbsd-6.1/install.conf", 74 | "ftp -o install.sh http://{{.HTTPIP}}:{{.HTTPPort}}/openbsd-6.1/install.sh", 75 | "ftp -o install-chroot.sh http://{{.HTTPIP}}:{{.HTTPPort}}/openbsd-6.1/install-chroot.sh", 76 | "sh install.sh < install-chroot.sh && reboot" 77 | ], 78 | "ssh_timeout": "{{user `ssh_timeout`}}", 79 | "ssh_username": "vagrant", 80 | "ssh_password": "vagrant", 81 | "shutdown_command": "sudo shutdown -h -p now", 82 | "vmx_data": { 83 | "memsize": "{{user `memory`}}", 84 | "numvcpus": "{{user `cpus`}}" 85 | }, 86 | "vmx_remove_ethernet_interfaces": true 87 | }], 88 | "provisioners": [{ 89 | "type": "shell", 90 | "scripts": [ 91 | "scripts/openbsd/init.sh", 92 | "scripts/common/vagrant.sh", 93 | "scripts/common/sshd.sh", 94 | "scripts/openbsd/minimize.sh" 95 | ] 96 | }], 97 | "post-processors": [{ 98 | "type": "vagrant", 99 | "compression_level": "{{user `compression_level`}}", 100 | "output": "openbsd-6.1-amd64-{{.Provider}}.box", 101 | "vagrantfile_template": "vagrantfile_templates/openbsd.rb" 102 | }], 103 | "variables": { 104 | "compression_level": "6", 105 | "cpus": "1", 106 | "disk_size": "40000", 107 | "headless": "false", 108 | "iso_checksum": "37cee759db10ffd5c0d086771b62ed771187a24baa4946e601153e394ce31aa6", 109 | "iso_checksum_type": "sha256", 110 | "memory": "512", 111 | "mirror": "http://ftp.openbsd.org/pub/OpenBSD", 112 | "ssh_timeout": "60m" 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /openbsd-6.2-amd64.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [{ 3 | "type": "qemu", 4 | "iso_url": "{{user `mirror`}}/6.2/amd64/cd62.iso", 5 | "iso_checksum": "{{user `iso_checksum`}}", 6 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 7 | "output_directory": "output-openbsd-6.2-amd64-{{build_type}}", 8 | "vm_name": "packer-openbsd-6.2-amd64", 9 | "disk_size": "{{user `disk_size`}}", 10 | "headless": "{{user `headless`}}", 11 | "http_directory": "http", 12 | "boot_wait": "20s", 13 | "boot_command": [ 14 | "S", 15 | "dhclient vio0", 16 | "ftp -o install.conf http://{{.HTTPIP}}:{{.HTTPPort}}/openbsd-6.2/install.conf", 17 | "ftp -o install.sh http://{{.HTTPIP}}:{{.HTTPPort}}/openbsd-6.2/install.sh", 18 | "ftp -o install-chroot.sh http://{{.HTTPIP}}:{{.HTTPPort}}/openbsd-6.2/install-chroot.sh", 19 | "sh install.sh < install-chroot.sh && reboot" 20 | ], 21 | "ssh_timeout": "{{user `ssh_timeout`}}", 22 | "ssh_username": "vagrant", 23 | "ssh_password": "vagrant", 24 | "shutdown_command": "sudo shutdown -h -p now", 25 | "qemuargs": [ 26 | ["-m", "{{user `memory`}}"], 27 | ["-smp", "{{user `cpus`}}"] 28 | ] 29 | }, { 30 | "type": "virtualbox-iso", 31 | "guest_os_type": "OpenBSD_64", 32 | "iso_url": "{{user `mirror`}}/6.2/amd64/cd62.iso", 33 | "iso_checksum": "{{user `iso_checksum`}}", 34 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 35 | "output_directory": "output-openbsd-6.2-amd64-{{build_type}}", 36 | "vm_name": "packer-openbsd-6.2-amd64", 37 | "disk_size": "{{user `disk_size`}}", 38 | "headless": "{{user `headless`}}", 39 | "http_directory": "http", 40 | "boot_wait": "20s", 41 | "boot_command": [ 42 | "S", 43 | "dhclient em0", 44 | "ftp -o install.conf http://{{.HTTPIP}}:{{.HTTPPort}}/openbsd-6.2/install.conf", 45 | "ftp -o install.sh http://{{.HTTPIP}}:{{.HTTPPort}}/openbsd-6.2/install.sh", 46 | "ftp -o install-chroot.sh http://{{.HTTPIP}}:{{.HTTPPort}}/openbsd-6.2/install-chroot.sh", 47 | "sh install.sh < install-chroot.sh && reboot" 48 | ], 49 | "ssh_timeout": "{{user `ssh_timeout`}}", 50 | "ssh_username": "vagrant", 51 | "ssh_password": "vagrant", 52 | "guest_additions_mode": "disable", 53 | "shutdown_command": "sudo shutdown -h -p now", 54 | "vboxmanage": [ 55 | ["modifyvm", "{{.Name}}", "--memory", "{{user `memory`}}"], 56 | ["modifyvm", "{{.Name}}", "--cpus", "{{user `cpus`}}"] 57 | ] 58 | }, { 59 | "type": "vmware-iso", 60 | "guest_os_type": "freebsd-64", 61 | "iso_url": "{{user `mirror`}}/6.2/amd64/cd62.iso", 62 | "iso_checksum": "{{user `iso_checksum`}}", 63 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 64 | "output_directory": "output-openbsd-6.2-amd64-{{build_type}}", 65 | "vm_name": "packer-openbsd-6.2-amd64", 66 | "disk_size": "{{user `disk_size`}}", 67 | "headless": "{{user `headless`}}", 68 | "http_directory": "http", 69 | "boot_wait": "20s", 70 | "boot_command": [ 71 | "S", 72 | "dhclient em0", 73 | "ftp -o install.conf http://{{.HTTPIP}}:{{.HTTPPort}}/openbsd-6.2/install.conf", 74 | "ftp -o install.sh http://{{.HTTPIP}}:{{.HTTPPort}}/openbsd-6.2/install.sh", 75 | "ftp -o install-chroot.sh http://{{.HTTPIP}}:{{.HTTPPort}}/openbsd-6.2/install-chroot.sh", 76 | "sh install.sh < install-chroot.sh && reboot" 77 | ], 78 | "ssh_timeout": "{{user `ssh_timeout`}}", 79 | "ssh_username": "vagrant", 80 | "ssh_password": "vagrant", 81 | "shutdown_command": "sudo shutdown -h -p now", 82 | "vmx_data": { 83 | "memsize": "{{user `memory`}}", 84 | "numvcpus": "{{user `cpus`}}" 85 | }, 86 | "vmx_remove_ethernet_interfaces": true 87 | }], 88 | "provisioners": [{ 89 | "type": "shell", 90 | "scripts": [ 91 | "scripts/openbsd/init.sh", 92 | "scripts/common/vagrant.sh", 93 | "scripts/common/sshd.sh", 94 | "scripts/openbsd/minimize.sh" 95 | ] 96 | }], 97 | "post-processors": [{ 98 | "type": "vagrant", 99 | "compression_level": "{{user `compression_level`}}", 100 | "output": "openbsd-6.2-amd64-{{.Provider}}.box", 101 | "vagrantfile_template": "vagrantfile_templates/openbsd.rb" 102 | }], 103 | "variables": { 104 | "compression_level": "6", 105 | "cpus": "1", 106 | "disk_size": "40000", 107 | "headless": "false", 108 | "iso_checksum": "e66b406cf5775c934b04eb2c3af1f8f6f4704f67445b2dd22916a7b962a74667", 109 | "iso_checksum_type": "sha256", 110 | "memory": "512", 111 | "mirror": "http://ftp.openbsd.org/pub/OpenBSD", 112 | "ssh_timeout": "60m" 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /openbsd-6.3-amd64.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [{ 3 | "type": "qemu", 4 | "iso_url": "{{user `mirror`}}/6.3/amd64/cd63.iso", 5 | "iso_checksum": "{{user `iso_checksum`}}", 6 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 7 | "output_directory": "output-openbsd-6.3-amd64-{{build_type}}", 8 | "vm_name": "packer-openbsd-6.3-amd64", 9 | "disk_size": "{{user `disk_size`}}", 10 | "headless": "{{user `headless`}}", 11 | "http_directory": "http", 12 | "boot_wait": "20s", 13 | "boot_command": [ 14 | "S", 15 | "dhclient vio0", 16 | "ftp -o install.conf http://{{.HTTPIP}}:{{.HTTPPort}}/openbsd-6.3/install.conf", 17 | "ftp -o install.sh http://{{.HTTPIP}}:{{.HTTPPort}}/openbsd-6.3/install.sh", 18 | "ftp -o install-chroot.sh http://{{.HTTPIP}}:{{.HTTPPort}}/openbsd-6.3/install-chroot.sh", 19 | "sh install.sh < install-chroot.sh && reboot" 20 | ], 21 | "ssh_timeout": "{{user `ssh_timeout`}}", 22 | "ssh_username": "vagrant", 23 | "ssh_password": "vagrant", 24 | "shutdown_command": "sudo shutdown -h -p now", 25 | "qemuargs": [ 26 | ["-m", "{{user `memory`}}"], 27 | ["-smp", "{{user `cpus`}}"] 28 | ] 29 | }, { 30 | "type": "virtualbox-iso", 31 | "guest_os_type": "OpenBSD_64", 32 | "iso_url": "{{user `mirror`}}/6.3/amd64/cd63.iso", 33 | "iso_checksum": "{{user `iso_checksum`}}", 34 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 35 | "output_directory": "output-openbsd-6.3-amd64-{{build_type}}", 36 | "vm_name": "packer-openbsd-6.3-amd64", 37 | "disk_size": "{{user `disk_size`}}", 38 | "headless": "{{user `headless`}}", 39 | "http_directory": "http", 40 | "boot_wait": "20s", 41 | "boot_command": [ 42 | "S", 43 | "dhclient em0", 44 | "ftp -o install.conf http://{{.HTTPIP}}:{{.HTTPPort}}/openbsd-6.3/install.conf", 45 | "ftp -o install.sh http://{{.HTTPIP}}:{{.HTTPPort}}/openbsd-6.3/install.sh", 46 | "ftp -o install-chroot.sh http://{{.HTTPIP}}:{{.HTTPPort}}/openbsd-6.3/install-chroot.sh", 47 | "sh install.sh < install-chroot.sh && reboot" 48 | ], 49 | "ssh_timeout": "{{user `ssh_timeout`}}", 50 | "ssh_username": "vagrant", 51 | "ssh_password": "vagrant", 52 | "guest_additions_mode": "disable", 53 | "shutdown_command": "sudo shutdown -h -p now", 54 | "vboxmanage": [ 55 | ["modifyvm", "{{.Name}}", "--memory", "{{user `memory`}}"], 56 | ["modifyvm", "{{.Name}}", "--cpus", "{{user `cpus`}}"] 57 | ] 58 | }, { 59 | "type": "vmware-iso", 60 | "guest_os_type": "freebsd-64", 61 | "iso_url": "{{user `mirror`}}/6.3/amd64/cd63.iso", 62 | "iso_checksum": "{{user `iso_checksum`}}", 63 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 64 | "output_directory": "output-openbsd-6.3-amd64-{{build_type}}", 65 | "vm_name": "packer-openbsd-6.3-amd64", 66 | "disk_size": "{{user `disk_size`}}", 67 | "headless": "{{user `headless`}}", 68 | "http_directory": "http", 69 | "boot_wait": "20s", 70 | "boot_command": [ 71 | "S", 72 | "dhclient em0", 73 | "ftp -o install.conf http://{{.HTTPIP}}:{{.HTTPPort}}/openbsd-6.3/install.conf", 74 | "ftp -o install.sh http://{{.HTTPIP}}:{{.HTTPPort}}/openbsd-6.3/install.sh", 75 | "ftp -o install-chroot.sh http://{{.HTTPIP}}:{{.HTTPPort}}/openbsd-6.3/install-chroot.sh", 76 | "sh install.sh < install-chroot.sh && reboot" 77 | ], 78 | "ssh_timeout": "{{user `ssh_timeout`}}", 79 | "ssh_username": "vagrant", 80 | "ssh_password": "vagrant", 81 | "shutdown_command": "sudo shutdown -h -p now", 82 | "vmx_data": { 83 | "memsize": "{{user `memory`}}", 84 | "numvcpus": "{{user `cpus`}}" 85 | }, 86 | "vmx_remove_ethernet_interfaces": true 87 | }], 88 | "provisioners": [{ 89 | "type": "shell", 90 | "scripts": [ 91 | "scripts/openbsd/init.sh", 92 | "scripts/common/vagrant.sh", 93 | "scripts/common/sshd.sh", 94 | "scripts/openbsd/minimize.sh" 95 | ] 96 | }], 97 | "post-processors": [{ 98 | "type": "vagrant", 99 | "compression_level": "{{user `compression_level`}}", 100 | "output": "openbsd-6.3-amd64-{{.Provider}}.box", 101 | "vagrantfile_template": "vagrantfile_templates/openbsd.rb" 102 | }], 103 | "variables": { 104 | "compression_level": "6", 105 | "cpus": "1", 106 | "disk_size": "40000", 107 | "headless": "false", 108 | "iso_checksum": "7b3feffcc9ade0dcaba3c5996c1eb797928cd76cecfa4c54bf8297b191bd461f", 109 | "iso_checksum_type": "sha256", 110 | "memory": "512", 111 | "mirror": "http://ftp.openbsd.org/pub/OpenBSD", 112 | "ssh_timeout": "60m" 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /scripts/archlinux/cleanup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | set -x 5 | 6 | yes | sudo pacman -Scc 7 | -------------------------------------------------------------------------------- /scripts/archlinux/virtualbox.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | set -x 5 | 6 | if [ "$PACKER_BUILDER_TYPE" != "virtualbox-iso" ]; then 7 | exit 0 8 | fi 9 | 10 | sudo pacman -S --noconfirm linux-headers 11 | sudo pacman -S --noconfirm virtualbox-guest-utils-nox 12 | sudo systemctl enable vboxservice 13 | -------------------------------------------------------------------------------- /scripts/archlinux/vmware.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | set -x 5 | 6 | if [ "$PACKER_BUILDER_TYPE" != "vmware-iso" ]; then 7 | exit 0 8 | fi 9 | 10 | sudo pacman -S --noconfirm open-vm-tools 11 | sudo systemctl enable vmtoolsd 12 | sudo mkdir -p /mnt/hgfs 13 | -------------------------------------------------------------------------------- /scripts/centos-6.9/cleanup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | set -x 5 | 6 | if rpm -q --whatprovides kernel | grep -Fqv "$(uname -r)"; then 7 | rpm -q --whatprovides kernel | grep -Fv "$(uname -r)" | xargs sudo yum -y remove 8 | fi 9 | 10 | sudo yum --enablerepo=epel clean all 11 | sudo yum history new 12 | sudo truncate -c -s 0 /var/log/yum.log 13 | -------------------------------------------------------------------------------- /scripts/centos-6.9/init.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | set -x 5 | 6 | sudo sed -i -e 's,^ACTIVE_CONSOLES=.*$,ACTIVE_CONSOLES=/dev/tty1,' /etc/sysconfig/init 7 | -------------------------------------------------------------------------------- /scripts/centos-6.9/repo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | set -x 5 | 6 | sudo yum -y install https://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm 7 | sudo sed -i -e 's/^enabled=1/enabled=0/' /etc/yum.repos.d/epel.repo 8 | -------------------------------------------------------------------------------- /scripts/centos-7.4/cleanup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | set -x 5 | 6 | if rpm -q --whatprovides kernel | grep -Fqv "$(uname -r)"; then 7 | rpm -q --whatprovides kernel | grep -Fv "$(uname -r)" | xargs sudo yum -y autoremove 8 | fi 9 | 10 | sudo yum --enablerepo=epel clean all 11 | sudo yum history new 12 | sudo truncate -c -s 0 /var/log/yum.log 13 | -------------------------------------------------------------------------------- /scripts/centos-7.4/repo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | set -x 5 | 6 | sudo yum -y install https://download.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm 7 | sudo sed -i -e 's/^enabled=1/enabled=0/' /etc/yum.repos.d/epel.repo 8 | -------------------------------------------------------------------------------- /scripts/centos/locale.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | set -x 5 | 6 | localedef --list-archive | grep -a -v en_US.utf8 | xargs sudo localedef --delete-from-archive 7 | sudo cp /usr/lib/locale/locale-archive{,.tmpl} 8 | sudo build-locale-archive 9 | -------------------------------------------------------------------------------- /scripts/centos/virtualbox.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | set -x 5 | 6 | if [ "$PACKER_BUILDER_TYPE" != "virtualbox-iso" ]; then 7 | exit 0 8 | fi 9 | 10 | sudo yum -y install bzip2 11 | sudo yum -y --enablerepo=epel install dkms 12 | sudo yum -y install kernel-devel 13 | sudo yum -y install make 14 | sudo yum -y install perl 15 | 16 | # Uncomment this if you want to install Guest Additions with support for X 17 | #sudo yum -y install xorg-x11-server-Xorg 18 | 19 | # In CentOS 6 or earlier, dkms package provides SysV init script called 20 | # dkms_autoinstaller that is enabled by default 21 | if systemctl list-unit-files | grep -q dkms.service; then 22 | sudo systemctl start dkms 23 | sudo systemctl enable dkms 24 | fi 25 | 26 | sudo mount -o loop,ro ~/VBoxGuestAdditions.iso /mnt/ 27 | sudo /mnt/VBoxLinuxAdditions.run || : 28 | sudo umount /mnt/ 29 | rm -f ~/VBoxGuestAdditions.iso 30 | -------------------------------------------------------------------------------- /scripts/centos/vmware.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | set -x 5 | 6 | if [ "$PACKER_BUILDER_TYPE" != "vmware-iso" ]; then 7 | exit 0 8 | fi 9 | 10 | sudo yum -y install perl 11 | sudo yum -y install net-tools 12 | sudo yum -y install make 13 | sudo yum -y install gcc 14 | sudo yum -y install kernel-devel 15 | 16 | sudo mkdir /mnt/vmware 17 | sudo mount -o loop,ro ~/linux.iso /mnt/vmware 18 | 19 | mkdir /tmp/vmware 20 | tar zxf /mnt/vmware/VMwareTools-*.tar.gz -C /tmp/vmware 21 | 22 | sudo /tmp/vmware/vmware-tools-distrib/vmware-install.pl --default --force-install 23 | rm -r /tmp/vmware 24 | 25 | sudo umount /mnt/vmware 26 | sudo rm -r /mnt/vmware 27 | rm -f ~/linux.iso 28 | 29 | sudo tee -a /etc/vmware-tools/locations < /dev/null 14 | -------------------------------------------------------------------------------- /scripts/freebsd/minimize.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | set -x 5 | 6 | sudo dd if=/dev/zero of=/EMPTY bs=1M || : 7 | sudo rm /EMPTY 8 | 9 | swap_device=`swapctl -l | awk '!/^Device/ { print $1 }'` 10 | sudo swapctl -d "$swap_device" 11 | sudo dd if=/dev/zero of="$swap_device" bs=1M || : 12 | -------------------------------------------------------------------------------- /scripts/freebsd/virtualbox.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | set -x 5 | 6 | if [ "$PACKER_BUILDER_TYPE" != "virtualbox-iso" ]; then 7 | exit 0 8 | fi 9 | 10 | sudo pkg install -y virtualbox-ose-additions-nox11 11 | 12 | sudo tee -a /etc/rc.conf < /dev/null 14 | -------------------------------------------------------------------------------- /scripts/openbsd/minimize.sh: -------------------------------------------------------------------------------- 1 | #!/bin/ksh 2 | 3 | set -e 4 | set -x 5 | 6 | for dir in $(mount | awk '{ print $3 }'); do 7 | sudo dd if=/dev/zero of="$dir/EMPTY" bs=1M || : 8 | sudo rm "$dir/EMPTY" 9 | done 10 | 11 | swap_device=$(swapctl -l | awk '!/^Device/ { print $1 }') 12 | sudo swapctl -d "$swap_device" 13 | sudo dd if=/dev/zero of="$swap_device" bs=1M || : 14 | -------------------------------------------------------------------------------- /scripts/ubuntu-14.04/vmware.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | set -x 5 | 6 | if [ "$PACKER_BUILDER_TYPE" != "vmware-iso" ]; then 7 | exit 0 8 | fi 9 | 10 | sudo apt-get -y install fuse 11 | 12 | sudo mkdir /mnt/vmware 13 | sudo mount -o loop,ro ~/linux.iso /mnt/vmware 14 | 15 | mkdir /tmp/vmware 16 | tar zxf /mnt/vmware/VMwareTools-*.tar.gz -C /tmp/vmware 17 | sudo /tmp/vmware/vmware-tools-distrib/vmware-install.pl --default --force-install 18 | rm -r /tmp/vmware 19 | 20 | sudo umount /mnt/vmware 21 | sudo rm -r /mnt/vmware 22 | rm -f ~/linux.iso 23 | 24 | sudo tee -a /etc/vmware-tools/locations <", 15 | "", 16 | "", 17 | "/install/vmlinuz ", 18 | "initrd=/install/initrd.gz ", 19 | "biosdevname=0 ", 20 | "auto-install/enable=true ", 21 | "debconf/priority=critical ", 22 | "preseed/url=http://{{.HTTPIP}}:{{.HTTPPort}}/ubuntu-14.04/preseed.cfg ", 23 | "" 24 | ], 25 | "ssh_timeout": "{{user `ssh_timeout`}}", 26 | "ssh_username": "vagrant", 27 | "ssh_password": "vagrant", 28 | "shutdown_command": "sudo poweroff", 29 | "qemuargs": [ 30 | ["-m", "{{user `memory`}}"], 31 | ["-smp", "{{user `cpus`}}"] 32 | ] 33 | }, { 34 | "type": "virtualbox-iso", 35 | "guest_os_type": "Ubuntu_64", 36 | "iso_url": "{{user `mirror`}}/14.04/ubuntu-14.04.5-server-amd64.iso", 37 | "iso_checksum": "{{user `iso_checksum`}}", 38 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 39 | "output_directory": "output-ubuntu-14.04-amd64-{{build_type}}", 40 | "vm_name": "packer-ubuntu-14.04-amd64", 41 | "disk_size": "{{user `disk_size`}}", 42 | "headless": "{{user `headless`}}", 43 | "http_directory": "http", 44 | "boot_wait": "5s", 45 | "boot_command": [ 46 | "", 47 | "", 48 | "", 49 | "/install/vmlinuz ", 50 | "initrd=/install/initrd.gz ", 51 | "biosdevname=0 ", 52 | "auto-install/enable=true ", 53 | "debconf/priority=critical ", 54 | "preseed/url=http://{{.HTTPIP}}:{{.HTTPPort}}/ubuntu-14.04/preseed.cfg ", 55 | "" 56 | ], 57 | "ssh_timeout": "{{user `ssh_timeout`}}", 58 | "ssh_username": "vagrant", 59 | "ssh_password": "vagrant", 60 | "shutdown_command": "sudo poweroff", 61 | "vboxmanage": [ 62 | ["modifyvm", "{{.Name}}", "--memory", "{{user `memory`}}"], 63 | ["modifyvm", "{{.Name}}", "--cpus", "{{user `cpus`}}"] 64 | ] 65 | }, { 66 | "type": "vmware-iso", 67 | "guest_os_type": "ubuntu-64", 68 | "iso_url": "{{user `mirror`}}/14.04/ubuntu-14.04.5-server-amd64.iso", 69 | "iso_checksum": "{{user `iso_checksum`}}", 70 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 71 | "output_directory": "output-ubuntu-14.04-amd64-{{build_type}}", 72 | "vm_name": "packer-ubuntu-14.04-amd64", 73 | "disk_size": "{{user `disk_size`}}", 74 | "headless": "{{user `headless`}}", 75 | "http_directory": "http", 76 | "boot_wait": "5s", 77 | "boot_command": [ 78 | "", 79 | "", 80 | "", 81 | "/install/vmlinuz ", 82 | "initrd=/install/initrd.gz ", 83 | "biosdevname=0 ", 84 | "auto-install/enable=true ", 85 | "debconf/priority=critical ", 86 | "preseed/url=http://{{.HTTPIP}}:{{.HTTPPort}}/ubuntu-14.04/preseed.cfg ", 87 | "" 88 | ], 89 | "ssh_timeout": "{{user `ssh_timeout`}}", 90 | "ssh_username": "vagrant", 91 | "ssh_password": "vagrant", 92 | "tools_upload_flavor": "linux", 93 | "shutdown_command": "sudo poweroff", 94 | "vmx_data": { 95 | "memsize": "{{user `memory`}}", 96 | "numvcpus": "{{user `cpus`}}" 97 | }, 98 | "vmx_remove_ethernet_interfaces": true 99 | }], 100 | "provisioners": [{ 101 | "type": "shell", 102 | "scripts": [ 103 | "scripts/ubuntu/apt.sh", 104 | "scripts/ubuntu/virtualbox.sh", 105 | "scripts/ubuntu-14.04/vmware.sh", 106 | "scripts/ubuntu/init.sh", 107 | "scripts/common/vagrant.sh", 108 | "scripts/common/sshd.sh", 109 | "scripts/ubuntu/cleanup.sh", 110 | "scripts/common/minimize.sh" 111 | ] 112 | }], 113 | "post-processors": [{ 114 | "type": "vagrant", 115 | "compression_level": "{{user `compression_level`}}", 116 | "output": "ubuntu-14.04-amd64-{{.Provider}}.box" 117 | }], 118 | "variables": { 119 | "compression_level": "6", 120 | "cpus": "1", 121 | "disk_size": "40000", 122 | "headless": "false", 123 | "iso_checksum": "dde07d37647a1d2d9247e33f14e91acb10445a97578384896b4e1d985f754cc1", 124 | "iso_checksum_type": "sha256", 125 | "memory": "512", 126 | "mirror": "http://releases.ubuntu.com", 127 | "ssh_timeout": "60m" 128 | } 129 | } 130 | -------------------------------------------------------------------------------- /ubuntu-16.04-amd64.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [{ 3 | "type": "qemu", 4 | "iso_url": "{{user `mirror`}}/16.04/ubuntu-16.04.4-server-amd64.iso", 5 | "iso_checksum": "{{user `iso_checksum`}}", 6 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 7 | "output_directory": "output-ubuntu-16.04-amd64-{{build_type}}", 8 | "vm_name": "packer-ubuntu-16.04-amd64", 9 | "disk_size": "{{user `disk_size`}}", 10 | "headless": "{{user `headless`}}", 11 | "http_directory": "http", 12 | "boot_wait": "5s", 13 | "boot_command": [ 14 | "", 15 | "", 16 | "", 17 | "", 18 | "", 19 | "", 20 | "", 21 | "", 22 | "", 23 | "", 24 | "", 25 | "/install/vmlinuz ", 26 | "initrd=/install/initrd.gz ", 27 | "net.ifnames=0 ", 28 | "auto-install/enable=true ", 29 | "debconf/priority=critical ", 30 | "preseed/url=http://{{.HTTPIP}}:{{.HTTPPort}}/ubuntu-16.04/preseed.cfg ", 31 | "" 32 | ], 33 | "ssh_timeout": "{{user `ssh_timeout`}}", 34 | "ssh_username": "vagrant", 35 | "ssh_password": "vagrant", 36 | "shutdown_command": "sudo systemctl poweroff", 37 | "qemuargs": [ 38 | ["-m", "{{user `memory`}}"], 39 | ["-smp", "{{user `cpus`}}"] 40 | ] 41 | }, { 42 | "type": "virtualbox-iso", 43 | "guest_os_type": "Ubuntu_64", 44 | "iso_url": "{{user `mirror`}}/16.04/ubuntu-16.04.4-server-amd64.iso", 45 | "iso_checksum": "{{user `iso_checksum`}}", 46 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 47 | "output_directory": "output-ubuntu-16.04-amd64-{{build_type}}", 48 | "vm_name": "packer-ubuntu-16.04-amd64", 49 | "disk_size": "{{user `disk_size`}}", 50 | "headless": "{{user `headless`}}", 51 | "http_directory": "http", 52 | "boot_wait": "5s", 53 | "boot_command": [ 54 | "", 55 | "", 56 | "", 57 | "", 58 | "", 59 | "", 60 | "", 61 | "", 62 | "", 63 | "", 64 | "", 65 | "/install/vmlinuz ", 66 | "initrd=/install/initrd.gz ", 67 | "net.ifnames=0 ", 68 | "auto-install/enable=true ", 69 | "debconf/priority=critical ", 70 | "preseed/url=http://{{.HTTPIP}}:{{.HTTPPort}}/ubuntu-16.04/preseed.cfg ", 71 | "" 72 | ], 73 | "ssh_timeout": "{{user `ssh_timeout`}}", 74 | "ssh_username": "vagrant", 75 | "ssh_password": "vagrant", 76 | "shutdown_command": "sudo systemctl poweroff", 77 | "vboxmanage": [ 78 | ["modifyvm", "{{.Name}}", "--memory", "{{user `memory`}}"], 79 | ["modifyvm", "{{.Name}}", "--cpus", "{{user `cpus`}}"] 80 | ] 81 | }, { 82 | "type": "vmware-iso", 83 | "guest_os_type": "ubuntu-64", 84 | "iso_url": "{{user `mirror`}}/16.04/ubuntu-16.04.4-server-amd64.iso", 85 | "iso_checksum": "{{user `iso_checksum`}}", 86 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 87 | "output_directory": "output-ubuntu-16.04-amd64-{{build_type}}", 88 | "vm_name": "packer-ubuntu-16.04-amd64", 89 | "disk_size": "{{user `disk_size`}}", 90 | "headless": "{{user `headless`}}", 91 | "http_directory": "http", 92 | "boot_wait": "5s", 93 | "boot_command": [ 94 | "", 95 | "", 96 | "", 97 | "", 98 | "", 99 | "", 100 | "", 101 | "", 102 | "", 103 | "", 104 | "", 105 | "/install/vmlinuz ", 106 | "initrd=/install/initrd.gz ", 107 | "net.ifnames=0 ", 108 | "auto-install/enable=true ", 109 | "debconf/priority=critical ", 110 | "preseed/url=http://{{.HTTPIP}}:{{.HTTPPort}}/ubuntu-16.04/preseed.cfg ", 111 | "" 112 | ], 113 | "ssh_timeout": "{{user `ssh_timeout`}}", 114 | "ssh_username": "vagrant", 115 | "ssh_password": "vagrant", 116 | "shutdown_command": "sudo systemctl poweroff", 117 | "vmx_data": { 118 | "memsize": "{{user `memory`}}", 119 | "numvcpus": "{{user `cpus`}}" 120 | }, 121 | "vmx_remove_ethernet_interfaces": true 122 | }], 123 | "provisioners": [{ 124 | "type": "shell", 125 | "scripts": [ 126 | "scripts/ubuntu/apt.sh", 127 | "scripts/ubuntu/virtualbox.sh", 128 | "scripts/ubuntu/vmware.sh", 129 | "scripts/common/vagrant.sh", 130 | "scripts/common/sshd.sh", 131 | "scripts/ubuntu/cleanup.sh", 132 | "scripts/common/minimize.sh" 133 | ] 134 | }], 135 | "post-processors": [{ 136 | "type": "vagrant", 137 | "compression_level": "{{user `compression_level`}}", 138 | "output": "ubuntu-16.04-amd64-{{.Provider}}.box" 139 | }], 140 | "variables": { 141 | "compression_level": "6", 142 | "cpus": "1", 143 | "disk_size": "40000", 144 | "headless": "false", 145 | "iso_checksum": "0a03608988cfd2e50567990dc8be96fb3c501e198e2e6efcb846d89efc7b89f2", 146 | "iso_checksum_type": "sha256", 147 | "memory": "512", 148 | "mirror": "http://releases.ubuntu.com", 149 | "ssh_timeout": "60m" 150 | } 151 | } 152 | -------------------------------------------------------------------------------- /ubuntu-17.10-amd64.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [{ 3 | "type": "qemu", 4 | "iso_url": "{{user `mirror`}}/17.10/ubuntu-17.10.1-server-amd64.iso", 5 | "iso_checksum": "{{user `iso_checksum`}}", 6 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 7 | "output_directory": "output-ubuntu-17.10-amd64-{{build_type}}", 8 | "vm_name": "packer-ubuntu-17.10-amd64", 9 | "disk_size": "{{user `disk_size`}}", 10 | "headless": "{{user `headless`}}", 11 | "http_directory": "http", 12 | "boot_wait": "5s", 13 | "boot_command": [ 14 | "", 15 | "", 16 | "", 17 | "/install/vmlinuz ", 18 | "initrd=/install/initrd.gz ", 19 | "net.ifnames=0 ", 20 | "auto-install/enable=true ", 21 | "debconf/priority=critical ", 22 | "preseed/url=http://{{.HTTPIP}}:{{.HTTPPort}}/ubuntu-17.10/preseed.cfg ", 23 | "" 24 | ], 25 | "ssh_timeout": "{{user `ssh_timeout`}}", 26 | "ssh_username": "vagrant", 27 | "ssh_password": "vagrant", 28 | "shutdown_command": "sudo systemctl poweroff", 29 | "qemuargs": [ 30 | ["-m", "{{user `memory`}}"], 31 | ["-smp", "{{user `cpus`}}"] 32 | ] 33 | }, { 34 | "type": "virtualbox-iso", 35 | "guest_os_type": "Ubuntu_64", 36 | "iso_url": "{{user `mirror`}}/17.10/ubuntu-17.10.1-server-amd64.iso", 37 | "iso_checksum": "{{user `iso_checksum`}}", 38 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 39 | "output_directory": "output-ubuntu-17.10-amd64-{{build_type}}", 40 | "vm_name": "packer-ubuntu-17.10-amd64", 41 | "disk_size": "{{user `disk_size`}}", 42 | "headless": "{{user `headless`}}", 43 | "http_directory": "http", 44 | "boot_wait": "5s", 45 | "boot_command": [ 46 | "", 47 | "", 48 | "", 49 | "/install/vmlinuz ", 50 | "initrd=/install/initrd.gz ", 51 | "net.ifnames=0 ", 52 | "auto-install/enable=true ", 53 | "debconf/priority=critical ", 54 | "preseed/url=http://{{.HTTPIP}}:{{.HTTPPort}}/ubuntu-17.10/preseed.cfg ", 55 | "" 56 | ], 57 | "ssh_timeout": "{{user `ssh_timeout`}}", 58 | "ssh_username": "vagrant", 59 | "ssh_password": "vagrant", 60 | "shutdown_command": "sudo systemctl poweroff", 61 | "vboxmanage": [ 62 | ["modifyvm", "{{.Name}}", "--memory", "{{user `memory`}}"], 63 | ["modifyvm", "{{.Name}}", "--cpus", "{{user `cpus`}}"] 64 | ] 65 | }, { 66 | "type": "vmware-iso", 67 | "guest_os_type": "ubuntu-64", 68 | "iso_url": "{{user `mirror`}}/17.10/ubuntu-17.10.1-server-amd64.iso", 69 | "iso_checksum": "{{user `iso_checksum`}}", 70 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 71 | "output_directory": "output-ubuntu-17.10-amd64-{{build_type}}", 72 | "vm_name": "packer-ubuntu-17.10-amd64", 73 | "disk_size": "{{user `disk_size`}}", 74 | "headless": "{{user `headless`}}", 75 | "http_directory": "http", 76 | "boot_wait": "5s", 77 | "boot_command": [ 78 | "", 79 | "", 80 | "", 81 | "/install/vmlinuz ", 82 | "initrd=/install/initrd.gz ", 83 | "net.ifnames=0 ", 84 | "auto-install/enable=true ", 85 | "debconf/priority=critical ", 86 | "preseed/url=http://{{.HTTPIP}}:{{.HTTPPort}}/ubuntu-17.10/preseed.cfg ", 87 | "" 88 | ], 89 | "ssh_timeout": "{{user `ssh_timeout`}}", 90 | "ssh_username": "vagrant", 91 | "ssh_password": "vagrant", 92 | "shutdown_command": "sudo systemctl poweroff", 93 | "vmx_data": { 94 | "memsize": "{{user `memory`}}", 95 | "numvcpus": "{{user `cpus`}}" 96 | }, 97 | "vmx_remove_ethernet_interfaces": true 98 | }], 99 | "provisioners": [{ 100 | "type": "shell", 101 | "scripts": [ 102 | "scripts/ubuntu/apt.sh", 103 | "scripts/ubuntu/virtualbox.sh", 104 | "scripts/ubuntu/vmware.sh", 105 | "scripts/common/vagrant.sh", 106 | "scripts/common/sshd.sh", 107 | "scripts/ubuntu/cleanup.sh", 108 | "scripts/common/minimize.sh" 109 | ] 110 | }], 111 | "post-processors": [{ 112 | "type": "vagrant", 113 | "compression_level": "{{user `compression_level`}}", 114 | "output": "ubuntu-17.10-amd64-{{.Provider}}.box" 115 | }], 116 | "variables": { 117 | "compression_level": "6", 118 | "cpus": "1", 119 | "disk_size": "40000", 120 | "headless": "false", 121 | "iso_checksum": "8ff73f1b622276758475c3bd5190b382774626de5a82c50930519381f6c3a3f8", 122 | "iso_checksum_type": "sha256", 123 | "memory": "512", 124 | "mirror": "http://releases.ubuntu.com", 125 | "ssh_timeout": "60m" 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /vagrantfile_templates/freebsd.rb: -------------------------------------------------------------------------------- 1 | Vagrant.configure('2') do |config| 2 | config.ssh.shell = 'sh' 3 | config.vm.synced_folder '', '/vagrant', disabled: true 4 | config.vm.provider :virtualbox do |v| 5 | v.functional_vboxsf = false 6 | end 7 | config.vm.provider :vmware_fusion do |v| 8 | v.functional_hgfs = false 9 | end 10 | config.vm.provider :vmware_workstation do |v| 11 | v.functional_hgfs = false 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /vagrantfile_templates/openbsd.rb: -------------------------------------------------------------------------------- 1 | Vagrant.configure('2') do |config| 2 | config.ssh.shell = 'sh' 3 | config.vm.synced_folder '', '/vagrant', disabled: true 4 | config.vm.provider :virtualbox do |v| 5 | v.check_guest_additions = false 6 | v.functional_vboxsf = false 7 | end 8 | config.vm.provider :vmware_fusion do |v| 9 | v.functional_hgfs = false 10 | end 11 | config.vm.provider :vmware_workstation do |v| 12 | v.functional_hgfs = false 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /vars/development.json: -------------------------------------------------------------------------------- 1 | { 2 | "compression_level": "0", 3 | "disk_size": "4000", 4 | "ssh_timeout": "24h" 5 | } 6 | -------------------------------------------------------------------------------- /vars/release.json: -------------------------------------------------------------------------------- 1 | { 2 | "compression_level": "9" 3 | } 4 | -------------------------------------------------------------------------------- /vyos-1.1.7-amd64.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [{ 3 | "type": "qemu", 4 | "iso_url": "{{user `mirror`}}/iso/release/1.1.7/vyos-1.1.7-amd64.iso", 5 | "iso_checksum": "{{user `iso_checksum`}}", 6 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 7 | "output_directory": "output-vyos-1.1.7-amd64-{{build_type}}", 8 | "vm_name": "packer-vyos-1.1.7-amd64", 9 | "disk_size": "{{user `disk_size`}}", 10 | "headless": "{{user `headless`}}", 11 | "boot_wait": "5s", 12 | "boot_command": [ 13 | "", 14 | "vyos", 15 | "vyos", 16 | "install system", 17 | "", 18 | "", 19 | "", 20 | "Yes", 21 | "", 22 | "", 23 | "vagrant", 24 | "vagrant", 25 | "", 26 | "reboot", 27 | "Yes", 28 | "vyos", 29 | "vagrant", 30 | "sudo useradd -m -U vagrant", 31 | "configure", 32 | "set interfaces ethernet eth0 address dhcp", 33 | "set system login user vagrant authentication plaintext-password vagrant", 34 | "set system login user vagrant level admin", 35 | "set service ssh", 36 | "commit", 37 | "save", 38 | "exit", 39 | "exit", 40 | "vagrant", 41 | "vagrant", 42 | "configure", 43 | "delete system login user vyos", 44 | "commit", 45 | "save", 46 | "exit" 47 | ], 48 | "ssh_timeout": "{{user `ssh_timeout`}}", 49 | "ssh_username": "vagrant", 50 | "ssh_password": "vagrant", 51 | "shutdown_command": "sudo poweroff", 52 | "qemuargs": [ 53 | ["-m", "{{user `memory`}}"], 54 | ["-smp", "{{user `cpus`}}"] 55 | ] 56 | }, { 57 | "type": "virtualbox-iso", 58 | "guest_os_type": "Debian_64", 59 | "iso_url": "{{user `mirror`}}/iso/release/1.1.7/vyos-1.1.7-amd64.iso", 60 | "iso_checksum": "{{user `iso_checksum`}}", 61 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 62 | "output_directory": "output-vyos-1.1.7-amd64-{{build_type}}", 63 | "vm_name": "packer-vyos-1.1.7-amd64", 64 | "disk_size": "{{user `disk_size`}}", 65 | "headless": "{{user `headless`}}", 66 | "boot_wait": "5s", 67 | "boot_command": [ 68 | "", 69 | "vyos", 70 | "vyos", 71 | "install system", 72 | "", 73 | "", 74 | "", 75 | "Yes", 76 | "", 77 | "", 78 | "vagrant", 79 | "vagrant", 80 | "", 81 | "reboot", 82 | "Yes", 83 | "vyos", 84 | "vagrant", 85 | "sudo useradd -m -U vagrant", 86 | "configure", 87 | "set interfaces ethernet eth0 address dhcp", 88 | "set system login user vagrant authentication plaintext-password vagrant", 89 | "set system login user vagrant level admin", 90 | "set service ssh", 91 | "commit", 92 | "save", 93 | "exit", 94 | "exit", 95 | "vagrant", 96 | "vagrant", 97 | "configure", 98 | "delete system login user vyos", 99 | "commit", 100 | "save", 101 | "exit" 102 | ], 103 | "ssh_timeout": "{{user `ssh_timeout`}}", 104 | "ssh_username": "vagrant", 105 | "ssh_password": "vagrant", 106 | "shutdown_command": "sudo poweroff", 107 | "vboxmanage": [ 108 | ["modifyvm", "{{.Name}}", "--memory", "{{user `memory`}}"], 109 | ["modifyvm", "{{.Name}}", "--cpus", "{{user `cpus`}}"] 110 | ] 111 | }, { 112 | "type": "vmware-iso", 113 | "guest_os_type": "debian6-64", 114 | "iso_url": "{{user `mirror`}}/iso/release/1.1.7/vyos-1.1.7-amd64.iso", 115 | "iso_checksum": "{{user `iso_checksum`}}", 116 | "iso_checksum_type": "{{user `iso_checksum_type`}}", 117 | "output_directory": "output-vyos-1.1.7-amd64-{{build_type}}", 118 | "vm_name": "packer-vyos-1.1.7-amd64", 119 | "disk_size": "{{user `disk_size`}}", 120 | "headless": "{{user `headless`}}", 121 | "boot_wait": "5s", 122 | "boot_command": [ 123 | "", 124 | "vyos", 125 | "vyos", 126 | "install system", 127 | "", 128 | "", 129 | "", 130 | "Yes", 131 | "", 132 | "", 133 | "vagrant", 134 | "vagrant", 135 | "", 136 | "reboot", 137 | "Yes", 138 | "vyos", 139 | "vagrant", 140 | "sudo useradd -m -U vagrant", 141 | "configure", 142 | "set interfaces ethernet eth0 address dhcp", 143 | "set system login user vagrant authentication plaintext-password vagrant", 144 | "set system login user vagrant level admin", 145 | "set service ssh", 146 | "commit", 147 | "save", 148 | "exit", 149 | "exit", 150 | "vagrant", 151 | "vagrant", 152 | "configure", 153 | "delete system login user vyos", 154 | "commit", 155 | "save", 156 | "exit" 157 | ], 158 | "ssh_timeout": "{{user `ssh_timeout`}}", 159 | "ssh_username": "vagrant", 160 | "ssh_password": "vagrant", 161 | "tools_upload_flavor": "linux", 162 | "shutdown_command": "sudo poweroff", 163 | "vmx_data": { 164 | "memsize": "{{user `memory`}}", 165 | "numvcpus": "{{user `cpus`}}" 166 | }, 167 | "vmx_remove_ethernet_interfaces": true 168 | }], 169 | "provisioners": [{ 170 | "type": "shell", 171 | "scripts": [ 172 | "scripts/vyos/repo.sh", 173 | "scripts/vyos/virtualbox.sh", 174 | "scripts/vyos/vmware.sh", 175 | "scripts/vyos/init.sh", 176 | "scripts/vyos/vagrant.sh", 177 | "scripts/common/sshd.sh", 178 | "scripts/vyos/cleanup.sh", 179 | "scripts/vyos/minimize.sh" 180 | ] 181 | }], 182 | "post-processors": [{ 183 | "type": "vagrant", 184 | "compression_level": "{{user `compression_level`}}", 185 | "output": "vyos-1.1.7-amd64-{{.Provider}}.box" 186 | }], 187 | "variables": { 188 | "compression_level": "6", 189 | "cpus": "1", 190 | "disk_size": "40000", 191 | "headless": "false", 192 | "iso_checksum": "c40a889469e0eea43d92c73149f1058e3650863b", 193 | "iso_checksum_type": "sha1", 194 | "memory": "512", 195 | "mirror": "http://mirror.vyos.net", 196 | "ssh_timeout": "60m" 197 | } 198 | } 199 | --------------------------------------------------------------------------------