Created
February 17, 2020 17:01
-
-
Save davecardwell/e44d5ce3dcd1395a52a33e15f8301251 to your computer and use it in GitHub Desktop.
hashicorp/packer issue #8317 minimal buildfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"description": "Minimal buildfile for reproducing https://github.com/hashicorp/packer/issues/8317", | |
"min_packer_version": "1.5.2", | |
"builders": [ | |
{ | |
"type": "virtualbox-iso", | |
"output_directory": "./output", | |
"headless": false, | |
"hard_drive_discard": true, | |
"hard_drive_interface": "pcie", | |
"hard_drive_nonrotational": true, | |
"vboxmanage": [ | |
["modifyvm", "{{.Name}}", "--firmware", "efi"], | |
["modifyvm", "{{.Name}}", "--graphicscontroller", "vmsvga"] | |
], | |
"guest_os_type": "Linux_64", | |
"iso_url": "http://dl-cdn.alpinelinux.org/alpine/v3.11/releases/x86_64/alpine-virt-3.11.3-x86_64.iso", | |
"iso_checksum": "98c8295c63a04e959a5578efd769d00e3481e6e6d4340390329eafd15f8d4f680f02a478c70ec1b5e3cf38e8a89dfa458298b115ec5d80e8bd1e685ae350833b", | |
"iso_checksum_type": "sha512", | |
"iso_interface": "sata", | |
"http_directory": ".", | |
"boot_command": [ | |
"root<enter><wait>", | |
"ifconfig eth0 up && udhcpc -i eth0<enter><wait>", | |
"wget http://{{ .HTTPIP }}:{{ .HTTPPort }}/setup-alpine.cfg<enter><wait>", | |
"sed -i -e \"/rc-service/d\" /sbin/setup-sshd<enter><wait>", | |
"printf \"root\\nroot\\ny\\n\" | setup-alpine -f /root/setup-alpine.cfg ; ", | |
"mount /dev/nvme0n1p2 /mnt && ", | |
"echo 'PasswordAuthentication yes' >> /mnt/etc/ssh/sshd_config && ", | |
"echo 'PermitRootLogin yes' >> /mnt/etc/ssh/sshd_config && ", | |
"chroot /mnt apk add openntpd && chroot /mnt rc-update add openntpd default && ", | |
"eject -s /dev/sr0 && umount /mnt ; reboot<enter>" | |
], | |
"shutdown_command": "/sbin/poweroff", | |
"ssh_username": "root", | |
"ssh_password": "root" | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
KEYMAPOPTS="us us" | |
HOSTNAMEOPTS="-n alpine" | |
INTERFACESOPTS="auto lo | |
iface lo inet loopback | |
auto eth0 | |
iface eth0 inet dhcp | |
hostname alpine | |
" | |
DNSOPTS="-d local -n 8.8.8.8 8.8.4.4" | |
TIMEZONEOPTS="-z UTC" | |
PROXYOPTS="none" | |
APKREPOSOPTS="https://sjc.edge.kernel.org/alpine/v3.11/main https://sjc.edge.kernel.org/alpine/v3.11/community" | |
SSHDOPTS="-c openssh" | |
NTPOPTS="-c none" | |
DISKOPTS="-s 0 -m sys /dev/nvme0n1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Packer: 1.5.2
macOS: 10.15.3
VirtualBox: 6.1.2,135662
VirtualBox Extension Pack: 6.1.2
Output: