You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am unfortunately hitting an issue with packit never establishing ssh connection.
The image I'm using requires either login as cloud-user or passing userdata that would allow root ssh auth. Unfortunately specifying ssh_username: cloud-user in the template does not cut it and there looks like no option for supplying userdata to be passed to instance create command (based on what https://github.com/ppc64le-cloud/packer-plugin-powervs/blob/main/builder/powervs/builder.hcl2spec.go#L25 has to offer).
ivasilev@ivasilev-thinkpadp1gen4i:~/projects/ansible-baseos-ci/cli$ packer build -var playbook_file=../images/playbooks/compose/build.yaml ../images/packer/ibmcloud-power-ansible.json
powervs: output will be in this color.
==> powervs: Importing the Base Image
powervs: Image found with ID: fe2bd832-1dc3-4fb1-81bd-8fd821745392
==> powervs: Creating network
powervs: Network Created, Name: public-192_168_5_240-28-VLAN_2063, ID: b3c8b060-fc98-4d97-81d5-fa063283cfce
==> powervs: Creating Instance
powervs: Creating Instance
powervs: Instance Created, Name: packer-build-1734382636, ID: 29a6d2f3-657f-4553-b1d3-d5eb25387ffd
powervs: Fetching IP for machine
powervs: Machine IP is not yet found, Trying again
powervs: Machine IP is not yet found, Trying again
==> powervs: Using SSH communicator to connect: 52.116.109.254
==> powervs: Waiting for SSH to become available...
powervs: Fetching IP for machine
powervs: Fetching IP for machine
powervs: Fetching IP for machine
powervs: Fetching IP for machine
powervs: Fetching IP for machine
powervs: Fetching IP for machine
powervs: Fetching IP for machine
powervs: Fetching IP for machine
powervs: Fetching IP for machine
==> powervs: Timeout waiting for SSH.
==> powervs: Deleting the Instance
powervs: VM still exists, state: ACTIVE
powervs: VM still exists, state: ACTIVE
powervs: instance deleted successfully
==> powervs: Deleting the Network
powervs: Successfully deleted network
Build 'powervs' errored after 6 minutes 8 seconds: Timeout waiting for SSH.
==> Wait completed after 6 minutes 8 seconds
==> Some builds didn't complete successfully and had errors:
--> powervs: Timeout waiting for SSH.
==> Builds finished but no artifacts were created.
At the same time one can totally reach the machine as [email protected] and there is indeed the proper ssh key in ~/.ssh/authorized_keys (the one specified by key_pair_name).
The goal is to achieve the same functionality as the ibmcloud pi plugin instance create call: ibmcloud pi instance create artemis-pi-manual-boot --image rhel-9-6-0-20241209-d-1 --subnets 969ef856-27e9-4255-ae9e-61b1a7bb6e2f --key-name ivasilev --user-data ~/projects/artemis/server/configuration/userdata_allow_root
The text was updated successfully, but these errors were encountered:
Having slept on it and retried in the morning - looks like ssh_private_key_file needs to be marked as required, after I added "ssh_private_key_file": "/home/ivasilev/.ssh/id_rsa" that was maching the keypair one I got to running the playbook.
So not really an issue, maximum something worth documenting (and possibly changing Fetching IP for machine massage to something that actually refers to problems during ssh connection).
Feel free to close, thanks!
With v0.2.6 of the plugin and the following template
I am unfortunately hitting an issue with packit never establishing ssh connection.
The image I'm using requires either login as
cloud-user
or passing userdata that would allow root ssh auth. Unfortunately specifyingssh_username: cloud-user
in the template does not cut it and there looks like no option for supplying userdata to be passed to instance create command (based on what https://github.com/ppc64le-cloud/packer-plugin-powervs/blob/main/builder/powervs/builder.hcl2spec.go#L25 has to offer).At the same time one can totally reach the machine as
[email protected]
and there is indeed the proper ssh key in~/.ssh/authorized_keys
(the one specified bykey_pair_name
).The goal is to achieve the same functionality as the ibmcloud pi plugin instance create call:
ibmcloud pi instance create artemis-pi-manual-boot --image rhel-9-6-0-20241209-d-1 --subnets 969ef856-27e9-4255-ae9e-61b1a7bb6e2f --key-name ivasilev --user-data ~/projects/artemis/server/configuration/userdata_allow_root
The text was updated successfully, but these errors were encountered: