A Packer build targeting the qemu builder completes, but the resulting image boots to a login prompt and never runs your provisioning scripts. You configured an ssh communicator with a username and password. Which condition most likely prevents Packer from connecting to the guest during the build?
With the qemu builder, Packer starts the VM and immediately tries to SSH using the configured credentials. If the image does not start sshd early or if the boot command does not wait for the SSH port to become reachable, the communicator times out and provisioning never runs. Ensuring sshd is enabled and adding appropriate boot wait logic resolves this.
Why this answer
Packer's qemu builder boots the image and then relies on the configured communicator to run provisioners. If sshd is not started early or the boot command does not poll for the SSH port, the communicator times out and no provisioning occurs. Verifying that the image enables SSH at boot and adding boot wait logic ensures Packer can connect and execute the scripts.