Packer template that builds Ubuntu (default 25.10) for amd64 with VMware Fusion on macOS.
- macOS with VMware Fusion
- Packer >= 1.7.0
-
Optional: override build variables by copying the example and editing:
cp ubuntu.auto.EXAMPLE.hcl ubuntu.auto.pkrvars.hcl
Edit
ubuntu.auto.pkrvars.hcl(password hash,ssh_key,hostname,fusion_app_path, etc.). Generate a password hash with:openssl passwd -6 -salt $(openssl rand -hex 4) 'yourpassword'
-
Build:
make
Or without the Makefile:
packer init . packer build .
With a var file:
packer build -var-file=ubuntu.auto.pkrvars.hcl . -
Output: VM is in
output/vmware-iso_25.10/(path depends onos_version).
Stop the VM (if running) and remove the build output:
make clean- Cloud-init (
files/user-data.pkrtpl): user, hostname, SSH key, password. - Provisioning (
scripts/configure.sh): installs open-vm-tools, then chezmoi with thetrodemasterconfig, then cleanup.
Other config (dotfiles, packages) comes from the chezmoi setup, not from this repo.