hashicorp / packer-plugin-vsphere

Packer plugin for VMware vSphere Builder
https://www.packer.io/docs/builders/vsphere
Mozilla Public License 2.0
95 stars 90 forks source link

Packer Crash while using the windows_options in customize block of VSphere-Clone builder #271

Closed pradeepnara99 closed 1 year ago

pradeepnara99 commented 1 year ago

When filing a bug please include the following headings, if possible.

Overview of the Issue

Packer is getting crash while using the windows_options in customize block of VSphere-Clone builder

Reproduction Steps

  1. Use a Windows Server 2019 basic packer template created using VSphere ISO builder
  2. Now, Use a VSphere-Clone builder to create new VM from existing template and add the customizations using customize block as below,

    customize { windows_options { computer_name = "packer-test" }

     network_interface {
       ipv4_address = "10.0.0.10"
       ipv4_netmask = "24"
     }
    
     ipv4_gateway = 10.0.0.1
     dns_server_list = ["10.0.0.18"]

    }

Packer Version

1.8.6

Plugin Version and Builders

Please provide the plugin version.

Packer vpshere-plugin version 1.1.1

Please select the builder.

VMware vSphere Version

Please provide the VMware vSphere version. vSphere Client version 7.0.3.00500

Guest Operating System

Windows Server 2019

Simplified Packer Buildfile

If the file is longer than a few dozen lines, please include the URL to the gist of the log or use the GitHub detailed format instead of posting it directly in the issue.

Operating System and Environment Details

Please add any information you can provide about the environment.

 - Operating System: Windows Server 2019

Log Fragments and crash.log Files

2023-04-21T06:15:36.0283760Z [1;32m==> vsphere-clone.windows-server-standard-dexp: Adding configuration parameters...[0m 2023-04-21T06:15:36.1339303Z 2023/04/21 01:15:36 packer-plugin-vsphere_v1.1.1_x5.0_linux_amd64 plugin: 2023/04/21 01:15:36 Deleting CD disk: /tmp/packer2311441856.iso 2023-04-21T06:15:36.1395897Z [1;31mBuild 'vsphere-clone.windows-server-standard-dexp' errored after 28 seconds 577 milliseconds: unexpected EOF[0m 2023-04-21T06:15:36.1399785Z 2023-04-21T06:15:36.1400397Z ==> Wait completed after 28 seconds 578 milliseconds 2023-04-21T06:15:36.1400683Z 2023-04-21T06:15:36.1401567Z ==> Some builds didn't complete successfully and had errors: 2023-04-21T06:15:36.1402192Z --> vsphere-clone.windows-server-standard-dexp: unexpected EOF 2023-04-21T06:15:36.1402497Z 2023-04-21T06:15:36.1402759Z ==> Builds finished but no artifacts were created. 2023-04-21T06:15:36.1473546Z 2023/04/21 01:15:36 packer-plugin-vsphere_v1.1.1_x5.0_linux_amd64 plugin: panic: runtime error: invalid memory address or nil pointer dereference 2023-04-21T06:15:36.1536734Z 2023/04/21 01:15:36 [WARN] (telemetry) Error finalizing report. This is safe to ignore. Post "https://checkpoint-api.hashicorp.com/v1/telemetry/packer": dial tcp 18.154.219.23:443: connect: connection refused 2023-04-21T06:15:36.1537423Z 2023/04/21 01:15:36 waiting for all plugin processes to complete... 2023-04-21T06:15:36.1537656Z 2023-04-21T06:15:36.1538469Z 2023/04/21 01:15:36 /usr/local/bin/packer-plugin-vsphere_v1.1.1_x5.0_linux_amd64: plugin process exited 2023-04-21T06:15:36.1539187Z 2023/04/21 01:15:36 [INFO] (telemetry) ending vsphere-clone.windows-server-standard-dexp 2023-04-21T06:15:36.1539732Z ==> Wait completed after 28 seconds 578 milliseconds 2023-04-21T06:15:36.1540287Z 2023/04/21 01:15:36 machine readable: error-count []string{"1"} 2023-04-21T06:15:36.1540940Z ==> Some builds didn't complete successfully and had errors: 2023-04-21T06:15:36.1541659Z 2023/04/21 01:15:36 machine readable: vsphere-clone.windows-server-standard-dexp,error []string{"unexpected EOF"} 2023-04-21T06:15:36.1542111Z ==> Builds finished but no artifacts were created. 2023-04-21T06:15:36.1542445Z 2023/04/21 01:15:36 [INFO] (telemetry) Finalizing. 2023-04-21T06:15:36.1543384Z 2023/04/21 01:15:36 [WARN] (telemetry) Error finalizing report. This is safe to ignore. Post "https://checkpoint-api.hashicorp.com/v1/telemetry/packer": dial tcp 18.154.219.23:443: connect: connection refused 2023-04-21T06:15:36.1544067Z 2023/04/21 01:15:36 waiting for all plugin processes to complete... 2023-04-21T06:15:36.1544942Z Failed to report panic. This is safe to ignore: Post "https://checkpoint-api.hashicorp.com/v1/telemetry/packer": dial tcp 18.154.219.39:443: connect: connection refused 2023-04-21T06:15:36.1545393Z 2023-04-21T06:15:36.1545684Z !!!!!!!!!!!!!!!!!!!!!!!!!!! PACKER CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!! Set the env var PACKER_LOG=1 for maximum log detail.

tenthirtyam commented 1 year ago

Duplicate of #269