(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 lockedgeoff
created and added tosudo
group- swap disabled
- ssh
authororized_keys
uploaded fromhttp
directory forgeoff
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: