packer-plugin-windows-update
packer-plugin-windows-update copied to clipboard
Updates silently failing
I'm using the latest version (0.7.1) along with Packer 1.4.0. I'm using the vanilla provisioner:
{ "type": "windows-update" }
The log output, below, shows it executed the PowerShell command and got an exit code 0, but no updates happened and the provisioning process moved on. In comparing with other outputs posted here, I notice the "searching for updates" is missing.
After the image completed, I created a VM from it and it took quite a while for the new VM to identify updates, including the massive May 2019 rollup--it did not get applied as part of the Packer build (I hoped it would do the update).
Is there a flag or something I should be passing to tell it to wait for the download and install of the updates? I'm hoping I'm just missing something simple...
==> vsphere-iso: Running Windows update...
2019/05/15 00:01:40 packer-builder-vsphere-iso.linux: <Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04"><Obj S="progress" RefId="0"><TN RefId="0"><T>System.Management.Automation.PSCustomObject</T><T>System.Object</T></TN><MS><I64 N="SourceId">1</I64><PR N="Record"><AV>Preparing modules for first use.</AV><AI>0</AI><Nil /><PI>-1</PI><PC>-1</PC><T>Completed</T><SR>-1</SR><SD> </SD></PR></MS></Obj></Objs>2019/05/15 00:01:40 [INFO] starting remote command: PowerShell -ExecutionPolicy Bypass -OutputFormat Text -File C:/Windows/Temp/packer-windows-update-elevated.ps1
vsphere-iso: Waiting for the Windows Modules Installer to exit...
2019/05/15 00:02:16 packer-builder-vsphere-iso.linux: 2019/05/15 00:02:16 [INFO] command 'PowerShell -ExecutionPolicy Bypass -OutputFormat Text -File C:/Windows/Temp/packer-windows-update-elevated.ps1' exited with code: 0
2019/05/15 00:02:16 [INFO] 54 bytes written for 'stdout'
2019/05/15 00:02:16 [INFO] 0 bytes written for 'stderr'
2019/05/15 00:02:16 [INFO] RPC client: Communicator ended with: 0
2019/05/15 00:02:16 [INFO] RPC endpoint: Communicator ended with: 0
2019/05/15 00:02:16 packer-builder-vsphere-iso.linux: 2019/05/15 00:02:16 [INFO] RPC endpoint: Communicator ended with: 0
2019/05/15 00:02:16 packer-provisioner-windows-update: 2019/05/15 00:02:16 [INFO] 54 bytes written for 'stdout'
2019/05/15 00:02:16 packer-provisioner-windows-update: 2019/05/15 00:02:16 [INFO] 0 bytes written for 'stderr'
2019/05/15 00:02:16 packer-provisioner-windows-update: 2019/05/15 00:02:16 [INFO] RPC client: Communicator ended with: 0
2019/05/15 00:02:16 [INFO] (telemetry) ending windows-update
Forgot to add: Packer host is Linux (RHEL7) and target is Windows 2016
I reverted to 0.7.0 and it seems to be working now.
Output when using 0.7.0:
==> vsphere-iso: Running Windows update...
2019/05/15 18:05:17 packer-builder-vsphere-iso.linux: <Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04"><Obj S="progress" RefId="0"><TN RefId="0"><T>System.Management.Automation.PSCustomObject</T><T>System.Object</T></TN><MS><I64 N="SourceId">1</I64><PR N="Record"><AV>Preparing modules for first use.</AV><AI>0</AI><Nil /><PI>-1</PI><PC>-1</PC><T>Completed</T><SR>-1</SR><SD> </SD></PR></MS></Obj></Objs>2019/05/15 18:05:17 [INFO] starting remote command: PowerShell -ExecutionPolicy Bypass -OutputFormat Text -File C:/Windows/Temp/packer-windows-update-elevated.ps1
vsphere-iso: Waiting for the Windows Modules Installer to exit...
2019/05/15 18:07:36 packer-builder-vsphere-iso.linux: 2019/05/15 18:07:36 [INFO] command 'PowerShell -ExecutionPolicy Bypass -OutputFormat Text -File C:/Windows/Temp/packer-windows-update-elevated.ps1' exited with code: 101
2019/05/15 18:07:36 [INFO] 54 bytes written for 'stdout'
2019/05/15 18:07:36 packer-builder-vsphere-iso.linux: 2019/05/15 18:07:36 [INFO] RPC endpoint: Communicator ended with: 101
2019/05/15 18:07:36 [INFO] 0 bytes written for 'stderr'
2019/05/15 18:07:36 [INFO] RPC client: Communicator ended with: 101
2019/05/15 18:07:36 [INFO] RPC endpoint: Communicator ended with: 101
2019/05/15 18:07:36 packer-provisioner-windows-update: 2019/05/15 18:07:36 [INFO] 54 bytes written for 'stdout'
2019/05/15 18:07:36 packer-provisioner-windows-update: 2019/05/15 18:07:36 [INFO] 0 bytes written for 'stderr'
2019/05/15 18:07:36 packer-provisioner-windows-update: 2019/05/15 18:07:36 [INFO] RPC client: Communicator ended with: 101
==> vsphere-iso: Restarting the machine...
2019/05/15 18:07:36 packer-builder-vsphere-iso.linux: 2019/05/15 18:07:36 [INFO] starting remote command: shutdown.exe -f -r -t 0 -c "packer restart"
2019/05/15 18:07:36 packer-builder-vsphere-iso.linux: 2019/05/15 18:07:36 [INFO] command 'shutdown.exe -f -r -t 0 -c "packer restart"' exited with code: 0
2019/05/15 18:07:36 [INFO] 0 bytes written for 'stdout'
2019/05/15 18:07:36 [INFO] 0 bytes written for 'stderr'
2019/05/15 18:07:36 [INFO] RPC client: Communicator ended with: 0
2019/05/15 18:07:36 [INFO] RPC endpoint: Communicator ended with: 0
2019/05/15 18:07:36 packer-builder-vsphere-iso.linux: 2019/05/15 18:07:36 [INFO] RPC endpoint: Communicator ended with: 0
2019/05/15 18:07:36 packer-provisioner-windows-update: 2019/05/15 18:07:36 [INFO] 0 bytes written for 'stdout'
2019/05/15 18:07:36 packer-provisioner-windows-update: 2019/05/15 18:07:36 [INFO] 0 bytes written for 'stderr'
2019/05/15 18:07:36 packer-provisioner-windows-update: 2019/05/15 18:07:36 [INFO] RPC client: Communicator ended with: 0
==> vsphere-iso: Waiting for machine to become available...
2019/05/15 18:07:36 packer-builder-vsphere-iso.linux: 2019/05/15 18:07:36 [INFO] starting remote command: shutdown.exe -f -r -t 60 -c "packer restart test"
2019/05/15 18:07:36 packer-builder-vsphere-iso.linux: 2019/05/15 18:07:36 [INFO] command 'shutdown.exe -f -r -t 60 -c "packer restart test"' exited with code: 1115
2019/05/15 18:07:36 packer-builder-vsphere-iso.linux: 2019/05/15 18:07:36 [INFO] RPC endpoint: Communicator ended with: 1115
2019/05/15 18:07:36 [INFO] 0 bytes written for 'stdout'
2019/05/15 18:07:36 [INFO] 40 bytes written for 'stderr'
2019/05/15 18:07:36 [INFO] RPC client: Communicator ended with: 1115
2019/05/15 18:07:36 [INFO] RPC endpoint: Communicator ended with: 1115
2019/05/15 18:07:36 packer-provisioner-windows-update: 2019/05/15 18:07:36 [INFO] 0 bytes written for 'stdout'
2019/05/15 18:07:36 packer-provisioner-windows-update: 2019/05/15 18:07:36 [INFO] 40 bytes written for 'stderr'
2019/05/15 18:07:36 packer-provisioner-windows-update: 2019/05/15 18:07:36 [INFO] RPC client: Communicator ended with: 1115
2019/05/15 18:07:36 packer-provisioner-windows-update: 2019/05/15 18:07:36 Retryable error: Machine not yet available (exit status 1115)
2019/05/15 18:07:36 ui error: ==> vsphere-iso: A system shutdown is in progress.(1115)
==> vsphere-iso: A system shutdown is in progress.(1115)
2019/05/15 18:07:41 packer-builder-vsphere-iso.linux: 2019/05/15 18:07:41 [INFO] starting remote command: shutdown.exe -f -r -t 60 -c "packer restart test"
2019/05/15 18:07:41 packer-builder-vsphere-iso.linux: 2019/05/15 18:07:41 [INFO] command 'shutdown.exe -f -r -t 60 -c "packer restart test"' exited with code: 1115
2019/05/15 18:07:41 packer-builder-vsphere-iso.linux: 2019/05/15 18:07:41 [INFO] RPC endpoint: Communicator ended with: 1115
2019/05/15 18:07:41 [INFO] 0 bytes written for 'stdout'
2019/05/15 18:07:41 [INFO] 40 bytes written for 'stderr'
2019/05/15 18:07:41 [INFO] RPC client: Communicator ended with: 1115
2019/05/15 18:07:41 [INFO] RPC endpoint: Communicator ended with: 1115
2019/05/15 18:07:41 packer-provisioner-windows-update: 2019/05/15 18:07:41 [INFO] 0 bytes written for 'stdout'
2019/05/15 18:07:41 packer-provisioner-windows-update: 2019/05/15 18:07:41 [INFO] 40 bytes written for 'stderr'
2019/05/15 18:07:41 packer-provisioner-windows-update: 2019/05/15 18:07:41 [INFO] RPC client: Communicator ended with: 1115
2019/05/15 18:07:41 packer-provisioner-windows-update: 2019/05/15 18:07:41 Retryable error: Machine not yet available (exit status 1115)
==> vsphere-iso: A system shutdown is in progress.(1115)
2019/05/15 18:07:41 ui error: ==> vsphere-iso: A system shutdown is in progress.(1115)
2019/05/15 18:07:46 packer-builder-vsphere-iso.linux: 2019/05/15 18:07:46 [INFO] starting remote command: shutdown.exe -f -r -t 60 -c "packer restart test"
2019/05/15 18:07:46 packer-builder-vsphere-iso.linux: 2019/05/15 18:07:46 [INFO] command 'shutdown.exe -f -r -t 60 -c "packer restart test"' exited with code: 1115
2019/05/15 18:07:46 packer-builder-vsphere-iso.linux: 2019/05/15 18:07:46 [INFO] RPC endpoint: Communicator ended with: 1115
2019/05/15 18:07:46 [INFO] 0 bytes written for 'stdout'
2019/05/15 18:07:46 [INFO] 40 bytes written for 'stderr'
2019/05/15 18:07:46 [INFO] RPC client: Communicator ended with: 1115
2019/05/15 18:07:46 [INFO] RPC endpoint: Communicator ended with: 1115
2019/05/15 18:07:46 packer-provisioner-windows-update: 2019/05/15 18:07:46 [INFO] 0 bytes written for 'stdout'
2019/05/15 18:07:46 packer-provisioner-windows-update: 2019/05/15 18:07:46 [INFO] 40 bytes written for 'stderr'
2019/05/15 18:07:46 packer-provisioner-windows-update: 2019/05/15 18:07:46 [INFO] RPC client: Communicator ended with: 1115
2019/05/15 18:07:46 packer-provisioner-windows-update: 2019/05/15 18:07:46 Retryable error: Machine not yet available (exit status 1115)
2019/05/15 18:07:46 ui error: ==> vsphere-iso: A system shutdown is in progress.(1115)
==> vsphere-iso: A system shutdown is in progress.(1115)
2019/05/15 18:07:51 packer-builder-vsphere-iso.linux: 2019/05/15 18:07:51 [INFO] starting remote command: shutdown.exe -f -r -t 60 -c "packer restart test"
2019/05/15 18:07:51 packer-builder-vsphere-iso.linux: 2019/05/15 18:07:51 [INFO] command 'shutdown.exe -f -r -t 60 -c "packer restart test"' exited with code: 1115
2019/05/15 18:07:51 packer-builder-vsphere-iso.linux: 2019/05/15 18:07:51 [INFO] RPC endpoint: Communicator ended with: 1115
2019/05/15 18:07:51 [INFO] 0 bytes written for 'stdout'
2019/05/15 18:07:51 [INFO] 40 bytes written for 'stderr'
2019/05/15 18:07:51 [INFO] RPC client: Communicator ended with: 1115
2019/05/15 18:07:51 [INFO] RPC endpoint: Communicator ended with: 1115
==> vsphere-iso: A system shutdown is in progress.(1115)
2019/05/15 18:07:51 packer-provisioner-windows-update: 2019/05/15 18:07:51 [INFO] 0 bytes written for 'stdout'
2019/05/15 18:07:51 packer-provisioner-windows-update: 2019/05/15 18:07:51 [INFO] 40 bytes written for 'stderr'
2019/05/15 18:07:51 packer-provisioner-windows-update: 2019/05/15 18:07:51 [INFO] RPC client: Communicator ended with: 1115
2019/05/15 18:07:51 packer-provisioner-windows-update: 2019/05/15 18:07:51 Retryable error: Machine not yet available (exit status 1115)
2019/05/15 18:07:51 ui error: ==> vsphere-iso: A system shutdown is in progress.(1115)
2019/05/15 18:07:56 packer-builder-vsphere-iso.linux: 2019/05/15 18:07:56 [INFO] starting remote command: shutdown.exe -f -r -t 60 -c "packer restart test"
2019/05/15 18:07:56 packer-builder-vsphere-iso.linux: 2019/05/15 18:07:56 [INFO] command 'shutdown.exe -f -r -t 60 -c "packer restart test"' exited with code: 1115
2019/05/15 18:07:56 packer-builder-vsphere-iso.linux: 2019/05/15 18:07:56 [INFO] RPC endpoint: Communicator ended with: 1115
2019/05/15 18:07:56 [INFO] 0 bytes written for 'stdout'
2019/05/15 18:07:56 [INFO] 40 bytes written for 'stderr'
2019/05/15 18:07:56 [INFO] RPC client: Communicator ended with: 1115
2019/05/15 18:07:56 [INFO] RPC endpoint: Communicator ended with: 1115
==> vsphere-iso: A system shutdown is in progress.(1115)
2019/05/15 18:07:56 packer-provisioner-windows-update: 2019/05/15 18:07:56 [INFO] 0 bytes written for 'stdout'
2019/05/15 18:07:56 packer-provisioner-windows-update: 2019/05/15 18:07:56 [INFO] 40 bytes written for 'stderr'
2019/05/15 18:07:56 packer-provisioner-windows-update: 2019/05/15 18:07:56 [INFO] RPC client: Communicator ended with: 1115
2019/05/15 18:07:56 packer-provisioner-windows-update: 2019/05/15 18:07:56 Retryable error: Machine not yet available (exit status 1115)
2019/05/15 18:07:56 ui error: ==> vsphere-iso: A system shutdown is in progress.(1115)
2019/05/15 18:08:01 packer-builder-vsphere-iso.linux: 2019/05/15 18:08:01 [INFO] starting remote command: shutdown.exe -f -r -t 60 -c "packer restart test"
2019/05/15 18:08:02 packer-builder-vsphere-iso.linux: 2019/05/15 18:08:02 [INFO] command 'shutdown.exe -f -r -t 60 -c "packer restart test"' exited with code: 1115
2019/05/15 18:08:02 packer-builder-vsphere-iso.linux: 2019/05/15 18:08:02 [INFO] RPC endpoint: Communicator ended with: 1115
2019/05/15 18:08:02 [INFO] 0 bytes written for 'stdout'
2019/05/15 18:08:02 [INFO] 40 bytes written for 'stderr'
2019/05/15 18:08:02 [INFO] RPC client: Communicator ended with: 1115
2019/05/15 18:08:02 [INFO] RPC endpoint: Communicator ended with: 1115
2019/05/15 18:08:02 packer-provisioner-windows-update: 2019/05/15 18:08:02 [INFO] 0 bytes written for 'stdout'
2019/05/15 18:08:02 packer-provisioner-windows-update: 2019/05/15 18:08:02 [INFO] 40 bytes written for 'stderr'
2019/05/15 18:08:02 packer-provisioner-windows-update: 2019/05/15 18:08:02 [INFO] RPC client: Communicator ended with: 1115
2019/05/15 18:08:02 packer-provisioner-windows-update: 2019/05/15 18:08:02 Retryable error: Machine not yet available (exit status 1115)
==> vsphere-iso: A system shutdown is in progress.(1115)
2019/05/15 18:08:02 ui error: ==> vsphere-iso: A system shutdown is in progress.(1115)
2019/05/15 18:08:07 packer-builder-vsphere-iso.linux: 2019/05/15 18:08:07 [INFO] starting remote command: shutdown.exe -f -r -t 60 -c "packer restart test"
2019/05/15 18:08:07 packer-builder-vsphere-iso.linux: 2019/05/15 18:08:07 [INFO] command 'shutdown.exe -f -r -t 60 -c "packer restart test"' exited with code: 1115
2019/05/15 18:08:07 packer-builder-vsphere-iso.linux: 2019/05/15 18:08:07 [INFO] RPC endpoint: Communicator ended with: 1115
2019/05/15 18:08:07 [INFO] 0 bytes written for 'stdout'
2019/05/15 18:08:07 [INFO] 40 bytes written for 'stderr'
2019/05/15 18:08:07 [INFO] RPC client: Communicator ended with: 1115
2019/05/15 18:08:07 [INFO] RPC endpoint: Communicator ended with: 1115
2019/05/15 18:08:07 packer-provisioner-windows-update: 2019/05/15 18:08:07 [INFO] 0 bytes written for 'stdout'
2019/05/15 18:08:07 packer-provisioner-windows-update: 2019/05/15 18:08:07 [INFO] 40 bytes written for 'stderr'
2019/05/15 18:08:07 packer-provisioner-windows-update: 2019/05/15 18:08:07 [INFO] RPC client: Communicator ended with: 1115
2019/05/15 18:08:07 packer-provisioner-windows-update: 2019/05/15 18:08:07 Retryable error: Machine not yet available (exit status 1115)
==> vsphere-iso: A system shutdown is in progress.(1115)
2019/05/15 18:08:07 ui error: ==> vsphere-iso: A system shutdown is in progress.(1115)
2019/05/15 18:08:12 packer-builder-vsphere-iso.linux: 2019/05/15 18:08:12 [INFO] starting remote command: shutdown.exe -f -r -t 60 -c "packer restart test"
2019/05/15 18:08:12 packer-builder-vsphere-iso.linux: 2019/05/15 18:08:12 [INFO] command 'shutdown.exe -f -r -t 60 -c "packer restart test"' exited with code: 1115
2019/05/15 18:08:12 [INFO] 0 bytes written for 'stdout'
2019/05/15 18:08:12 [INFO] 40 bytes written for 'stderr'
2019/05/15 18:08:12 [INFO] RPC client: Communicator ended with: 1115
2019/05/15 18:08:12 [INFO] RPC endpoint: Communicator ended with: 1115
2019/05/15 18:08:12 packer-builder-vsphere-iso.linux: 2019/05/15 18:08:12 [INFO] RPC endpoint: Communicator ended with: 1115
==> vsphere-iso: A system shutdown is in progress.(1115)
2019/05/15 18:08:12 packer-provisioner-windows-update: 2019/05/15 18:08:12 [INFO] 0 bytes written for 'stdout'
2019/05/15 18:08:12 packer-provisioner-windows-update: 2019/05/15 18:08:12 [INFO] 40 bytes written for 'stderr'
2019/05/15 18:08:12 ui error: ==> vsphere-iso: A system shutdown is in progress.(1115)
2019/05/15 18:08:12 packer-provisioner-windows-update: 2019/05/15 18:08:12 [INFO] RPC client: Communicator ended with: 1115
2019/05/15 18:08:12 packer-provisioner-windows-update: 2019/05/15 18:08:12 Retryable error: Machine not yet available (exit status 1115)
2019/05/15 18:08:17 packer-builder-vsphere-iso.linux: 2019/05/15 18:08:17 [INFO] starting remote command: shutdown.exe -f -r -t 60 -c "packer restart test"
2019/05/15 18:08:17 packer-builder-vsphere-iso.linux: 2019/05/15 18:08:17 [INFO] command 'shutdown.exe -f -r -t 60 -c "packer restart test"' exited with code: 1115
2019/05/15 18:08:17 packer-builder-vsphere-iso.linux: 2019/05/15 18:08:17 [INFO] RPC endpoint: Communicator ended with: 1115
2019/05/15 18:08:17 [INFO] 0 bytes written for 'stdout'
2019/05/15 18:08:17 [INFO] 40 bytes written for 'stderr'
2019/05/15 18:08:17 [INFO] RPC client: Communicator ended with: 1115
2019/05/15 18:08:17 [INFO] RPC endpoint: Communicator ended with: 1115
2019/05/15 18:08:17 packer-provisioner-windows-update: 2019/05/15 18:08:17 [INFO] 0 bytes written for 'stdout'
2019/05/15 18:08:17 packer-provisioner-windows-update: 2019/05/15 18:08:17 [INFO] 40 bytes written for 'stderr'
2019/05/15 18:08:17 packer-provisioner-windows-update: 2019/05/15 18:08:17 [INFO] RPC client: Communicator ended with: 1115
2019/05/15 18:08:17 packer-provisioner-windows-update: 2019/05/15 18:08:17 Retryable error: Machine not yet available (exit status 1115)
2019/05/15 18:08:17 ui error: ==> vsphere-iso: A system shutdown is in progress.(1115)
==> vsphere-iso: A system shutdown is in progress.(1115)
2019/05/15 18:08:22 packer-builder-vsphere-iso.linux: 2019/05/15 18:08:22 [INFO] starting remote command: shutdown.exe -f -r -t 60 -c "packer restart test"
2019/05/15 18:08:22 packer-builder-vsphere-iso.linux: 2019/05/15 18:08:22 [INFO] command 'shutdown.exe -f -r -t 60 -c "packer restart test"' exited with code: 1115
2019/05/15 18:08:22 [INFO] 0 bytes written for 'stdout'
2019/05/15 18:08:22 packer-builder-vsphere-iso.linux: 2019/05/15 18:08:22 [INFO] RPC endpoint: Communicator ended with: 1115
2019/05/15 18:08:22 [INFO] 40 bytes written for 'stderr'
2019/05/15 18:08:22 [INFO] RPC client: Communicator ended with: 1115
2019/05/15 18:08:22 [INFO] RPC endpoint: Communicator ended with: 1115
2019/05/15 18:08:22 packer-provisioner-windows-update: 2019/05/15 18:08:22 [INFO] 0 bytes written for 'stdout'
2019/05/15 18:08:22 packer-provisioner-windows-update: 2019/05/15 18:08:22 [INFO] 40 bytes written for 'stderr'
2019/05/15 18:08:22 ui error: ==> vsphere-iso: A system shutdown is in progress.(1115)
2019/05/15 18:08:22 packer-provisioner-windows-update: 2019/05/15 18:08:22 [INFO] RPC client: Communicator ended with: 1115
2019/05/15 18:08:22 packer-provisioner-windows-update: 2019/05/15 18:08:22 Retryable error: Machine not yet available (exit status 1115)
==> vsphere-iso: A system shutdown is in progress.(1115)
2019/05/15 18:08:27 packer-builder-vsphere-iso.linux: 2019/05/15 18:08:27 [INFO] starting remote command: shutdown.exe -f -r -t 60 -c "packer restart test"
2019/05/15 18:08:27 packer-builder-vsphere-iso.linux: 2019/05/15 18:08:27 [INFO] command 'shutdown.exe -f -r -t 60 -c "packer restart test"' exited with code: 1115
2019/05/15 18:08:27 [INFO] 0 bytes written for 'stdout'
2019/05/15 18:08:27 [INFO] 40 bytes written for 'stderr'
2019/05/15 18:08:27 packer-builder-vsphere-iso.linux: 2019/05/15 18:08:27 [INFO] RPC endpoint: Communicator ended with: 1115
2019/05/15 18:08:27 [INFO] RPC client: Communicator ended with: 1115
2019/05/15 18:08:27 [INFO] RPC endpoint: Communicator ended with: 1115
==> vsphere-iso: A system shutdown is in progress.(1115)
2019/05/15 18:08:27 packer-provisioner-windows-update: 2019/05/15 18:08:27 [INFO] 0 bytes written for 'stdout'
2019/05/15 18:08:27 packer-provisioner-windows-update: 2019/05/15 18:08:27 [INFO] 40 bytes written for 'stderr'
2019/05/15 18:08:27 packer-provisioner-windows-update: 2019/05/15 18:08:27 [INFO] RPC client: Communicator ended with: 1115
2019/05/15 18:08:27 packer-provisioner-windows-update: 2019/05/15 18:08:27 Retryable error: Machine not yet available (exit status 1115)
2019/05/15 18:08:27 ui error: ==> vsphere-iso: A system shutdown is in progress.(1115)
2019/05/15 18:08:32 packer-builder-vsphere-iso.linux: 2019/05/15 18:08:32 [INFO] starting remote command: shutdown.exe -f -r -t 60 -c "packer restart test"
2019/05/15 18:08:32 packer-builder-vsphere-iso.linux: 2019/05/15 18:08:32 [INFO] command 'shutdown.exe -f -r -t 60 -c "packer restart test"' exited with code: 1115
2019/05/15 18:08:32 packer-builder-vsphere-iso.linux: 2019/05/15 18:08:32 [INFO] RPC endpoint: Communicator ended with: 1115
2019/05/15 18:08:32 [INFO] 0 bytes written for 'stdout'
2019/05/15 18:08:32 [INFO] 40 bytes written for 'stderr'
2019/05/15 18:08:32 [INFO] RPC client: Communicator ended with: 1115
2019/05/15 18:08:32 [INFO] RPC endpoint: Communicator ended with: 1115
2019/05/15 18:08:32 packer-provisioner-windows-update: 2019/05/15 18:08:32 [INFO] 0 bytes written for 'stdout'
2019/05/15 18:08:32 packer-provisioner-windows-update: 2019/05/15 18:08:32 [INFO] 40 bytes written for 'stderr'
2019/05/15 18:08:32 packer-provisioner-windows-update: 2019/05/15 18:08:32 [INFO] RPC client: Communicator ended with: 1115
2019/05/15 18:08:32 packer-provisioner-windows-update: 2019/05/15 18:08:32 Retryable error: Machine not yet available (exit status 1115)
2019/05/15 18:08:32 ui error: ==> vsphere-iso: A system shutdown is in progress.(1115)
==> vsphere-iso: A system shutdown is in progress.(1115)
2019/05/15 18:08:37 packer-builder-vsphere-iso.linux: 2019/05/15 18:08:37 [INFO] starting remote command: shutdown.exe -f -r -t 60 -c "packer restart test"
2019/05/15 18:08:37 packer-builder-vsphere-iso.linux: 2019/05/15 18:08:37 [INFO] command 'shutdown.exe -f -r -t 60 -c "packer restart test"' exited with code: 1115
2019/05/15 18:08:37 [INFO] 0 bytes written for 'stdout'
2019/05/15 18:08:37 [INFO] 40 bytes written for 'stderr'
2019/05/15 18:08:37 [INFO] RPC client: Communicator ended with: 1115
2019/05/15 18:08:37 [INFO] RPC endpoint: Communicator ended with: 1115
2019/05/15 18:08:37 packer-builder-vsphere-iso.linux: 2019/05/15 18:08:37 [INFO] RPC endpoint: Communicator ended with: 1115
2019/05/15 18:08:37 packer-provisioner-windows-update: 2019/05/15 18:08:37 [INFO] 0 bytes written for 'stdout'
2019/05/15 18:08:37 packer-provisioner-windows-update: 2019/05/15 18:08:37 [INFO] 40 bytes written for 'stderr'
2019/05/15 18:08:37 packer-provisioner-windows-update: 2019/05/15 18:08:37 [INFO] RPC client: Communicator ended with: 1115
2019/05/15 18:08:37 packer-provisioner-windows-update: 2019/05/15 18:08:37 Retryable error: Machine not yet available (exit status 1115)
2019/05/15 18:08:37 ui error: ==> vsphere-iso: A system shutdown is in progress.(1115)
==> vsphere-iso: A system shutdown is in progress.(1115)
2019/05/15 18:08:42 packer-builder-vsphere-iso.linux: 2019/05/15 18:08:42 [INFO] starting remote command: shutdown.exe -f -r -t 60 -c "packer restart test"
2019/05/15 18:08:42 packer-builder-vsphere-iso.linux: 2019/05/15 18:08:42 [INFO] command 'shutdown.exe -f -r -t 60 -c "packer restart test"' exited with code: 1115
2019/05/15 18:08:42 [INFO] 0 bytes written for 'stdout'
2019/05/15 18:08:42 [INFO] 40 bytes written for 'stderr'
2019/05/15 18:08:42 [INFO] RPC client: Communicator ended with: 1115
2019/05/15 18:08:42 [INFO] RPC endpoint: Communicator ended with: 1115
2019/05/15 18:08:42 packer-builder-vsphere-iso.linux: 2019/05/15 18:08:42 [INFO] RPC endpoint: Communicator ended with: 1115
2019/05/15 18:08:42 packer-provisioner-windows-update: 2019/05/15 18:08:42 [INFO] 0 bytes written for 'stdout'
2019/05/15 18:08:42 packer-provisioner-windows-update: 2019/05/15 18:08:42 [INFO] 40 bytes written for 'stderr'
2019/05/15 18:08:42 packer-provisioner-windows-update: 2019/05/15 18:08:42 [INFO] RPC client: Communicator ended with: 1115
2019/05/15 18:08:42 packer-provisioner-windows-update: 2019/05/15 18:08:42 Retryable error: Machine not yet available (exit status 1115)
==> vsphere-iso: A system shutdown is in progress.(1115)
2019/05/15 18:08:42 ui error: ==> vsphere-iso: A system shutdown is in progress.(1115)
2019/05/15 18:08:48 packer-builder-vsphere-iso.linux: 2019/05/15 18:08:48 [INFO] starting remote command: shutdown.exe -f -r -t 60 -c "packer restart test"
2019/05/15 18:08:48 packer-builder-vsphere-iso.linux: 2019/05/15 18:08:48 [INFO] command 'shutdown.exe -f -r -t 60 -c "packer restart test"' exited with code: 1115
2019/05/15 18:08:48 packer-builder-vsphere-iso.linux: 2019/05/15 18:08:48 [INFO] RPC endpoint: Communicator ended with: 1115
2019/05/15 18:08:48 [INFO] 0 bytes written for 'stdout'
2019/05/15 18:08:48 [INFO] 40 bytes written for 'stderr'
2019/05/15 18:08:48 [INFO] RPC client: Communicator ended with: 1115
2019/05/15 18:08:48 [INFO] RPC endpoint: Communicator ended with: 1115
2019/05/15 18:08:48 packer-provisioner-windows-update: 2019/05/15 18:08:48 [INFO] 0 bytes written for 'stdout'
2019/05/15 18:08:48 packer-provisioner-windows-update: 2019/05/15 18:08:48 [INFO] 40 bytes written for 'stderr'
2019/05/15 18:08:48 packer-provisioner-windows-update: 2019/05/15 18:08:48 [INFO] RPC client: Communicator ended with: 1115
2019/05/15 18:08:48 packer-provisioner-windows-update: 2019/05/15 18:08:48 Retryable error: Machine not yet available (exit status 1115)
==> vsphere-iso: A system shutdown is in progress.(1115)
2019/05/15 18:08:48 ui error: ==> vsphere-iso: A system shutdown is in progress.(1115)
2019/05/15 18:08:53 [INFO] 0 bytes written for 'stdout'
2019/05/15 18:08:53 [INFO] 0 bytes written for 'stderr'
2019/05/15 18:08:53 packer-provisioner-windows-update: 2019/05/15 18:08:53 [INFO] 0 bytes written for 'stdout'
2019/05/15 18:08:53 packer-provisioner-windows-update: 2019/05/15 18:08:53 Retryable error: unknown error Post https://172.17.208.230:5986/wsman: dial tcp 172.17.208.230:5986: connect: connection refused
2019/05/15 18:08:53 packer-provisioner-windows-update: 2019/05/15 18:08:53 [INFO] 0 bytes written for 'stderr'
2019/05/15 18:09:13 packer-builder-vsphere-iso.linux: 2019/05/15 18:09:13 [INFO] starting remote command: shutdown.exe -f -r -t 60 -c "packer restart test"
2019/05/15 18:09:13 packer-builder-vsphere-iso.linux: 2019/05/15 18:09:13 [INFO] command 'shutdown.exe -f -r -t 60 -c "packer restart test"' exited with code: 0
2019/05/15 18:09:13 [INFO] 0 bytes written for 'stdout'
2019/05/15 18:09:13 [INFO] 0 bytes written for 'stderr'
2019/05/15 18:09:13 [INFO] RPC client: Communicator ended with: 0
2019/05/15 18:09:13 [INFO] RPC endpoint: Communicator ended with: 0
2019/05/15 18:09:13 packer-builder-vsphere-iso.linux: 2019/05/15 18:09:13 [INFO] RPC endpoint: Communicator ended with: 0
2019/05/15 18:09:13 packer-provisioner-windows-update: 2019/05/15 18:09:13 [INFO] 0 bytes written for 'stdout'
2019/05/15 18:09:13 packer-provisioner-windows-update: 2019/05/15 18:09:13 [INFO] 0 bytes written for 'stderr'
2019/05/15 18:09:13 packer-provisioner-windows-update: 2019/05/15 18:09:13 [INFO] RPC client: Communicator ended with: 0
2019/05/15 18:09:13 packer-builder-vsphere-iso.linux: 2019/05/15 18:09:13 [INFO] starting remote command: shutdown.exe -a
2019/05/15 18:09:13 packer-builder-vsphere-iso.linux: 2019/05/15 18:09:13 [INFO] command 'shutdown.exe -a' exited with code: 0
2019/05/15 18:09:13 packer-builder-vsphere-iso.linux: 2019/05/15 18:09:13 [INFO] RPC endpoint: Communicator ended with: 0
2019/05/15 18:09:13 [INFO] 0 bytes written for 'stdout'
2019/05/15 18:09:13 [INFO] 0 bytes written for 'stderr'
2019/05/15 18:09:13 [INFO] RPC client: Communicator ended with: 0
2019/05/15 18:09:13 [INFO] RPC endpoint: Communicator ended with: 0
2019/05/15 18:09:13 packer-provisioner-windows-update: 2019/05/15 18:09:13 [INFO] 0 bytes written for 'stdout'
2019/05/15 18:09:13 packer-provisioner-windows-update: 2019/05/15 18:09:13 [INFO] 0 bytes written for 'stderr'
2019/05/15 18:09:13 packer-provisioner-windows-update: 2019/05/15 18:09:13 [INFO] RPC client: Communicator ended with: 0
2019/05/15 18:09:13 packer-builder-vsphere-iso.linux: 2019/05/15 18:09:13 [INFO] starting remote command: PowerShell -ExecutionPolicy Bypass -OutputFormat Text -File C:/Windows/Temp/packer-windows-update-pending-reboot-elevated.ps1
vsphere-iso: XXXXXX restarted.
2019/05/15 18:09:30 packer-builder-vsphere-iso.linux: 2019/05/15 18:09:30 [INFO] command 'PowerShell -ExecutionPolicy Bypass -OutputFormat Text -File C:/Windows/Temp/packer-windows-update-pending-reboot-elevated.ps1' exited with code: 0
2019/05/15 18:09:30 [INFO] 28 bytes written for 'stdout'
2019/05/15 18:09:30 packer-builder-vsphere-iso.linux: 2019/05/15 18:09:30 [INFO] RPC endpoint: Communicator ended with: 0
2019/05/15 18:09:30 [INFO] 0 bytes written for 'stderr'
2019/05/15 18:09:30 [INFO] RPC client: Communicator ended with: 0
2019/05/15 18:09:30 [INFO] RPC endpoint: Communicator ended with: 0
2019/05/15 18:09:30 packer-provisioner-windows-update: 2019/05/15 18:09:30 [INFO] 28 bytes written for 'stdout'
2019/05/15 18:09:30 packer-provisioner-windows-update: 2019/05/15 18:09:30 [INFO] 0 bytes written for 'stderr'
2019/05/15 18:09:30 packer-provisioner-windows-update: 2019/05/15 18:09:30 [INFO] RPC client: Communicator ended with: 0
==> vsphere-iso: Running Windows update...
2019/05/15 18:09:30 packer-builder-vsphere-iso.linux: 2019/05/15 18:09:30 [INFO] starting remote command: PowerShell -ExecutionPolicy Bypass -OutputFormat Text -File C:/Windows/Temp/packer-windows-update-elevated.ps1
vsphere-iso: Searching for Windows updates...
vsphere-iso: Found Windows update (2018-05-17; 1273.25 MB): 2018-05 Cumulative Update for Windows Server 2016 for x64-based Systems (KB4103720)
vsphere-iso: Found Windows update (2019-05-14; 42.75 MB): Windows Malicious Software Removal Tool x64 - May 2019 (KB890830)
vsphere-iso: Found Windows update (2019-05-14; 11.45 MB): 2019-05 Servicing Stack Update for Windows Server 2016 for x64-based Systems (KB4498947)
vsphere-iso: Downloading Windows updates (3 updates; 1327.45 MB)...
vsphere-iso: Installing Windows updates...
I'm also seeing this behavior, but I don't see any reason for why the 0.7.1 changes are making this fail.
I will also try with 0.7.0, thanks for the heads-up!
I may have declared victory too soon. It's doing the 1.4GB cumulative update and seems to be stuck, which is what I believe the fix in 0.7.1 addressed...
The updates can take a lot of time to install (3h+ but YMMV). To be sure, you need to enter the VM and see if the CPU is busy or TiWorker is still running.
I let it run for hours and finally started poking around. In the Event Log I see over and over, "Package KB4494440 failed to be changed to the Staged stage. Status: 0x800f0816". On solution suggested restarting the Windows Update service but the service fails to stop. I rebooted one of two VMs I was attempting to provision in Packer and it's on the "Getting Windows ready" splash screen. My Packer processes are no longer running (terminal got disconnected, but I suspect they timed out since they're not in the process table).
Not sure what to do about this...
After I've increased the VM memory from 2G to 4G the windows updates were installed successfully.
I've also used the latest VMware-tools-windows-10.3.10-12406962.iso file (this way windows updates does not try to upgrade the VMware tools).
Maybe that will also work for you?
This VM has 12GB, so I'm thinking that's not it.
After Packer failed, I rebooted the VM and tried to have it install KB4494440 via Windows Update, and it failed there too. I eventually downloaded the offline installer for KB4494440 and it finally succeeded.
vCenter shows the VM is running the current version of tools (10346; this is for vSphere 6.0)
I'm contemplating excluding this patch and copying it over via Ansible and installing it that way. Unfortunately, win_updates doesn't allow for specifying an offline source, so I'll have to use another module.
Let me known how you do it. I'm also looking for an offline one. There's wsusoffline... maybe some day I'll make an packer builder for it.
I'm not sure if I'm making progress, but I think it's safe to say this has nothing to do with 0.7.1.
Notice in the output below the provisioner starts to download and then the output just stops and the next provisioner runs.
In looking at the host, the logs show the package failed to install:
Package KB4498947 failed to be changed to the Staged state. Status: 0x800f0816.
==> vsphere-iso: Running Windows update...
vsphere-iso: Searching for Windows updates...
vsphere-iso: Waiting for operation to complete (system performance: 58 % cpu; 16 % memory)...
vsphere-iso: Waiting for operation to complete (system performance: 55 % cpu; 21 % memory)...
vsphere-iso: Waiting for operation to complete (system performance: 56 % cpu; 14 % memory)...
vsphere-iso: Waiting for operation to complete (system performance: 46 % cpu; 15 % memory)...
vsphere-iso: Found Windows update (2018-05-17; 1273.25 MB): 2018-05 Cumulative Update for Windows Server 2016 for x64-based Systems (KB4103720)
vsphere-iso: Found Windows update (2019-04-24; 0.08 MB): VMware, Inc. - Net - 10/17/2018 12:00:00 AM - 1.8.10.0
vsphere-iso: Found Windows update (2019-05-14; 42.75 MB): Windows Malicious Software Removal Tool x64 - May 2019 (KB890830)
vsphere-iso: Found Windows update (2019-05-14; 11.45 MB): 2019-05 Servicing Stack Update for Windows Server 2016 for x64-based Systems (KB4498947)
vsphere-iso: Found Windows update (2019-05-16; 140.45 MB): Definition Update for Windows Defender Antivirus - KB2267602 (Definition 1.293.1746.0)
vsphere-iso: Downloading Windows updates (5 updates; 1467.98 MB)...
vsphere-iso: Waiting for operation to complete (system performance: 4 % cpu; 11 % memory)...
==> vsphere-iso: Running local shell script: /tmp/packer-shell008882124
Just a guess, but when the first update failed, it looks like the windows-update provisioner stopped execution and the next provisioner ran?
Indeed. It seems something in the windows update machinery is crashing and on top of that this windows update provisioner is not detecting/retrying the updates, and it just ignores the problem and packer continues to the next provisioner. Troubleshooting this is going to be painful until you see how this provisioner works internally. There should be some clues in windows event logger and in the scheduled task result that was used to run the windows update.
The bottom line is that this provider probably needs to be changed to better detect failures, but I'm not sure when I will have the time to actually do it.
I appreciate the effort you've put into creating and maintaining this!
I found a script to reset the Windows Updates internals. I'm going to run that, do a windows-restart, and see if windows-update gets any further.
Still researching this. Looks like the output on the Packer console doesn't align with the output file on the VM itself.
On packer, it goes straight from downloading to the next provisioner:
vsphere-iso: Downloading Windows updates (1 updates; 1273.25 MB)...
==> vsphere-iso: Pausing 1m30s before the next provisioner...
But in the output file on the host, after downloading, it shows "Installing Windows Updates."
The EventViewer shows the install is still in progress.
I'm not sure what's being sent back to Packer that would cause that?
It seems the powershell process that is installing the updates is still running, but something is disconnecting/killing the WinRM connection that is used by the provider; on top of that, the provider fails to recognize that as an error and just assumes everything went OK. This means the provider needs to be changed to keep trying to re-connect to the VM until its sure the whole thing has really ended.
The inconsistencies I'm seeing make this really hard to troubleshoot. I ended adopting a strategy of:
- 0.7.1 provisioner
- Install only KB4498947
- Reboot
- Run windows-update again
- Reboot again
- Run other provisioners
That seems to work consistently, though I have no idea why at this point (Conflicting patches? Order of operations? Something in the other provisioning steps?).
It might really be that Servicing stack update (KB4498947); it updates the Windows update machinery, and in a way that messes with the provisioner.
Though, in my local VMware setup, it works just fine (it first installs KB4498947; then it reboots; then it installs the other updates). Maybe our differences are due to the base windows ISO image not being the same? I'm using the one from https://github.com/rgl/windows-2016-vagrant/blob/master/windows-2016.json (https://software-download.microsoft.com/download/pr/Windows_Server_2016_Datacenter_EVAL_en-us_14393_refresh.ISO)
Did you try to use the provisioner to just install the Servicing stack update (KB4498947) and then the other updates? Something like:
{
"provisioners": [
{
"type": "windows-update",
"filters": [
"include:$_.Title -like '*Servicing stack update*'"
]
},
{
"type": "windows-update"
}
]
}
Yes, exactly—I specified that KB first. I'm also using a different ISO as the starting point. I noticed by default it tries to install the cumulative from a year ago. I believe it's documented that the current cumulative doesn't show up until the servicing stack update is applied.
Hummm this might be related to https://github.com/hashicorp/packer/issues/7655 (as of 0.7.0 I've started to use the new packer retry logic). Can you try with https://github.com/rgl/packer-provisioner-windows-update/releases/tag/v0.6.1?
Sorry about the delay. I've hit a bigger problem.
While Packer is successfully building the 2016 image and the updates are applied (I logged into the host while it was still up), I'm seeing that VMs built from the image are re-installing the patches that were already applied. So all the waiting and rebooting for naught.
One clue is that on the VM created from the Packer image, the CLI shows the patches installed:
PS C:\Users\Administrator> get-hotfix
Source Description HotFixID InstalledBy InstalledOn
------ ----------- -------- ----------- -----------
W514256 Update KB4033393 W514256\biafatc 5/21/2019 12:00:00 AM
W514256 Update KB4049065 NT AUTHORITY\SYSTEM 2/2/2018 12:00:00 AM
W514256 Security Update KB4498947 NT AUTHORITY\SYSTEM 5/21/2019 12:00:00 AM
W514256 Update KB4505052 NT AUTHORITY\SYSTEM 5/21/2019 12:00:00 AM
But then the UI is trying to reinstall the KB4505052 update for some reason, and the UI shows no updates installed in the history.

UPDATE: I'm leaving this in case it can help someone else. After reading my post and the logs a few times I started looking at WinRM.
It turns out that the exact same firewall rules on 2016 and 2019 are behaving differently.
They both default Source=LocalSubnet
2016 permits my build server on a different subnet to function and test-wsman is successful during and after deployment.
2019 permits the initial provisioner command but at some time disconnects and will no longer reconnect. test-wsman fails from the build server.
I corrected this and the provisioner is now working by adding a firewall update in my code.
Set-NetFirewallRule -Name WINRM-HTTP-In-TCP-PUBLIC -RemoteAddress <yourBuildServerIP>
You can use the same command to reset it to the default if desired at the end of the JSON.
Set-NetFirewallRule -Name WINRM-HTTP-In-TCP-PUBLIC -RemoteAddress LocalSubnet
I am using Packer 1.4, provisioner 0.7.1, deploying to vSphere and converting to template.
For Server 2016 Standard I have been successfully using:
{
"type": "windows-update",
"search_criteria": "IsInstalled=0",
"filters": [
"exclude:$_.Title -like '*Cumulative*'",
"exclude:$_.Title -like '*Malicious*'",
"exclude:$_.Title -like '*VMware*'",
"exclude:$_.Title -like '*Defender*'",
"include:$true"
],
"pause_before": "30s"
},
{
"type": "windows-restart"
},
{
"type": "windows-update"
},
I am not seeing the same behavior as mwarner1. When I build VM from the template all applied patches are present.
I went with a similar method for Windows Server 2019, essentially testing running all patches using the default command and subsequently trying to exclude all but one patch at a time. I have been unable to find the right combination for 2019.
Regardless of the selected patches I see similar behavior. This is my current configuration:
{
"type": "windows-update",
"search_criteria": "IsInstalled=0",
"filters": [
"include:$_.Title -like '*Malicious*'",
"exclude:$_.Title -like '*VMware*'",
"exclude:$_.Title -like '*NET*'",
"include:$_.Title -like '*Defender*'",
"exclude:$_.Title -like '*Flash*'",
"exclude:$_.Title -like '*Cumulative*'",
"include:$true"
],
"pause_before": "30s"
},
{
"type": "windows-restart",
"pause_before": "120s",
"restart_check_command": "powershell -command \"& {Write-Output 'restarted.'}\"",
"timeout": "10m"
},
The result is that I can see the patches downloaded and installed in Event Viewer, but a restart does not occur. If I apply a patch such as the Cumulative Update and I jump on the VM and manually reboot, I see the patch being applied during the reboot process (the build does not continue though).
2019/06/12 16:32:33 ui: 2019-06-12T16:32:33-08:00: ==> vsphere-iso: Running Windows update... 2019/06/12 16:32:33 packer-builder-vsphere-iso.exe: <Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04"><Obj S="progress" RefId="0"><TN RefId="0"><T>System.Management.Automation.PSCustomObject</T><T>System.Object</T></TN><MS><I64 N="SourceId">1</I64><PR N="Record"><AV>Preparing modules for first use.</AV><AI>0</AI><Nil /><PI>-1</PI><PC>-1</PC><T>Completed</T><SR>-1</SR><SD> </SD></PR></MS></Obj></Objs>2019/06/12 16:32:33 [INFO] starting remote command: PowerShell -ExecutionPolicy Bypass -OutputFormat Text -File C:/Windows/Temp/packer-windows-update-elevated.ps1 2019/06/12 16:32:41 ui: 2019-06-12T16:32:41-08:00: vsphere-iso: Searching for Windows updates... 2019/06/12 16:32:56 ui: 2019-06-12T16:32:56-08:00: vsphere-iso: Skipped (filter) Windows update (2018-10-15; 20.72 MB): Update for Adobe Flash Player for Windows Server 2019 (1809) for x64-based Systems (KB4462930) 2019/06/12 16:32:56 ui: 2019-06-12T16:32:56-08:00: vsphere-iso: Skipped (filter) Windows update (2019-05-14; 63.8 MB): 2019-05 Cumulative Update for .NET Framework 3.5, 4.7.2 and 4.8 for Windows Server 2019 for x64 (KB4499405) 2019/06/12 16:32:56 ui: 2019-06-12T16:32:56-08:00: vsphere-iso: Found Windows update (2019-06-11; 44.52 MB): Windows Malicious Software Removal Tool x64 - June 2019 (KB890830) 2019/06/12 16:32:56 ui: 2019-06-12T16:32:56-08:00: vsphere-iso: Skipped (filter) Windows update (2019-06-11; 20.74 MB): 2019-06 Security Update for Adobe Flash Player for Windows Server 2019 for x64-based Systems (KB4503308) 2019/06/12 16:32:56 ui: 2019-06-12T16:32:56-08:00: vsphere-iso: Found Windows update (2019-06-12; 140.13 MB): Definition Update for Windows Defender Antivirus - KB2267602 (Definition 1.295.593.0) 2019/06/12 16:32:56 ui: 2019-06-12T16:32:56-08:00: vsphere-iso: Skipped (CanRequestUserInput) Windows update (2019-04-24; 0.08 MB): VMware, Inc. - Net - 10/17/2018 12:00:00 AM - 1.8.10.0 2019/06/12 16:32:56 ui: 2019-06-12T16:32:56-08:00: vsphere-iso: Skipped (filter) Windows update (2019-06-11; 14762.65 MB): 2019-06 Cumulative Update for Windows Server 2019 (1809) for x64-based Systems (KB4503327) 2019/06/12 16:32:56 ui: 2019-06-12T16:32:56-08:00: vsphere-iso: Downloading Windows updates (2 updates; 184.65 MB)... 2019/06/12 16:33:11 ui: 2019-06-12T16:33:11-08:00: vsphere-iso: Installing Windows updates... 2019/06/12 16:33:39 ui: 2019-06-12T16:33:39-08:00: vsphere-iso: Waiting for operation to complete (system performance: 31% cpu; 22% memory)... 2019/06/12 16:34:08 packer-builder-vsphere-iso.exe: 2019/06/12 16:34:08 [INFO] command 'PowerShell -ExecutionPolicy Bypass -OutputFormat Text -File C:/Windows/Temp/packer-windows-update-elevated.ps1' exited with code: 0 2019/06/12 16:34:08 packer-builder-vsphere-iso.exe: 2019/06/12 16:34:08 [INFO] RPC endpoint: Communicator ended with: 0 2019/06/12 16:34:08 [INFO] 1199 bytes written for 'stdout' 2019/06/12 16:34:08 [INFO] 0 bytes written for 'stderr' 2019/06/12 16:34:08 [INFO] RPC client: Communicator ended with: 0 2019/06/12 16:34:08 [INFO] RPC endpoint: Communicator ended with: 0 2019/06/12 16:34:08 packer-provisioner-windows-update.exe: 2019/06/12 16:34:08 [INFO] 0 bytes written for 'stderr' 2019/06/12 16:34:08 packer-provisioner-windows-update.exe: 2019/06/12 16:34:08 [INFO] 1199 bytes written for 'stdout' 2019/06/12 16:34:08 packer-provisioner-windows-update.exe: 2019/06/12 16:34:08 [INFO] RPC client: Communicator ended with: 0 2019/06/12 16:34:08 [INFO] (telemetry) ending windows-update 2019/06/12 16:34:08 [INFO] (telemetry) Starting provisioner windows-restart 2019/06/12 16:34:08 ui: 2019-06-12T16:34:08-08:00: ==> vsphere-iso: Pausing 2m0s before the next provisioner... 2019/06/12 16:36:08 ui: 2019-06-12T16:36:08-08:00: ==> vsphere-iso: Restarting Machine 2019/06/12 16:36:09 packer-builder-vsphere-iso.exe: 2019/06/12 16:36:09 [INFO] starting remote command: shutdown /r /f /t 0 /c "packer restart" 2019/06/12 16:36:09 packer-builder-vsphere-iso.exe: 2019/06/12 16:36:09 [INFO] command 'shutdown /r /f /t 0 /c "packer restart"' exited with code: 0 2019/06/12 16:36:09 packer-builder-vsphere-iso.exe: 2019/06/12 16:36:09 [INFO] RPC endpoint: Communicator ended with: 0 2019/06/12 16:36:09 [INFO] 0 bytes written for 'stderr' 2019/06/12 16:36:09 [INFO] 0 bytes written for 'stdout' 2019/06/12 16:36:09 [INFO] RPC client: Communicator ended with: 0 2019/06/12 16:36:09 [INFO] RPC endpoint: Communicator ended with: 0 2019/06/12 16:36:09 packer.exe: 2019/06/12 16:36:09 [INFO] 0 bytes written for 'stdout' 2019/06/12 16:36:09 packer.exe: 2019/06/12 16:36:09 [INFO] 0 bytes written for 'stderr' 2019/06/12 16:36:09 packer.exe: 2019/06/12 16:36:09 [INFO] RPC client: Communicator ended with: 0 2019/06/12 16:36:09 ui: 2019-06-12T16:36:09-08:00: ==> vsphere-iso: Waiting for machine to restart... 2019/06/12 16:36:10 packer.exe: 2019/06/12 16:36:10 Check if machine is rebooting... 2019/06/12 16:36:10 [INFO] 0 bytes written for 'stderr' 2019/06/12 16:36:10 [INFO] 0 bytes written for 'stdout' 2019/06/12 16:36:10 packer.exe: 2019/06/12 16:36:10 [INFO] 0 bytes written for 'stderr' 2019/06/12 16:36:10 packer.exe: 2019/06/12 16:36:10 [INFO] 0 bytes written for 'stdout' 2019/06/12 16:36:10 packer.exe: 2019/06/12 16:36:10 Waiting for machine to become available... 2019/06/12 16:36:10 packer.exe: 2019/06/12 16:36:10 Checking that communicator is connected with: 'powershell -command "& {Write-Output 'restarted.'}"' 2019/06/12 16:36:10 packer.exe: 2019/06/12 16:36:10 Waiting for machine to reboot with timeout: 5m0s 2019/06/12 16:36:36 [INFO] 0 bytes written for 'stdout' 2019/06/12 16:36:36 [INFO] 0 bytes written for 'stderr' 2019/06/12 16:36:36 packer.exe: 2019/06/12 16:36:36 [INFO] 0 bytes written for 'stderr' 2019/06/12 16:36:36 packer.exe: 2019/06/12 16:36:36 [INFO] 0 bytes written for 'stdout' 2019/06/12 16:36:36 packer.exe: 2019/06/12 16:36:36 Communication connection err: unknown error Post http://10.109.63.4:5985/wsman: dial tcp 10.109.63.4:5985: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.