brd / packer-freebsd Goto Github PK
View Code? Open in Web Editor NEWA packer recipe for FreeBSD
A packer recipe for FreeBSD
If I run ./automatic-11.0-stable-zfs.sh -only=virtualbox-iso
output will be:
virtualbox-iso output will be in this color.
==> virtualbox-iso: Downloading or copying Guest additions
virtualbox-iso: Downloading or copying: file:///Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso
==> virtualbox-iso: Downloading or copying ISO
virtualbox-iso: Downloading or copying: http://ftp.freebsd.org/pub/FreeBSD/snapshots/ISO-IMAGES/11.0/FreeBSD-11.0-CURRENT-amd64-20170210-r313553-disc1.iso
virtualbox-iso: Error downloading: checksums didn't match expected: 0978e7ce63cdbb676a265e6745302e45c847b1f29d71be9fcc4a39922d180369
==> virtualbox-iso: ISO download failed.
Build 'virtualbox-iso' errored: ISO download failed.
==> Some builds didn't complete successfully and had errors:
--> virtualbox-iso: ISO download failed.
==> Builds finished but no artifacts were created.
Pull-request already exists: #19
I have some legacy, 7.0 freebsd box.
Is it possible to get or build vagrant image for it?
Trying to make this work behind a corporate proxy, I finally figured out that the box can't work because sudo will never be installed.
I can boot by CTR-C in the console, but will never be able to sudo in this box.
Note that I could work around that by using the root password "vagrant"
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.
I'm getting a weird messaging when I'm building the machine.
virtualbox-iso: PACKER_BUILD_NAME=virtualbox-iso: Command not found.
I'm on a Windows host.
No idea if that could affect.
FreeBSD fails to load when vmx_data
has firmware
set to efi
. This appears to be either a bug in VMware Fusion (8.5.7 is still exhibiting this problem) or FreeBSD (11.0 snapshot as of amd64-20170510-r318134
).
The file referenced doesn't exist anymore: http://ftp.freebsd.org/pub/FreeBSD/snapshots/ISO-IMAGES/11.0/FreeBSD-11.0-CURRENT-amd64-20150111-r276981-disc1.iso
Seems like template-current.json needs to be dynamically generated by examining the ftp site and parsing out the latest iso and checksum files. Maybe get the FreeBSD guys to post a link something like FreeBSD-11.0-CURRENT-amd64-LATEST.iso (and it's checksum).
Hi,
if I run the automatic scripts with version 11.0, it fails on password retype for root and vagrant user.
It didn't match.
Do you have any ideas to resolve the problem ?
(My suggestion would be to use only ssh-key authorization without typing a password.)
Cheers,
Robin
See hashicorp/vagrant#8624 for details. Once that issue is resolved, the https://github.com/sean-/packer-freebsd/blob/master/11.0/.vagrant-nfs.patch and patch-vagrant-nfs
can be removed.
When I try to generate a Vagrant box for FreeBSD 11.0-20170510-zfs, packer complains of an unknown configuration key: "ssh_disable_agent"
. Trace:
$ make 11.0-20170510-zfs
exec /Applications/Xcode.app/Contents/Developer/usr/bin/make _build PROVIDER=vmware-iso EXTRA_OPTS="" TEMPLATE=11.0-amd64-20170510-zfs.json
`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.
1 error(s) occurred:
* unknown configuration key: "ssh_disable_agent"
make[1]: *** [_build] Error 1
make: *** [11.0-20170510-zfs] Error 2
Based on hashicorp/packer#3261 , I think that the packer configuration has unfortunately introduced a breaking change, so any projects that want to target the latest version of packer need to use ssh_private_key_file
instead.
As a workaround, one can specify an earlier version of packer for installation. For example:
$ cd $GOPATH/src/github.com/hashicorp/packer
$ git checkout -b v1.0.4 v1.0.4
$ go install
$ packer -v
1.0.4
Please drop the GOPATH-relative path to packer and just runpacker
instead. That way, the packer-freebsd configuration integrates better with multiple ways that packer can be installed, such as via brew install packer
. Currently, packer-freebsd requires that packer be installed specifically by go get github.com/hashicorp/packer
, which is unnecessarily restrictive.
vagrant up --no-destroy-on-error
==> default: Setting hostname...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
# Set the hostname
hostname 'openafs-freebsd-dev'
sed -i '' 's/^hostname=.*$/hostname="openafs-freebsd-dev"/' /etc/rc.conf
# Remove comments and blank lines from /etc/hosts
sed -i'' -e 's/#.*$//' /etc/hosts
sed -i'' -e '/^$/d' /etc/hosts
# Prepend ourselves to /etc/hosts
grep -w 'openafs-freebsd-dev' /etc/hosts || {
echo -e '127.0.0.1\topenafs-freebsd-dev\topenafs-freebsd-dev' | cat - /etc/hosts > /tmp/tmp-hosts
mv /tmp/tmp-hosts /etc/hosts
}
Stdout from the command:
Stderr from the command:
sudo: error in /usr/local/etc/sudo.conf, line 0 while loading plugin `sudoers_policy'
sudo: unable to load /usr/local/libexec/sudo/sudoers.so: Shared object "libpam.so.6" not found, required by "sudoers.so"
sudo: fatal error, unable to load plugins
vagrant ssh
vagrant@:~ % sudo
sudo: error in /usr/local/etc/sudo.conf, line 0 while loading plugin `sudoers_policy'
sudo: unable to load /usr/local/libexec/sudo/sudoers.so: Shared object "libpam.so.6" not found, required by "sudoers.so"
sudo: fatal error, unable to load plugins
vagrant@:~ % su root
...
root@:/home/vagrant # sudo
sudo: error in /usr/local/etc/sudo.conf, line 0 while loading plugin `sudoers_policy'
sudo: unable to load /usr/local/libexec/sudo/sudoers.so: Shared object "libpam.so.6" not found, required by "sudoers.so"
sudo: fatal error, unable to load plugins
https://github.com/jen20/packer-vagrant-templates/tree/master/freebsd/12.0-CURRENT-commit
This isn't actionable but is worth keeping track of.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.