Linux is the recommended local build environment because QEMU/KVM is mature and fast.
Install required tools:
sudo apt-get update
sudo apt-get install -y make qemu-system-x86 qemu-utils cloud-image-utils openssh-clientInstall Packer from HashiCorp's official packages or binary releases, then run:
make doctor
make init
make validate
make build
make testFor faster builds, make sure /dev/kvm is available and your user can access it:
ls -l /dev/kvm
groupsOn Ubuntu/Debian, users commonly need membership in the kvm group. Log out and back in after changing group membership.
The build produces:
artifacts/ubuntu-24.04-base/ubuntu-24.04-base.qcow2