can you see to the new machine when is created ?

using his user and key?

core
/home/ubuntu/.ssh/id_rsa

?

The ip should be one defined here:

vm_v4address": "xxx.xxx.x.xx",

I fail to see how this boot from iso will create this user, allow login
with this private key and set fixed IP


On Thu, May 27, 2021 at 4:10 PM akhilesh verma <[email protected]>
wrote:

> Hi ,
>
> I am facing below error while creating a new rhcos VM:
>
> 2021/05/27 13:34:37 packer-builder-vsphere-iso plugin: [DEBUG] SSH
> handshake err: ssh: handshake failed: ssh: unable to authenticate,
> attempted methods [none publickey], no supported methods remain
> 2021/05/27 13:34:37 packer-builder-vsphere-iso plugin: [DEBUG] Detected
> authentication error. Increasing handshake attempts.
> ==> vsphere-iso: Error waiting for SSH: Packer experienced an
> authentication error when trying to connect via SSH. This can happen if
> your username/password are wrong. You may want to double-check your
> credentials as part of your debugging process. original error: ssh:
> handshake failed: ssh: unable to authenticate, attempted methods [none
> publickey], no supported methods remain
>
>
>
> here is the input json file:
>
> {
>   "builders": [
>     {
>       "CPUs": "{{user `vm_vcpu`}}",
>       "RAM": "{{user `vm_memory`}}",
>       "boot_command": [
>         "<tab>",
>         "sudo coreos-installer install /dev/sda --ignition-url {{user
> `ocp_url_ign`}} --image-url {{user `ocp_url_image`}} --insecure-ignition",
>         "<wait>",
>         "<enter>",
>         "<wait>"
>       ],
>       "boot_order": "disk,cdrom",
>       "boot_wait": "30s",
>       "cluster": "{{user `vcenter_cluster`}}",
>       "communicator": "ssh",
>       "convert_to_template": false,
>       "datacenter": "{{user `vcenter_datacenter`}}",
>       "datastore": "{{user `vcenter_datastore_vm`}}",
>       "disk_controller_type": "pvscsi",
>       "folder": "{{user `vcenter_folderpath`}}",
>       "guest_os_type": "rhel7_64Guest",
>       "host": "{{ user `vcenter_host`}}",
>       "insecure_connection": "true",
>       "iso_paths": [
>         "[{{user `vcenter_datastore_iso` }}] {{user `vcenter_iso_path` }}"
>       ],
>       "network_adapters": [
>         {
>           "network": "{{user `vm_network`}}",
>           "network_card": "vmxnet3"
>         }
>       ],
>       "password": "{{user `vcenter_password`}}",
>       "shutdown_command": "sudo -S shutdown -P now",
>       "ssh_username": "core",
>       "ssh_private_key_file": "/home/ubuntu/.ssh/id_rsa",
>       "ssh_timeout": "{{user `ssh_timeout`}}",
>       "storage": [
>         {
>           "disk_size": "{{user `vm_disksize`}}",
>           "disk_thin_provisioned": true
>         }
>       ],
>       "type": "vsphere-iso",
>       "username": "{{user `vcenter_username`}}",
>       "vcenter_server": "{{user `vcenter_server`}}",
>       "vm_name": "{{user `ocp_clustername` }}-{{user `ocp_nodename`}}",
>       "vm_version": 13
>        }
>   ],
>   "variables": {
>     "ocp_clustername": "test-ocp",
>     "ocp_domainname": "ocp.lan",
>     "ocp_nodename": "av-bootstrap",
>     "ocp_nodetype": "bootstrap",
>     "ocp_url_ign": "http://xxx.xxx.x.x:8080/ocp4/bootstrap.ign";,
>     "ocp_url_image": "
> http://xxx.xxx.x.xx:8080/ocp4/rhcos-4.6.8-x86_64-metal.x86_64.raw.gz";,
>     "vcenter_cluster": "accloud",
>     "vcenter_datacenter": "Datacenter",
>     "vcenter_datastore_iso": "datastore1",
>     "vcenter_datastore_vm": "datastore1",
>     "vcenter_folderpath": "",
>     "vcenter_host": "xxx.xxx.xx.xx",
>     "vcenter_iso_path": "ISOS/rhcos-4.6.8-x86_64-live.x86_64.iso",
>     "vcenter_password": "xxxxxxxxxxxx",
>     "vcenter_server": "your-server",
>     "vcenter_username": "[email protected]",
>     "vm_disksize": "61440",
>     "vm_memory": "16384",
>     "vm_network": "internal_network",
>     "vm_v4address": "xxx.xxx.x.xx",
>     "vm_v4defaultgw": "xxx.xxx.x.x",
>     "vm_v4dns_server": "xxx.xxx.x.xx",
>     "vm_v4netmask": "255.255.255.0",
>     "ssh_timeout": "180s",
>     "vm_vcpu": "4"
>   }
> }
>
>
> Thanks,
> Akhilesh Verma
>
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
>
> GitHub Issues: https://github.com/hashicorp/packer/issues
> IRC: #packer-tool on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Packer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/packer-tool/22972fe2-b9e9-4023-a2c4-06736ba12ed6n%40googlegroups.com
> <https://groups.google.com/d/msgid/packer-tool/22972fe2-b9e9-4023-a2c4-06736ba12ed6n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Alvaro

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/hashicorp/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/CAHqq0eyOqxXqLRXF1jNZG3A%3Dc2yd4MmgLu48nQSYO5U9mkSFhQ%40mail.gmail.com.

Reply via email to