{ "variables": { "iso_url": "https://mirrors.kernel.org/archlinux/iso/latest/archlinux-x86_64.iso", "iso_checksum_url": "https://mirrors.kernel.org/archlinux/iso/latest/sha256sums.txt", "ssh_timeout": "20m", "country": "US", "write_zeros": "true", "headless": "false" }, "builders": [ { "type": "parallels-iso", "parallels_tools_flavor": "lin", "parallels_tools_mode": "attach", "guest_os_type": "linux-2.6", "iso_url": "{{ user `iso_url` }}", "iso_checksum": "file:{{ user `iso_checksum_url` }}", "http_directory": "srv", "boot_wait": "5s", "boot_command": [ "", "/usr/bin/curl -O http://{{ .HTTPIP }}:{{ .HTTPPort }}/enable-ssh.sh", "/usr/bin/curl -O http://{{ .HTTPIP }}:{{ .HTTPPort }}/poweroff.timer", "/usr/bin/bash ./enable-ssh.sh" ], "cpus": 1, "memory": 1024, "disk_size": 20480, "ssh_username": "vagrant", "ssh_password": "vagrant", "ssh_timeout": "{{ user `ssh_timeout` }}", "shutdown_command": "sudo systemctl start poweroff.timer" }, { "type": "virtualbox-iso", "iso_url": "{{ user `iso_url` }}", "iso_checksum": "file:{{ user `iso_checksum_url` }}", "guest_os_type": "ArchLinux_64", "guest_additions_mode": "disable", "http_directory": "srv", "boot_wait": "5s", "boot_command": [ "", "/usr/bin/curl -O http://{{ .HTTPIP }}:{{ .HTTPPort }}/enable-ssh.sh", "/usr/bin/curl -O http://{{ .HTTPIP }}:{{ .HTTPPort }}/poweroff.timer", "/usr/bin/bash ./enable-ssh.sh" ], "cpus": 1, "memory": 1024, "disk_size": 20480, "hard_drive_interface": "sata", "ssh_username": "vagrant", "ssh_password": "vagrant", "ssh_timeout": "{{ user `ssh_timeout` }}", "shutdown_command": "sudo systemctl start poweroff.timer", "headless": "{{ user `headless`}}" }, { "type": "vmware-iso", "iso_url": "{{ user `iso_url` }}", "iso_checksum": "file:{{ user `iso_checksum_url` }}", "http_directory": "srv", "boot_wait": "5s", "boot_command": [ "", "/usr/bin/curl -O http://{{ .HTTPIP }}:{{ .HTTPPort }}/enable-ssh.sh", "/usr/bin/curl -O http://{{ .HTTPIP }}:{{ .HTTPPort }}/poweroff.timer", "/usr/bin/bash ./enable-ssh.sh" ], "cpus": 1, "memory": 1024, "disk_size": 20480, "ssh_username": "vagrant", "ssh_password": "vagrant", "ssh_timeout": "{{ user `ssh_timeout` }}", "shutdown_command": "sudo systemctl start poweroff.timer", "headless": "{{ user `headless`}}" }, { "type": "qemu", "iso_url": "{{ user `iso_url` }}", "iso_checksum": "file:{{ user `iso_checksum_url` }}", "http_directory": "srv", "boot_wait": "5s", "boot_command": [ "", "/usr/bin/curl -O http://{{ .HTTPIP }}:{{ .HTTPPort }}/enable-ssh.sh", "/usr/bin/curl -O http://{{ .HTTPIP }}:{{ .HTTPPort }}/poweroff.timer", "/usr/bin/bash ./enable-ssh.sh" ], "cpus": 1, "memory": 1024, "disk_size": 20480, "ssh_username": "vagrant", "ssh_password": "vagrant", "ssh_timeout": "{{ user `ssh_timeout` }}", "shutdown_command": "sudo systemctl start poweroff.timer", "headless": "{{ user `headless`}}" } ], "provisioners": [ { "type": "shell", "execute_command": "{{ .Vars }} COUNTRY={{ user `country` }} sudo -E -S bash '{{ .Path }}'", "expect_disconnect": true, "script": "scripts/install-base.sh" }, { "only": ["parallels-iso"], "type": "shell", "execute_command": "{{ .Vars }} sudo -E -S bash '{{ .Path }}'", "script": "scripts/install-parallels.sh" }, { "only": ["virtualbox-iso"], "type": "shell", "execute_command": "{{ .Vars }} sudo -E -S bash '{{ .Path }}'", "script": "scripts/install-virtualbox.sh" }, { "only": ["vmware-iso"], "type": "shell", "execute_command": "{{ .Vars }} sudo -E -S bash '{{ .Path }}'", "script": "scripts/install-vmware.sh" }, { "type": "shell", "execute_command": "{{ .Vars }} WRITE_ZEROS={{ user `write_zeros` }} sudo -E -S bash '{{ .Path }}'", "script": "scripts/cleanup.sh" } ], "post-processors": [ { "type": "vagrant", "output": "output/packer_arch_{{ .Provider }}-{{isotime \"2006.01\"}}.01.box" } ] }