Hi all,
Trying to build a template using vsphere-clone and the customize section to get an IP to the vm so it can be updated to latest, but it always fails at the customize step. Is there a way to get more information on the error itself? I’ve checked everywhere but I don’t see many/any examples using vsphere-clone. No specific errors show using PACKER_LOG=1 either, output of command clipped below the customize json. I’ve tried using a bare sysprep.xml file also but same error. Any hints on where to look would be greatly appreciated, or if this is even possible using vsphere-clone builder.
"customize": {
"dns_server_list": [
"xx.xx.xx.xx",
"xx.xx.xx.xx"
],
"ipv4_gateway": "xx.xx.xx.1",
"network_interface": {
"ipv4_address": "xx.xx.xx.74",
"ipv4_netmask": "23"
},
"windows_sysprep_file": "sysprep.xml"
},
2021/11/22 15:55:38 Build debug mode: true
2021/11/22 15:55:38 Force build: false
2021/11/22 15:55:38 On error: ask
2021/11/22 15:55:38 Debug enabled, so waiting for build to finish: Windows2019
2021/11/22 15:55:38 Starting build run: Windows2019
2021/11/22 15:55:38 Running builder: vsphere-clone
2021/11/22 15:55:38 [INFO] (telemetry) Starting builder Windows2019
==> Windows2019: Pausing after run of step ‘StepConnect’. Press enter to continue.
2021/11/22 15:55:40 packer-builder-vsphere-clone plugin: No CD files specified. CD disk will not be made.
==> Windows2019: Pausing after run of step ‘StepCreateCD’. Press enter to continue.
==> Windows2019: Pausing after run of step ‘StepRemoteUpload’. Press enter to continue.
==> Windows2019: Cloning VM…
==> Windows2019: Pausing after run of step ‘StepCloneVM’. Press enter to continue. ==> Windows2019: Customizing hardware…
==> Windows2019: Pausing after run of step ‘StepConfigureHardware’. Press enter to continue.
==> Windows2019: Mounting ISO images…
==> Windows2019: Pausing after run of step ‘StepAddCDRom’. Press enter to continue.
==> Windows2019: Adding configuration parameters…
==> Windows2019: Pausing after run of step ‘StepConfigParams’. Press enter to continue.
==> Windows2019: Customizing VM…
==> Windows2019: Cannot complete customization.
==> Windows2019: Step “StepCustomize” failed
==> Windows2019: [c] Clean up and exit, [a] abort without cleanup, or [r] retry step (build may fail even if retry succeeds)? a
==> Windows2019: Cannot complete customization.
==> Windows2019: Step “StepCustomize” failed, aborting…
==> Windows2019: Pausing before cleanup of step ‘StepConfigParams’. Press enter to continue.
==> Windows2019: aborted: skipping cleanup of step "StepConfigParams"
==> Windows2019: Pausing before cleanup of step ‘StepAddCDRom’. Press enter to continue.
==> Windows2019: aborted: skipping cleanup of step "StepAddCDRom"
==> Windows2019: Pausing before cleanup of step ‘StepConfigureHardware’. Press enter to continue.
==> Windows2019: aborted: skipping cleanup of step "StepConfigureHardware"
==> Windows2019: Pausing before cleanup of step ‘StepCloneVM’. Press enter to continue.
==> Windows2019: aborted: skipping cleanup of step "StepCloneVM"
==> Windows2019: Pausing before cleanup of step ‘StepRemoteUpload’. Press enter to continue.
==> Windows2019: aborted: skipping cleanup of step "StepRemoteUpload"
==> Windows2019: Pausing before cleanup of step ‘StepCreateCD’. Press enter to continue.
==> Windows2019: aborted: skipping cleanup of step "StepCreateCD"
==> Windows2019: Pausing before cleanup of step ‘StepConnect’. Press enter to continue.
==> Windows2019: aborted: skipping cleanup of step "StepConnect"
Build ‘Windows2019’ errored after 21 seconds 21 milliseconds: Cannot complete customization.
2021/11/22 15:55:59 [INFO] (telemetry) ending Windows2019
2021/11/22 15:55:59 Waiting on builds to complete…
==> Wait completed after 21 seconds 21 milliseconds
2021/11/22 15:55:59 machine readable: error-count string{“1”}
==> Some builds didn’t complete successfully and had errors:
2021/11/22 15:55:59 machine readable: Windows2019,error string{“Cannot complete customization.”}
==> Builds finished but no artifacts were created.
2021/11/22 15:55:59 [INFO] (telemetry) Finalizing.
==> Wait completed after 21 seconds 21 milliseconds
==> Some builds didn’t complete successfully and had errors:
→ Windows2019: Cannot complete customization.
==> Builds finished but no artifacts were created.