This repository contains Packer templates for Vagrant base boxes for some OSTree-based Fedora variants:
- Fedora Silverblue (formerly Atomic Workstation)
- Fedora Kinoite
- Fedora IoT
- Fedora 26 Atomic Workstation
- Fedora 27 Atomic Workstation
- Fedora 28 Atomic Workstation
- Fedora 29 Silverblue
- Fedora 30 Silverblue
- Fedora 31 Silverblue
- Fedora 32 Silverblue
- Fedora 33 Silverblue
- Fedora 34 Silverblue
- Fedora 35 Silverblue
- Fedora 35 Kinoite
- Fedora 36 Silverblue
- Fedora 36 Kinoite
- Fedora 37 Silverblue
- Fedora 37 Kinoite
- Fedora 38 Silverblue
- Fedora 38 Kinoite
- Fedora IoT
- Virtualbox (
virtualbox
) - Hyper-V (experimental) (
hyperv
) - QEMU/KVM (experimental) (
qemu
)
Packer needs to be run for a specific box using one of the provided variables files.
In theory it's possible to build for all virtualization providers at once, but they
generally don't all run on any single system. Because of that Packer's -only
flag
needs to be used to limit the providers to build for.
$ packer build -only="*.virtualbox" -var-file="vars/fedora-iot.pkrvars.hcl" .
On Linux systems, it may be necessary to set TMPDIR
to a path not on a tmpfs so
some steps don't run out of space in /tmp
. /var/tmp
can be used instead.
The included Makefile provides a target to run Packer for a specific provider using
a specific variables file, for example: make virtualbox/fedora-iot
.
Hyper-V requires a pre-configured switch with DHCP support; internet access is currently not
required and is optional. The default switch does not work because the host's IP address is not
detected correctly. You can either use an external switch connected to the primary network interface
or an internal switch that has a DHCP server running on it. Packer will try to create or detect
a switch automatically. An explicit switch can be passed using the hyperv_switch
Packer variable.
By default, the box files are not uploaded. The following variables control the upload process:
vagrant_cloud_upload
- set to true to upload the box to Vagrant Cloud after buildingvagrant_cloud_user
- the account name to prepend to the box tagvagrant_cloud_token
- the Vagrant Cloud authentication token
These variables can be set in a *.auto.pkrvars.hcl
file in the top-level directory
or passed directly to Packer (-var=vagrant_cloud_upload=true
). When using the Makefile,
set the PACKER_ARGS
variable: make [target] PACKER_ARGS="-var=vagrant_cloud_upload=true"
.
The templates respect the following network proxy environment variables and forward them on to the virtual machine environment during the box creation process:
http_proxy
https_proxy
ftp_proxy
rsync_proxy
no_proxy