packer-arch/arch-template.json
Nicolas Iooss 183c425947 Use 1GB memory when installing Arch Linux ISO
Booting the Arch Linux ISO nowadays requires at least 955 MB of memory
(from running `free -m` after booting it in VirtualBox).

When the virtual machine only has 768 MB of RAM, extracting the initrd
fails and the provisioning script aborts.

Increase the memory to 1024 MB to fix this.
2025-10-03 15:55:23 +00:00

138 lines
5.5 KiB
JSON

{
"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": [
"<enter><wait10><wait10><wait10><wait10>",
"/usr/bin/curl -O http://{{ .HTTPIP }}:{{ .HTTPPort }}/enable-ssh.sh<enter><wait5>",
"/usr/bin/curl -O http://{{ .HTTPIP }}:{{ .HTTPPort }}/poweroff.timer<enter><wait5>",
"/usr/bin/bash ./enable-ssh.sh<enter>"
],
"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": [
"<enter><wait10><wait10><wait10><wait10>",
"/usr/bin/curl -O http://{{ .HTTPIP }}:{{ .HTTPPort }}/enable-ssh.sh<enter><wait5>",
"/usr/bin/curl -O http://{{ .HTTPIP }}:{{ .HTTPPort }}/poweroff.timer<enter><wait5>",
"/usr/bin/bash ./enable-ssh.sh<enter>"
],
"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": [
"<enter><wait10><wait10><wait10><wait10>",
"/usr/bin/curl -O http://{{ .HTTPIP }}:{{ .HTTPPort }}/enable-ssh.sh<enter><wait5>",
"/usr/bin/curl -O http://{{ .HTTPIP }}:{{ .HTTPPort }}/poweroff.timer<enter><wait5>",
"/usr/bin/bash ./enable-ssh.sh<enter>"
],
"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": [
"<enter><wait10><wait10><wait10><wait10><wait10><wait10>",
"/usr/bin/curl -O http://{{ .HTTPIP }}:{{ .HTTPPort }}/enable-ssh.sh<enter><wait5>",
"/usr/bin/curl -O http://{{ .HTTPIP }}:{{ .HTTPPort }}/poweroff.timer<enter><wait5>",
"/usr/bin/bash ./enable-ssh.sh<enter>"
],
"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"
}
]
}