packer-freebsd
packer-freebsd copied to clipboard
ISO hash mismatch due to dead ISO URLs
When vmware-iso tries to download the FreeBSD ISO's, it reports hash mismatch errors, which is hiding dead URL errors. Example:
$ make 11.0-20170510-zfs
`go env GOPATH`/bin/packer build -only=vmware-iso -var boot_wait=35s 11.0-amd64-20170510-zfs.json
vmware-iso output will be in this color.
==> vmware-iso: Downloading or copying ISO
vmware-iso: Downloading or copying: http://ftp.freebsd.org/pub/FreeBSD/snapshots/ISO-IMAGES/11.0/FreeBSD-11.0-STABLE-amd64-20170510-r318134-disc1.iso
vmware-iso: Error downloading: checksums didn't match expected: 257d4fa23d4b0d6f3dbe5e1ffce2f834eecee92d2102911993346a663bd377037a10ca451bb4048eed67a4ed4fe3328b106eda647c5fb3a28414b6e306eb4a64
==> vmware-iso: ISO download failed.
Build 'vmware-iso' errored: ISO download failed.
==> Some builds didn't complete successfully and had errors:
--> vmware-iso: ISO download failed.
==> Builds finished but no artifacts were created.
make[1]: *** [_build] Error 1
make: *** [11.0-20170510-zfs] Error 2
Unfortunately, both the main FreeBSD ISO FTP repository and its mirrors delete snapshots after a few weeks, so any URLs and packer configuration targeting snapshots become broken quite soon. And after 11.1 was released, all 11.1-BETA1 snapshots were deleted. So it would be safest to target only RELEASE and STABLE ISO's, no snapshots.
I'm using packer v1.0.4, by the way.