geoffwilliams@home:~$

(Fun With) Packer and Nexus

I have a bunch of VMs that I need to look after in my homelab spread across Hyperv and KMV (libvirt). Management of these VMs has evolved from one-off installs, through to images SCPed between hosts and finally to a fully fledged build system with distribution via Nexus.

On hyperv and KVM I now have a way to build a very minimal image that can be customized with ansible when a guest has been booted:

Common

  • root password locked
  • geoff created and added to sudo group
  • swap disabled
  • ssh authororized_keys uploaded from http directory for geoff

Hyperv

  • hostname from vm name (hyperv-hostname.sh)

KVM

  • console/tty support
  • hostname from bios asset tag (kvm-hostname.sh)

Status

Providing these scripts to the world as examples seem thin on the ground. Have lots of fun:

https://github.com/GeoffWilliams/packer_images

Post comment

Markdown is allowed, HTML is not. All comments are moderated.