/packer-archlinux

packer templates for building and updating an Arch Linux base box for vagrant

Primary LanguageShell

Arch Linux Base Box for Vagrant

These Packer templates and scripts build and update an Arch Linux x86-64 base box for Vagrant hosted on Atlas. Examine these files to see everything that went into the box. If you install packer and VirtualBox, you may also use these templates to build and update the box.

Adding the Box to Vagrant

No building is necessary. Vagrant will download it from my repository.

vagrant add lmmarsano/archx86-64

Build/Update

Requirements

Instructions

On the console, you'd change path to a directory containing these files

  1. git clone https://github.com/lmmarsano/packer-archlinux.git
  2. cd packer-archlinux

Then do either of the following:

  • build:

    packer build build.json

  • update: The box will need to be unpacked: unpack it yourself (boxes are compressed tarballs) or let Vagrant unpack it for you (add the box to Vagrant; Vagrant unpacks it under ~/.vagrant.d/boxes/tag/version/) For a box unpacked at path path/to/unpacked-box/

    packer build -var 'source_path=path/to/unpacked-box' update.json

The last step, to upload it to my repository, will fail, but you'll still get the resulting .box file, ready to add to vagrant.

Box Information

This vagrant box comes with modern virtual hardware defaults and keeps to a standard, base install of Arch with only minor additions for usability. For boot time and performance, it uses EFI firmware, the faster SATA storage controllers, enhanced USB controllers, and the faster virtio-net network interface. For flexibility, it allows CPU hotplugging to change the number of CPUs, and Linux has the hard disk managed through LVM to allow volume resizes and snapshots.

Login Credentials

  • root: passwordless
  • vagrant: password "vagrant"

Default Locale

  • en_US.UTF-8
  • keymap for standard US keyboard
  • default console font

VM Specifications

  • EFI firmware
  • CPU hotplugging enabled
  • SATA storage controller
  • Enhanced USB controller
  • virtio network interface
  • dynamic hard disk (up to 40 GiB)
  • 512 MiB RAM

Software

  • Base packages
  • openSSH
  • VirtualBox Guest Additions
  • gummiboot bootloader
  • LVM
  • zsh with auto-completion (bash compatible, featured in the Arch install environment)
  • reflector to optimize the package manager's mirror list
  • curl
  • ed, the standard editor

Configuration

  • /dev/sda1 (mounted on /boot) is an EFI System Partition; all other volumes are managed by LVM
  • reflector runs weekly
  • systemd manages networking (through systemd-networkd, systemd-resolved)