Some users have reported that they have encountered the error described in the title of this article while building cluster-api complaint templates in vSphere starting with Konvoy Image Builder (KIB) 1.24.X.
./konvoy-image build images/ova/rhel-84.yaml
2023/01/03 16:44:23 writing new packer configuration to work/vsphere-rhel-84-1672764263-YzJaA
2023/01/03 16:44:23 starting packer build
vsphere-clone: output will be in this color.
==> vsphere-clone: Cloning VM...
==> vsphere-clone: Customizing hardware...
==> vsphere-clone: Mounting ISO images...
==> vsphere-clone: Adding configuration parameters...
==> vsphere-clone: Creating ephemeral key pair for SSH communicator...
==> vsphere-clone: Destroying VM...
Build 'vsphere-clone' errored after 3 seconds 634 milliseconds: error saving temporary keypair in the vm: not possible to save temporary public key: this VM lacks a vApp configuration and cannot have vApp properties set on it
==> Wait completed after 3 seconds 634 milliseconds
==> Some builds didn't complete successfully and had errors:
--> vsphere-clone: error saving temporary keypair in the vm: not possible to save temporary public key: this VM lacks a vApp configuration and cannot have vApp properties set on it
==> Builds finished but no artifacts were created.
ERRO error during run: error running packer build: error running command: exit status 1
error encountered: exit status 3
This exception is encountered when the packer variables defining an authentication method are not declared. Prior to KIB 1.24.X, password authentication was the default method for packer to SSH into the base image, and there was no need to include ssh_username and ssh_password within the packer variables. Starting with 1.24.X, password authentication is no longer the default method and ssh_username along with ssh_password or ssh_private_key_file must be defined, as described in our documentation.