mirror of
https://github.com/elasticdog/packer-arch.git
synced 2026-07-18 00:45:20 +00:00
80 lines
3.4 KiB
JSON
80 lines
3.4 KiB
JSON
{
|
|
"variables": {
|
|
"iso_url": "https://mirrors.kernel.org/archlinux/iso/2016.01.01/archlinux-2016.01.01-dual.iso",
|
|
"iso_checksum": "ff79a9629a83dfedad6c3a58e2e7838c86282315",
|
|
"iso_checksum_type": "sha1",
|
|
"ssh_timeout": "20m"
|
|
},
|
|
"builders": [
|
|
{
|
|
"type": "virtualbox-iso",
|
|
"iso_url": "{{user `iso_url`}}",
|
|
"iso_checksum": "{{user `iso_checksum`}}",
|
|
"iso_checksum_type": "{{user `iso_checksum_type`}}",
|
|
"guest_os_type": "ArchLinux_64",
|
|
"guest_additions_mode": "disable",
|
|
"http_directory": ".",
|
|
"boot_wait": "5s",
|
|
"boot_command": [
|
|
"<enter><wait10><wait10>",
|
|
"/usr/bin/curl -O http://{{.HTTPIP}}:{{.HTTPPort}}/install-virtualbox.sh<enter><wait5>",
|
|
"/usr/bin/curl -O http://{{.HTTPIP}}:{{.HTTPPort}}/poweroff.timer<enter><wait5>",
|
|
"/usr/bin/bash ./install-virtualbox.sh<enter>"
|
|
],
|
|
"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"
|
|
},
|
|
{
|
|
"type": "vmware-iso",
|
|
"iso_url": "{{user `iso_url`}}",
|
|
"iso_checksum": "{{user `iso_checksum`}}",
|
|
"iso_checksum_type": "{{user `iso_checksum_type`}}",
|
|
"http_directory": ".",
|
|
"boot_wait": "5s",
|
|
"boot_command": [
|
|
"<enter><wait10><wait10>",
|
|
"/usr/bin/curl -O http://{{.HTTPIP}}:{{.HTTPPort}}/install-vmware.sh<enter><wait5>",
|
|
"/usr/bin/curl -O http://{{.HTTPIP}}:{{.HTTPPort}}/poweroff.timer<enter><wait5>",
|
|
"/usr/bin/bash ./install-vmware.sh<enter>"
|
|
],
|
|
"disk_size": 20480,
|
|
"ssh_username": "vagrant",
|
|
"ssh_password": "vagrant",
|
|
"ssh_timeout": "{{user `ssh_timeout`}}",
|
|
"shutdown_command": "sudo systemctl start poweroff.timer"
|
|
},
|
|
{
|
|
"type": "parallels-iso",
|
|
"parallels_tools_flavor": "lin",
|
|
"parallels_tools_mode": "attach",
|
|
"guest_os_type": "linux-2.6",
|
|
"iso_url": "{{user `iso_url`}}",
|
|
"iso_checksum": "{{user `iso_checksum`}}",
|
|
"iso_checksum_type": "{{user `iso_checksum_type`}}",
|
|
"http_directory": ".",
|
|
"boot_wait": "5s",
|
|
"boot_command": [
|
|
"<enter><wait10><wait10>",
|
|
"/usr/bin/curl -O http://{{.HTTPIP}}:{{.HTTPPort}}/install-parallels.sh<enter><wait5>",
|
|
"/usr/bin/curl -O http://{{.HTTPIP}}:{{.HTTPPort}}/poweroff.timer<enter><wait5>",
|
|
"/usr/bin/curl -O http://{{.HTTPIP}}:{{.HTTPPort}}/parallels_tools.sh<enter><wait5>",
|
|
"/usr/bin/bash ./install-parallels.sh<enter>"
|
|
],
|
|
"disk_size": 20480,
|
|
"ssh_username": "vagrant",
|
|
"ssh_password": "vagrant",
|
|
"ssh_timeout": "{{user `ssh_timeout`}}",
|
|
"shutdown_command": "sudo /parallels_tools.sh && sudo rm /parallels_tools.sh && sudo systemctl start poweroff.timer"
|
|
}
|
|
],
|
|
"post-processors": [
|
|
{
|
|
"type": "vagrant",
|
|
"output": "packer_arch_{{.Provider}}.box"
|
|
}
|
|
]
|
|
}
|