Walkthroughs¶
Each walkthrough takes you from a fresh install to a built VM or image on one platform: what to install, which credentials to add, a complete location file, the build command, how to check the result, and what usually goes wrong.
| Where the VM runs | Walkthrough | Installs from |
|---|---|---|
| Your machine, KVM | QEMU/KVM | ISO |
| Your machine | VirtualBox | ISO |
| Your machine | VMware Workstation/Fusion | ISO |
| A Proxmox VE node | Proxmox VE | ISO |
| vCenter or ESXi | vSphere/ESXi | ISO |
| AWS | AWS | Base AMI |
| Azure | Azure | Marketplace image |
| Google Cloud | GCP | Public image |
What every walkthrough has in common¶
The target. A build is always mkosimage PLATFORM/LOCATION/SPEC [NAME] [IP]:
PLATFORMis the builder:qemu,virtualbox,vmware,proxmox,vsphere,aws,azure,gcp.LOCATIONis a file you write in~/.config/osimager/locations/. It describes one environment: network, DNS, and the platform-specific settings such as which Proxmox node or vSphere datastore to use.SPECis<dist>-<version>-<arch>, for examplealma-10.2-x86_64, or<dist>-latest-<arch>for the newest version the specs provide.
Global settings live in ~/.config/osimager/config.json and are set with mkosimage --set KEY=VALUE. The ones that matter for a first build are credential_source (vault or config) and, for the hypervisor platforms, iso_path, the directory on your machine that holds installer ISOs. iso_path is never set in a location.
Credentials come from HashiCorp Vault or from the local secrets file, depending on credential_source. See Credential Setup; each walkthrough lists the exact keys its platform reads.
Previewing. Before building for real, mkosimage -u PLATFORM/LOCATION/SPEC prints the complete Packer configuration and mkosimage -n ... generates everything and prints the packer build command without running it. All options are in the CLI Reference.