It can connect via SSH with no problem, but saw here that when it gets to
the provisioning part it's running on the ESXi host not the packer is
creating. Maybe I need to set a static ip for this VM.

{
"variables": {
"environment": "dev",
"release": "stable",
"iso_url": "https://stable.release.flatcar-linux.net/amd64-usr";,
"iso_version": "2605.8.0",
"ssh_pty": "true",
"ssh_host": "redacted",
"ssh_username": "redacted",
"ssh_password": "redacted",
"ssh_port": "22",
"ssh_wait_timeout": "5m",
"ssh_timeout": "10m",
"iso_checksum": "0bbcff5b70ada79e46fc6f761a4d25c5",
"iso_checksum_type": "md5",
"disk_size": "20000",
"memory": "2048",
"cpu": "2",
"boot_wait": "1m",
"headless": "false",
"ignition": "templates/ignition_esxi.json"
},
"builders": [
{
"type": "vmware-iso",
"tools_upload_flavor":"linux",
"vm_name": "VMTEST{{ user `environment` }}",
"vmdk_name": "VMTEST{{ user `environment` }}",
"format": "ova",
"memory": "{{user `memory`}}",
"communicator": "ssh",
"pause_before_connecting": "1m",
"iso_url": "{{ user `iso_url` }}/{{user `iso_version`}}
/flatcar_production_iso_image.iso",
"iso_checksum": "{{ user `iso_checksum` }}",
"output_directory": "artifatcs-esxi/base",
"shutdown_command": "sudo shutdown now",
"disk_size": "{{ user `disk_size` }}",
"boot_wait": "{{ user `boot_wait` }}",
"ssh_host": "{{ user `ssh_host` }}",
"ssh_username": "{{ user `ssh_username` }}",
"ssh_port": "{{ user `ssh_port` }}",
"ssh_password": "{{ user `ssh_password`}}",
"disk_type_id": "thin",
"headless": "{{ user `headless` }}",
"boot_command": [
"sudo echo \"redacted\" > /home/core/.ssh/authorized_keys<enter>",
"sudo chown core:core /home/core/.ssh/authorized_keys<enter>",
"sudo systemctl start sshd.service<enter>"
],
"remote_type": "esx5",
"remote_host": "redacted",
"remote_port": "22",
"remote_datastore": "DataStorage",
"remote_username": "redacted",
"remote_password": "redacted",
"keep_registered": true,
"vnc_port_min": 5900,
"vnc_port_max": 6000,
"vnc_disable_password": true,
"vnc_over_websocket": true,
"insecure_connection": true,
"vmx_data": {
"ethernet0.networkName": "VM Network"
},
"ovftool_options": [
"--noSSLVerify=yes"
]
}
],
"provisioners": [
{
"type": "file",
"source": "{{ user `ignition` }}",
"destination": "/tmp/ignition_esxi.json"
},
{
"type": "shell",
"inline": [
"flatcar-install -d /dev/vda -C {{user `release` }} -i
/tmp/ignition_esxi.json -o vmware_json"
]
}
]
}

On Thu, Feb 4, 2021 at 8:57 AM Gabo Kete <[email protected]> wrote:

> will probably recommend you to change to a simpler password.. like
> uppercase, lowercase and numbers and see if that works.. then add special
> characters..
>
> On Thursday, February 4, 2021 at 12:18:56 PM UTC+1 [email protected]
> wrote:
>
>> Checked and  packer is connecting to the ESXi not be VM I am creating,
>> because I have two shell provisioners one  to copy a config file and the
>> second to set the OS packages. And the config file was copied to the ESXi
>> host not the VM.
>>
>>
>> On Thu, Feb 4, 2021 at 7:42 AM Marc Pires <[email protected]> wrote:
>>
>>> Hi Gabo, yes I can login to ESXi using the ssh_password and ssh_username
>>> values. My password has an @ sign, not sure if it can be a problem. Checking
>>>
>>> On Wed, Feb 3, 2021 at 5:00 PM Gabo Kete <[email protected]> wrote:
>>>
>>>> looks like you access is being rejected when it tries to ssh into the
>>>> vmware... can you look into your json file and find the *ssh_username *
>>>> and* ssh_password  entries *and try to logging into your vmware with
>>>> those values and check if it works
>>>>
>>>> On Tuesday, February 2, 2021 at 8:51:13 PM UTC+1 [email protected]
>>>> wrote:
>>>>
>>>>> Hi everyone, I am building an image and during the build I have the
>>>>> following error below. Any clue of what it can be ?
>>>>>
>>>>> 2021/02/02 16:44:57 packer-builder-vmware-iso plugin: [DEBUG] Opening
>>>>> new ssh session
>>>>> 2021/02/02 16:44:57 packer-builder-vmware-iso plugin: [DEBUG] starting
>>>>> remote command: vim-cmd vmsvc/power.on 221
>>>>> 2021/02/02 16:44:58 packer-builder-vmware-iso plugin: [ERROR] Remote
>>>>> command exited with '1': vim-cmd vmsvc/power.on 221
>>>>> 2021/02/02 16:45:17 packer-builder-vmware-iso plugin: [DEBUG] Opening
>>>>> new ssh session
>>>>> 2021/02/02 16:45:17 packer-builder-vmware-iso plugin: [DEBUG] starting
>>>>> remote command: vim-cmd vmsvc/power.getstate 221
>>>>> 2021/02/02 16:45:18 packer-builder-vmware-iso plugin: [DEBUG] Opening
>>>>> new ssh session
>>>>> ==> vmware-iso: Error starting VM: Retry limit exceeded
>>>>> 2021/02/02 16:45:18 packer-builder-vmware-iso plugin: [DEBUG] starting
>>>>> remote command: vim-cmd vmsvc/power.getstate 221
>>>>> ==> vmware-iso: Destroying virtual machine...
>>>>> 2021/02/02 16:45:18 packer-builder-vmware-iso plugin: [DEBUG] Opening
>>>>> new ssh session
>>>>> 2021/02/02 16:45:18 packer-builder-vmware-iso plugin: [DEBUG] starting
>>>>> remote command: vim-cmd vmsvc/destroy 221
>>>>> 2021/02/02 16:45:19 packer-builder-vmware-iso plugin: [DEBUG] Opening
>>>>> new ssh session
>>>>> 2021/02/02 16:45:19 packer-builder-vmware-iso plugin: [DEBUG] starting
>>>>> remote command: test ! -e "/vmfs/volumes/DataStorage/Appliance2_dev"
>>>>> 2021/02/02 16:45:19 packer-builder-vmware-iso plugin: [DEBUG] Opening
>>>>> new ssh session
>>>>> 2021/02/02 16:45:19 packer-builder-vmware-iso plugin: [DEBUG] starting
>>>>> remote command: test -e "/vmfs/volumes/DataStorage/Appliance2_dev"
>>>>> 2021/02/02 16:45:19 packer-builder-vmware-iso plugin: [ERROR] Remote
>>>>> command exited with '1': test -e 
>>>>> "/vmfs/volumes/DataStorage/Appliance2_dev"
>>>>> 2021/02/02 16:45:19 [INFO] (telemetry) ending vmware-iso
>>>>> ==> Wait completed after 3 minutes 44 seconds
>>>>> 2021/02/02 16:45:19 machine readable: error-count []string{"1"}
>>>>> ==> Some builds didn't complete successfully and had errors:
>>>>> 2021/02/02 16:45:19 machine readable: vmware-iso,error []string{"Error
>>>>> starting VM: Retry limit exceeded"}
>>>>> ==> Builds finished but no artifacts were created.
>>>>> 2021/02/02 16:45:19 [INFO] (telemetry) Finalizing.
>>>>> Build 'vmware-iso' errored after 3 minutes 44 seconds: Error starting
>>>>> VM: Retry limit exceeded
>>>>>
>>>> --
>>>> 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 a topic in the
>>>> Google Groups "Packer" group.
>>>> To unsubscribe from this topic, visit
>>>> https://groups.google.com/d/topic/packer-tool/2UxaWvpjbCs/unsubscribe.
>>>> To unsubscribe from this group and all its topics, send an email to
>>>> [email protected].
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/packer-tool/4071302d-8f6b-4cbf-ab0c-f6d5bf0bc842n%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/packer-tool/4071302d-8f6b-4cbf-ab0c-f6d5bf0bc842n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>
>>>
>>> --
>>> Desenvolvedor/DevOps practitioner
>>>
>>> https://www.credential.net/5yi8wpmv
>>>
>>
>>
>> --
>> Desenvolvedor/DevOps practitioner
>>
>> https://www.credential.net/5yi8wpmv
>>
> --
> 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 a topic in the
> Google Groups "Packer" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/packer-tool/2UxaWvpjbCs/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/packer-tool/14e0d4bb-04d8-4805-8ccc-f20639db2384n%40googlegroups.com
> <https://groups.google.com/d/msgid/packer-tool/14e0d4bb-04d8-4805-8ccc-f20639db2384n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Desenvolvedor/DevOps practitioner

https://www.credential.net/5yi8wpmv

-- 
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/CAGokDNi9f5Pyvv0PPdoVaty3oeU%3DXND_3fa_9P6Wj-rrktaK%2Bw%40mail.gmail.com.

Reply via email to