Open 0ni0nrings opened 4 years ago
Thanks for reaching out. We will take a look at what might be going on here. Does this issue occur in Packer 1.5.6?
Hello again, I asked about 1.5.6 because 1.6.0 was just released so wanted to check if it was specific to the latest version.
With that said, could you provide the full build log, stripped of any sensitive information, please. The provided error message indicates that Packer failed to find the environment variable setting script c:/Windows/Temp/packer-ps-env-vars-5ee1efc6-8c78-c00a-fa20-fccbb120817d.ps1
which is uploaded before executing the actual Powershell command. I would like to see if there are any errors encountered during the uploading of the env var file.
As of right now I am unable to reproduce this issue but the full debug log may help show what might be happening. Are there any other provisioners in your build configuration that run prior to the cleanup script?
Thanks!
Thanks for looking into this, I don't have 1.5.6 with me but I remember upgrading from 1.5 to 1.6 because I was having similar issues with that version.
Here are few lines straight from the console after turning on PACKER_LOG=1
I have included other details further down.
[user@localhost]$ time PACKER_LOG=1 packer build windows_ami_packer.json
2020/06/12 09:12:27 [INFO] Packer version: 1.6.0 [go1.13.12 linux amd64]
2020/06/12 09:12:27 Checking 'PACKER_CONFIG' for a config file path
2020/06/12 09:12:27 'PACKER_CONFIG' not set; checking the default config file path
2020/06/12 09:12:27 Attempting to open config file: /home/user/.packerconfig
2020/06/12 09:12:27 [WARN] Config file doesn't exist: /home/user/.packerconfig
2020/06/12 09:12:27 Setting cache directory: /home/user/tf-ansible/stage-01/packer_cache
2020/06/12 09:12:27 Creating plugin client for path: /opt/packer
2020/06/12 09:12:27 Starting plugin: /opt/packer []string{"/opt/packer", "plugin", "packer-builder-amazon-ebs"}
2020/06/12 09:12:27 Waiting for RPC address for: /opt/packer
2020/06/12 09:12:27 packer-builder-amazon-ebs plugin: [INFO] Packer version: 1.6.0 [go1.13.12 linux amd64]
2020/06/12 09:12:27 packer-builder-amazon-ebs plugin: Checking 'PACKER_CONFIG' for a config file path
2020/06/12 09:12:27 packer-builder-amazon-ebs plugin: 'PACKER_CONFIG' not set; checking the default config file path
2020/06/12 09:12:27 packer-builder-amazon-ebs plugin: Attempting to open config file: /home/user/.packerconfig
2020/06/12 09:12:27 packer-builder-amazon-ebs plugin: [WARN] Config file doesn't exist: /home/user/.packerconfig
2020/06/12 09:12:27 packer-builder-amazon-ebs plugin: Setting cache directory: /home/user/tf-ansible/stage-01/packer_cache
2020/06/12 09:12:27 packer-builder-amazon-ebs plugin: args: []string{"packer-builder-amazon-ebs"}
2020/06/12 09:12:27 packer-builder-amazon-ebs plugin: Plugin address: unix /tmp/packer-plugin298226991
2020/06/12 09:12:27 packer-builder-amazon-ebs plugin: Waiting for connection...
2020/06/12 09:12:27 Received unix RPC address for /opt/packer: addr is /tmp/packer-plugin298226991
2020/06/12 09:12:27 packer-builder-amazon-ebs plugin: Serving a plugin connection...
2020/06/12 09:12:27 Creating plugin client for path: /opt/packer
2020/06/12 09:12:27 Starting plugin: /opt/packer []string{"/opt/packer", "plugin", "packer-provisioner-powershell"}
2020/06/12 09:12:27 Waiting for RPC address for: /opt/packer
2020/06/12 09:12:27 packer-provisioner-powershell plugin: [INFO] Packer version: 1.6.0 [go1.13.12 linux amd64]
2020/06/12 09:12:27 packer-provisioner-powershell plugin: Checking 'PACKER_CONFIG' for a config file path
2020/06/12 09:12:27 packer-provisioner-powershell plugin: 'PACKER_CONFIG' not set; checking the default config file path
2020/06/12 09:12:27 packer-provisioner-powershell plugin: Attempting to open config file: /home/user/.packerconfig
2020/06/12 09:12:27 packer-provisioner-powershell plugin: [WARN] Config file doesn't exist: /home/user/.packerconfig
2020/06/12 09:12:27 packer-provisioner-powershell plugin: Setting cache directory: /home/user/tf-ansible/stage-01/packer_cache
2020/06/12 09:12:27 packer-provisioner-powershell plugin: args: []string{"packer-provisioner-powershell"}
2020/06/12 09:12:27 Received unix RPC address for /opt/packer: addr is /tmp/packer-plugin559764841
2020/06/12 09:12:27 packer-provisioner-powershell plugin: Plugin address: unix /tmp/packer-plugin559764841
2020/06/12 09:12:27 packer-provisioner-powershell plugin: Waiting for connection...
2020/06/12 09:12:27 packer-provisioner-powershell plugin: Serving a plugin connection...
2020/06/12 09:12:27 Creating plugin client for path: /opt/packer
2020/06/12 09:12:27 Starting plugin: /opt/packer []string{"/opt/packer", "plugin", "packer-provisioner-powershell"}
2020/06/12 09:12:27 Waiting for RPC address for: /opt/packer
2020/06/12 09:12:28 packer-provisioner-powershell plugin: [INFO] Packer version: 1.6.0 [go1.13.12 linux amd64]
2020/06/12 09:12:28 packer-provisioner-powershell plugin: Checking 'PACKER_CONFIG' for a config file path
2020/06/12 09:12:28 packer-provisioner-powershell plugin: 'PACKER_CONFIG' not set; checking the default config file path
2020/06/12 09:12:28 packer-provisioner-powershell plugin: Attempting to open config file: /home/user/.packerconfig
2020/06/12 09:12:28 packer-provisioner-powershell plugin: [WARN] Config file doesn't exist: /home/user/.packerconfig
2020/06/12 09:12:28 packer-provisioner-powershell plugin: Setting cache directory: /home/user/tf-ansible/stage-01/packer_cache
2020/06/12 09:12:28 packer-provisioner-powershell plugin: args: []string{"packer-provisioner-powershell"}
2020/06/12 09:12:28 packer-provisioner-powershell plugin: Plugin address: unix /tmp/packer-plugin404165229
2020/06/12 09:12:28 packer-provisioner-powershell plugin: Waiting for connection...
2020/06/12 09:12:28 Received unix RPC address for /opt/packer: addr is /tmp/packer-plugin404165229
2020/06/12 09:12:28 packer-provisioner-powershell plugin: Serving a plugin connection...
2020/06/12 09:12:28 Preparing build: amazon-ebs
amazon-ebs: output will be in this color.
2020/06/12 09:12:28 Build debug mode: false
2020/06/12 09:12:28 Force build: false
2020/06/12 09:12:28 On error:
2020/06/12 09:12:28 Waiting on builds to complete...
2020/06/12 09:12:28 Starting build run: amazon-ebs
2020/06/12 09:12:28 Running builder: amazon-ebs
2020/06/12 09:12:28 [INFO] (telemetry) Starting builder amazon-ebs
2020/06/12 09:12:28 packer-builder-amazon-ebs plugin: Found region us-east-1
2020/06/12 09:12:28 packer-builder-amazon-ebs plugin: [INFO] AWS Auth provider used: "SharedConfigCredentials: /home/user/.aws/credentials"
2020/06/12 09:12:28 packer-builder-amazon-ebs plugin: [INFO] (aws): No AWS timeout and polling overrides have been set. Packer will default to waiter-specific delays and timeouts. If you would like to customize the length of time between retries and max number of retries you may do so by setting the environment variables AWS_POLL_DELAY_SECONDS and AWS_MAX_ATTEMPTS to your desired values.
==> amazon-ebs: Prevalidating any provided VPC information
==> amazon-ebs: Prevalidating AMI Name: WIN2019-CUSTOM-1591909947
2020/06/12 09:12:31 packer-builder-amazon-ebs plugin: Using AMI Filters {
2020/06/12 09:12:31 packer-builder-amazon-ebs plugin: Filters: [{
2020/06/12 09:12:31 packer-builder-amazon-ebs plugin: Name: "virtualization-type",
2020/06/12 09:12:31 packer-builder-amazon-ebs plugin: Values: ["hvm"]
2020/06/12 09:12:31 packer-builder-amazon-ebs plugin: },{
2020/06/12 09:12:31 packer-builder-amazon-ebs plugin: Name: "name",
2020/06/12 09:12:31 packer-builder-amazon-ebs plugin: Values: ["Windows_Server-2019-English-Core-Base-*"]
2020/06/12 09:12:31 packer-builder-amazon-ebs plugin: },{
2020/06/12 09:12:31 packer-builder-amazon-ebs plugin: Name: "root-device-type",
2020/06/12 09:12:31 packer-builder-amazon-ebs plugin: Values: ["ebs"]
2020/06/12 09:12:31 packer-builder-amazon-ebs plugin: }],
2020/06/12 09:12:31 packer-builder-amazon-ebs plugin: Owners: ["801119661308"]
2020/06/12 09:12:31 packer-builder-amazon-ebs plugin: }
amazon-ebs: Found Image ID: ami-0372aaeca7591cf5a
==> amazon-ebs: Creating temporary keypair: packer_5ee29e3c-b238-32b4-6d41-3bd3960ff840
==> amazon-ebs: Creating temporary security group for this instance: packer_5ee29e41-2a79-04fb-2a29-646badbf0b10
2020/06/12 09:12:35 packer-builder-amazon-ebs plugin: [DEBUG] Waiting for temporary security group: sg-02fa17c2ccd8997c5
2020/06/12 09:12:36 packer-builder-amazon-ebs plugin: [DEBUG] Found security group sg-02fa17c2ccd8997c5
==> amazon-ebs: Authorizing access to port 5986 from [0.0.0.0/0] in the temporary security groups...
2020/06/12 09:12:37 packer-builder-amazon-ebs plugin: [DEBUG] base64 encoding user data...
==> amazon-ebs: Launching a source AWS instance...
==> amazon-ebs: Adding tags to source instance
amazon-ebs: Adding tag: "Name": "Packer Builder"
amazon-ebs: Instance ID: i-0cea1b0bc29800330
==> amazon-ebs: Waiting for instance (i-0cea1b0bc29800330) to become ready...
==> amazon-ebs: Waiting for auto-generated password for instance...
amazon-ebs: but it usually takes around 5. Please wait.
amazon-ebs: It is normal for this process to take up to 15 minutes,
amazon-ebs: but it usually takes around 5. Please wait.
2020/06/12 09:13:19 packer-builder-amazon-ebs plugin: Retrieving auto-generated instance password...
2020/06/12 09:13:20 packer-builder-amazon-ebs plugin: [DEBUG] Password is blank, will retry...
2020/06/12 09:13:25 packer-builder-amazon-ebs plugin: Retrieving auto-generated instance password...
2020/06/12 09:13:26 packer-builder-amazon-ebs plugin: [DEBUG] Password is blank, will retry...
2020/06/12 09:13:31 packer-builder-amazon-ebs plugin: Retrieving auto-generated instance password...
2020/06/12 09:13:32 packer-builder-amazon-ebs plugin: [DEBUG] Password is blank, will retry...
2020/06/12 09:13:37 packer-builder-amazon-ebs plugin: Retrieving auto-generated instance password...
2020/06/12 09:13:39 packer-builder-amazon-ebs plugin: [DEBUG] Password is blank, will retry...
2020/06/12 09:13:44 packer-builder-amazon-ebs plugin: Retrieving auto-generated instance password...
2020/06/12 09:13:45 packer-builder-amazon-ebs plugin: [DEBUG] Password is blank, will retry...
2020/06/12 09:13:50 packer-builder-amazon-ebs plugin: Retrieving auto-generated instance password...
2020/06/12 09:13:51 packer-builder-amazon-ebs plugin: [DEBUG] Password is blank, will retry...
2020/06/12 09:13:56 packer-builder-amazon-ebs plugin: Retrieving auto-generated instance password...
2020/06/12 09:13:57 packer-builder-amazon-ebs plugin: [DEBUG] Password is blank, will retry...
2020/06/12 09:14:02 packer-builder-amazon-ebs plugin: Retrieving auto-generated instance password...
2020/06/12 09:14:03 packer-builder-amazon-ebs plugin: [DEBUG] Password is blank, will retry...
2020/06/12 09:14:08 packer-builder-amazon-ebs plugin: Retrieving auto-generated instance password...
2020/06/12 09:14:09 packer-builder-amazon-ebs plugin: [DEBUG] Password is blank, will retry...
2020/06/12 09:14:14 packer-builder-amazon-ebs plugin: Retrieving auto-generated instance password...
2020/06/12 09:14:16 packer-builder-amazon-ebs plugin: [DEBUG] Password is blank, will retry...
2020/06/12 09:14:21 packer-builder-amazon-ebs plugin: Retrieving auto-generated instance password...
2020/06/12 09:14:22 packer-builder-amazon-ebs plugin: [DEBUG] Password is blank, will retry...
2020/06/12 09:14:27 packer-builder-amazon-ebs plugin: Retrieving auto-generated instance password...
2020/06/12 09:14:28 packer-builder-amazon-ebs plugin: [DEBUG] Password is blank, will retry...
2020/06/12 09:14:33 packer-builder-amazon-ebs plugin: Retrieving auto-generated instance password...
2020/06/12 09:14:34 packer-builder-amazon-ebs plugin: [DEBUG] Password is blank, will retry...
2020/06/12 09:14:39 packer-builder-amazon-ebs plugin: Retrieving auto-generated instance password...
2020/06/12 09:14:40 packer-builder-amazon-ebs plugin: [DEBUG] Password is blank, will retry...
2020/06/12 09:14:45 packer-builder-amazon-ebs plugin: Retrieving auto-generated instance password...
2020/06/12 09:14:47 packer-builder-amazon-ebs plugin: [DEBUG] Password is blank, will retry...
2020/06/12 09:14:52 packer-builder-amazon-ebs plugin: Retrieving auto-generated instance password...
2020/06/12 09:14:53 packer-builder-amazon-ebs plugin: [DEBUG] Password is blank, will retry...
2020/06/12 09:14:58 packer-builder-amazon-ebs plugin: Retrieving auto-generated instance password...
2020/06/12 09:14:59 packer-builder-amazon-ebs plugin: [DEBUG] Password is blank, will retry...
2020/06/12 09:15:04 packer-builder-amazon-ebs plugin: Retrieving auto-generated instance password...
2020/06/12 09:15:05 packer-builder-amazon-ebs plugin: [DEBUG] Password is blank, will retry...
2020/06/12 09:15:10 packer-builder-amazon-ebs plugin: Retrieving auto-generated instance password...
2020/06/12 09:15:12 packer-builder-amazon-ebs plugin: [DEBUG] Password is blank, will retry...
2020/06/12 09:15:17 packer-builder-amazon-ebs plugin: Retrieving auto-generated instance password...
2020/06/12 09:15:18 packer-builder-amazon-ebs plugin: [DEBUG] Password is blank, will retry...
2020/06/12 09:15:23 packer-builder-amazon-ebs plugin: Retrieving auto-generated instance password...
amazon-ebs:
amazon-ebs: Password retrieved!
amazon-ebs: Password retrieved!
==> amazon-ebs: Using winrm communicator to connect: 34.239.254.127
2020/06/12 09:15:24 packer-builder-amazon-ebs plugin: Waiting for WinRM, up to timeout: 5m0s
==> amazon-ebs: Waiting for WinRM to become available...
2020/06/12 09:15:24 packer-builder-amazon-ebs plugin: Using host value: 34.239.254.127
2020/06/12 09:15:24 packer-builder-amazon-ebs plugin: [INFO] Attempting WinRM connection...
2020/06/12 09:15:24 packer-builder-amazon-ebs plugin: [DEBUG] connecting to remote shell using WinRM
2020/06/12 09:15:38 packer-builder-amazon-ebs plugin: Checking that WinRM is connected with: 'powershell.exe -EncodedCommand aQBmACAAKABUAGUAcwB0AC0AUABhAHQAaAAgAHYAYQByAGkAYQBiAGwAZQA6AGcAbABvAGIAYQBsADoAUAByAG8AZwByAGUAcwBzAFAAcgBlAGYAZQByAGUAbgBjAGUAKQB7ACQAUAByAG8AZwByAGUAcwBzAFAAcgBlAGYAZQByAGUAbgBjAGUAPQAnAFMAaQBsAGUAbgB0AGwAeQBDAG8AbgB0AGkAbgB1AGUAJwB9ADsAIABlAGMAaABvACAAIgBXAGkAbgBSAE0AIABjAG8AbgBuAGUAYwB0AGUAZAAuACIA'
2020/06/12 09:15:38 packer-builder-amazon-ebs plugin: [INFO] starting remote command: powershell.exe -EncodedCommand aQBmACAAKABUAGUAcwB0AC0AUABhAHQAaAAgAHYAYQByAGkAYQBiAGwAZQA6AGcAbABvAGIAYQBsADoAUAByAG8AZwByAGUAcwBzAFAAcgBlAGYAZQByAGUAbgBjAGUAKQB7ACQAUAByAG8AZwByAGUAcwBzAFAAcgBlAGYAZQByAGUAbgBjAGUAPQAnAFMAaQBsAGUAbgB0AGwAeQBDAG8AbgB0AGkAbgB1AGUAJwB9ADsAIABlAGMAaABvACAAIgBXAGkAbgBSAE0AIABjAG8AbgBuAGUAYwB0AGUAZAAuACIA
2020/06/12 09:15:42 packer-builder-amazon-ebs plugin: [INFO] command 'powershell.exe -EncodedCommand aQBmACAAKABUAGUAcwB0AC0AUABhAHQAaAAgAHYAYQByAGkAYQBiAGwAZQA6AGcAbABvAGIAYQBsADoAUAByAG8AZwByAGUAcwBzAFAAcgBlAGYAZQByAGUAbgBjAGUAKQB7ACQAUAByAG8AZwByAGUAcwBzAFAAcgBlAGYAZQByAGUAbgBjAGUAPQAnAFMAaQBsAGUAbgB0AGwAeQBDAG8AbgB0AGkAbgB1AGUAJwB9ADsAIABlAGMAaABvACAAIgBXAGkAbgBSAE0AIABjAG8AbgBuAGUAYwB0AGUAZAAuACIA' exited with code: 0
amazon-ebs: WinRM connected.
==> amazon-ebs: #< CLIXML
2020/06/12 09:15:43 packer-builder-amazon-ebs plugin: Connected to machine
2020/06/12 09:15:43 packer-builder-amazon-ebs plugin: Running the provision hook
==> amazon-ebs: <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><Obj S="progress" RefId="1"><TNRef RefId="0" /><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>
==> amazon-ebs: Connected to WinRM!
2020/06/12 09:15:43 [INFO] (telemetry) Starting provisioner powershell
==> amazon-ebs: Provisioning with Powershell...
2020/06/12 09:15:43 packer-provisioner-powershell plugin: Found command: C:\ProgramData\Amazon\EC2-Windows\Launch\Scripts\InitializeInstance.ps1 -Schedule
==> amazon-ebs: Provisioning with powershell script: /tmp/powershell-provisioner970610100
2020/06/12 09:15:43 packer-provisioner-powershell plugin: Opening /tmp/powershell-provisioner970610100 for reading
2020/06/12 09:15:43 packer-provisioner-powershell plugin: Uploading env vars to c:/Windows/Temp/packer-ps-env-vars-5ee29e3c-9ce0-812f-f59e-21993403ac12.ps1
2020/06/12 09:15:43 packer-provisioner-powershell plugin: [INFO] 76 bytes written for 'uploadData'
2020/06/12 09:15:43 [INFO] 76 bytes written for 'uploadData'
2020/06/12 09:15:43 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee29e3c-9ce0-812f-f59e-21993403ac12.ps1'
2020/06/12 09:15:49 packer-builder-amazon-ebs plugin: #< CLIXML
2020/06/12 09:15:55 packer-builder-amazon-ebs plugin: <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>#< CLIXML
2020/06/12 09:15:56 packer-provisioner-powershell plugin: [INFO] 82 bytes written for 'uploadData'
2020/06/12 09:15:56 [INFO] 82 bytes written for 'uploadData'
2020/06/12 09:15:56 packer-builder-amazon-ebs plugin: <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>Uploading file to 'c:/Windows/Temp/script-5ee29e3c-c9da-4e08-5d1f-237d9d27713d.ps1'
2020/06/12 09:16:03 packer-builder-amazon-ebs plugin: #< CLIXML
2020/06/12 09:16:07 packer-builder-amazon-ebs plugin: <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>#< CLIXML
2020/06/12 09:16:09 packer-builder-amazon-ebs plugin: <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>[INFO] starting remote command: powershell -executionpolicy bypass "& { if (Test-Path variable:global:ProgressPreference){set-variable -name variable:global:ProgressPreference -value 'SilentlyContinue'};. c:/Windows/Temp/packer-ps-env-vars-5ee29e3c-9ce0-812f-f59e-21993403ac12.ps1; &'c:/Windows/Temp/script-5ee29e3c-c9da-4e08-5d1f-237d9d27713d.ps1'; exit $LastExitCode }"
2020/06/12 09:16:15 packer-builder-amazon-ebs plugin: [INFO] command 'powershell -executionpolicy bypass "& { if (Test-Path variable:global:ProgressPreference){set-variable -name variable:global:ProgressPreference -value 'SilentlyContinue'};. c:/Windows/Temp/packer-ps-env-vars-5ee29e3c-9ce0-812f-f59e-21993403ac12.ps1; &'c:/Windows/Temp/script-5ee29e3c-c9da-4e08-5d1f-237d9d27713d.ps1'; exit $LastExitCode }"' exited with code: 0
2020/06/12 09:16:15 packer-builder-amazon-ebs plugin: [INFO] RPC endpoint: Communicator ended with: 0
2020/06/12 09:16:15 [INFO] 0 bytes written for 'stderr'
amazon-ebs:
2020/06/12 09:16:15 [INFO] 281 bytes written for 'stdout'
2020/06/12 09:16:15 [INFO] RPC client: Communicator ended with: 0
2020/06/12 09:16:15 [INFO] RPC endpoint: Communicator ended with: 0
amazon-ebs: TaskPath TaskName State
2020/06/12 09:16:15 packer-provisioner-powershell plugin: [INFO] 281 bytes written for 'stdout'
2020/06/12 09:16:15 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'stderr'
2020/06/12 09:16:15 packer-provisioner-powershell plugin: [INFO] RPC client: Communicator ended with: 0
amazon-ebs: -------- -------- -----
amazon-ebs: \ Amazon Ec2 Launch - Instance I... Ready
2020/06/12 09:16:15 packer-provisioner-powershell plugin: c:/Windows/Temp/script-5ee29e3c-c9da-4e08-5d1f-237d9d27713d.ps1 returned with exit code 0
2020/06/12 09:16:15 packer-provisioner-powershell plugin: [INFO] 511 bytes written for 'uploadData'
2020/06/12 09:16:15 [INFO] 511 bytes written for 'uploadData'
2020/06/12 09:16:15 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-cleanup-5ee29e3c-3104-f0b1-5a44-9c6bce41c5a8.ps1'
2020/06/12 09:16:21 packer-builder-amazon-ebs plugin: #< CLIXML
2020/06/12 09:16:26 packer-builder-amazon-ebs plugin: <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>#< CLIXML
2020/06/12 09:16:27 packer-builder-amazon-ebs plugin: <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>[INFO] starting remote command: powershell -executionpolicy bypass "& { if (Test-Path variable:global:ProgressPreference){set-variable -name variable:global:ProgressPreference -value 'SilentlyContinue'};. c:/Windows/Temp/packer-ps-env-vars-5ee29e3c-9ce0-812f-f59e-21993403ac12.ps1; &'c:/Windows/Temp/packer-cleanup-5ee29e3c-3104-f0b1-5a44-9c6bce41c5a8.ps1'; exit $LastExitCode }"
2020/06/12 09:16:30 packer-builder-amazon-ebs plugin: [INFO] command 'powershell -executionpolicy bypass "& { if (Test-Path variable:global:ProgressPreference){set-variable -name variable:global:ProgressPreference -value 'SilentlyContinue'};. c:/Windows/Temp/packer-ps-env-vars-5ee29e3c-9ce0-812f-f59e-21993403ac12.ps1; &'c:/Windows/Temp/packer-cleanup-5ee29e3c-3104-f0b1-5a44-9c6bce41c5a8.ps1'; exit $LastExitCode }"' exited with code: 0
2020/06/12 09:16:30 packer-builder-amazon-ebs plugin: [INFO] RPC endpoint: Communicator ended with: 0
2020/06/12 09:16:30 [INFO] 0 bytes written for 'stdout'
2020/06/12 09:16:30 [INFO] 0 bytes written for 'stderr'
2020/06/12 09:16:30 [INFO] RPC client: Communicator ended with: 0
2020/06/12 09:16:30 [INFO] RPC endpoint: Communicator ended with: 0
2020/06/12 09:16:30 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'stdout'
2020/06/12 09:16:30 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'stderr'
2020/06/12 09:16:30 packer-provisioner-powershell plugin: [INFO] RPC client: Communicator ended with: 0
2020/06/12 09:16:30 [INFO] (telemetry) ending powershell
2020/06/12 09:16:30 [INFO] (telemetry) Starting provisioner powershell
==> amazon-ebs: Provisioning with Powershell...
==> amazon-ebs: Provisioning with powershell script: ./scripts/win_cleanup.ps1
2020/06/12 09:16:30 packer-provisioner-powershell plugin: Opening ./scripts/win_cleanup.ps1 for reading
2020/06/12 09:16:30 packer-provisioner-powershell plugin: Uploading env vars to c:/Windows/Temp/packer-ps-env-vars-5ee29e3c-7091-8ebe-6191-6a6b6de9fd1d.ps1
2020/06/12 09:16:30 packer-provisioner-powershell plugin: [INFO] 76 bytes written for 'uploadData'
2020/06/12 09:16:30 [INFO] 76 bytes written for 'uploadData'
2020/06/12 09:16:30 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee29e3c-7091-8ebe-6191-6a6b6de9fd1d.ps1'
2020/06/12 09:16:37 packer-builder-amazon-ebs plugin: #< CLIXML
2020/06/12 09:16:41 packer-builder-amazon-ebs plugin: <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>#< CLIXML
2020/06/12 09:16:42 packer-provisioner-powershell plugin: [INFO] 129 bytes written for 'uploadData'
2020/06/12 09:16:42 [INFO] 129 bytes written for 'uploadData'
2020/06/12 09:16:42 packer-builder-amazon-ebs plugin: <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>Uploading file to 'c:/Windows/Temp/script-5ee29e3c-b75b-bc63-5175-13d84ffdce1a.ps1'
2020/06/12 09:16:49 packer-builder-amazon-ebs plugin: #< CLIXML
2020/06/12 09:16:53 packer-builder-amazon-ebs plugin: <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>#< CLIXML
2020/06/12 09:16:54 packer-builder-amazon-ebs plugin: <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>[INFO] starting remote command: powershell -executionpolicy bypass "& { if (Test-Path variable:global:ProgressPreference){set-variable -name variable:global:ProgressPreference -value 'SilentlyContinue'};. c:/Windows/Temp/packer-ps-env-vars-5ee29e3c-7091-8ebe-6191-6a6b6de9fd1d.ps1; &'c:/Windows/Temp/script-5ee29e3c-b75b-bc63-5175-13d84ffdce1a.ps1'; exit $LastExitCode }"
2020/06/12 09:16:58 packer-builder-amazon-ebs plugin: [INFO] command 'powershell -executionpolicy bypass "& { if (Test-Path variable:global:ProgressPreference){set-variable -name variable:global:ProgressPreference -value 'SilentlyContinue'};. c:/Windows/Temp/packer-ps-env-vars-5ee29e3c-7091-8ebe-6191-6a6b6de9fd1d.ps1; &'c:/Windows/Temp/script-5ee29e3c-b75b-bc63-5175-13d84ffdce1a.ps1'; exit $LastExitCode }"' exited with code: 0
2020/06/12 09:16:58 packer-builder-amazon-ebs plugin: [INFO] RPC endpoint: Communicator ended with: 0
2020/06/12 09:16:58 [INFO] 0 bytes written for 'stdout'
2020/06/12 09:16:58 [INFO] 0 bytes written for 'stderr'
2020/06/12 09:16:58 [INFO] RPC client: Communicator ended with: 0
2020/06/12 09:16:58 [INFO] RPC endpoint: Communicator ended with: 0
2020/06/12 09:16:58 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'stdout'
2020/06/12 09:16:58 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'stderr'
2020/06/12 09:16:58 packer-provisioner-powershell plugin: [INFO] RPC client: Communicator ended with: 0
2020/06/12 09:16:58 packer-provisioner-powershell plugin: c:/Windows/Temp/script-5ee29e3c-b75b-bc63-5175-13d84ffdce1a.ps1 returned with exit code 0
2020/06/12 09:16:58 packer-provisioner-powershell plugin: [INFO] 511 bytes written for 'uploadData'
2020/06/12 09:16:58 [INFO] 511 bytes written for 'uploadData'
2020/06/12 09:16:58 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-cleanup-5ee29e3c-89ab-41a5-d004-98c72fd1a770.ps1'
2020/06/12 09:17:04 packer-builder-amazon-ebs plugin: #< CLIXML
2020/06/12 09:17:09 packer-builder-amazon-ebs plugin: <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>#< CLIXML
2020/06/12 09:17:10 packer-builder-amazon-ebs plugin: <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>[INFO] starting remote command: powershell -executionpolicy bypass "& { if (Test-Path variable:global:ProgressPreference){set-variable -name variable:global:ProgressPreference -value 'SilentlyContinue'};. c:/Windows/Temp/packer-ps-env-vars-5ee29e3c-7091-8ebe-6191-6a6b6de9fd1d.ps1; &'c:/Windows/Temp/packer-cleanup-5ee29e3c-89ab-41a5-d004-98c72fd1a770.ps1'; exit $LastExitCode }"
2020/06/12 09:17:14 packer-builder-amazon-ebs plugin: [INFO] command 'powershell -executionpolicy bypass "& { if (Test-Path variable:global:ProgressPreference){set-variable -name variable:global:ProgressPreference -value 'SilentlyContinue'};. c:/Windows/Temp/packer-ps-env-vars-5ee29e3c-7091-8ebe-6191-6a6b6de9fd1d.ps1; &'c:/Windows/Temp/packer-cleanup-5ee29e3c-89ab-41a5-d004-98c72fd1a770.ps1'; exit $LastExitCode }"' exited with code: 0
2020/06/12 09:17:14 packer-builder-amazon-ebs plugin: [INFO] RPC endpoint: Communicator ended with: 0
2020/06/12 09:17:14 [INFO] 0 bytes written for 'stdout'
2020/06/12 09:17:14 [INFO] 645 bytes written for 'stderr'
2020/06/12 09:17:14 [INFO] RPC client: Communicator ended with: 0
2020/06/12 09:17:14 [INFO] RPC endpoint: Communicator ended with: 0
==> amazon-ebs: . : The term 'c:/Windows/Temp/packer-ps-env-vars-5ee29e3c-7091-8ebe-6191-6a6b6de9fd1d.ps1' is not recognized as the
2020/06/12 09:17:14 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'stdout'
2020/06/12 09:17:14 packer-provisioner-powershell plugin: [INFO] 645 bytes written for 'stderr'
2020/06/12 09:17:14 packer-provisioner-powershell plugin: [INFO] RPC client: Communicator ended with: 0
==> amazon-ebs: name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
==> amazon-ebs: included, verify that the path is correct and try again.
==> amazon-ebs: At line:1 char:138
==> amazon-ebs: + ... ontinue'};. c:/Windows/Temp/packer-ps-env-vars-5ee29e3c-7091-8ebe-619 ...
==> amazon-ebs: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
==> amazon-ebs: + CategoryInfo : ObjectNotFound: (c:/Windows/Temp...a6b6de9fd1d.ps1:String) [], CommandNotFoundException
==> amazon-ebs: + FullyQualifiedErrorId : CommandNotFoundException
==> amazon-ebs:
2020/06/12 09:17:14 [INFO] (telemetry) ending powershell
==> amazon-ebs: Stopping the source instance...
amazon-ebs: Stopping instance
==> amazon-ebs: Waiting for the instance to stop...
==> amazon-ebs: Creating AMI WIN2019-CUSTOM-1591909947 from instance i-0cea1b0bc29800330
amazon-ebs: AMI: ami-025957db046193b08
==> amazon-ebs: Waiting for AMI to become ready...
==> amazon-ebs: Terminating the source AWS instance...
==> amazon-ebs: Cleaning up any extra volumes...
==> amazon-ebs: No volumes to clean up, skipping
==> amazon-ebs: Deleting temporary security group...
==> amazon-ebs: Deleting temporary keypair...
2020/06/12 09:18:46 [INFO] (telemetry) ending amazon-ebs
Build 'amazon-ebs' finished.
==> Builds finished. The artifacts of successful builds are:
==> Builds finished. The artifacts of successful builds are:
2020/06/12 09:18:46 machine readable: amazon-ebs,artifact-count []string{"1"}
2020/06/12 09:18:46 machine readable: amazon-ebs,artifact []string{"0", "builder-id", "mitchellh.amazonebs"}
2020/06/12 09:18:46 machine readable: amazon-ebs,artifact []string{"0", "id", "us-east-1:ami-025957db046193b08"}
2020/06/12 09:18:46 machine readable: amazon-ebs,artifact []string{"0", "string", "AMIs were created:\nus-east-1: ami-025957db046193b08\n"}
2020/06/12 09:18:46 machine readable: amazon-ebs,artifact []string{"0", "files-count", "0"}
--> amazon-ebs: AMIs were created:
2020/06/12 09:18:46 machine readable: amazon-ebs,artifact []string{"0", "end"}
us-east-1: ami-025957db046193b08
us-east-1: ami-025957db046193b08
2020/06/12 09:18:46 [INFO] (telemetry) Finalizing.
2020/06/12 09:18:48 waiting for all plugin processes to complete...
2020/06/12 09:18:48 /opt/packer: plugin process exited
2020/06/12 09:18:48 /opt/packer: plugin process exited
2020/06/12 09:18:48 /opt/packer: plugin process exited
real 6m20.781s
user 0m1.937s
sys 0m3.976s
[user@localhost]$
Hi @0ni0nrings thanks for the additional log information. Looking at the new info it looks like this error is occurring during the Powershell cleanup step. Packer's cleanup step will log any errors but continue executing, which explains why the error is only logged and the build continues.
The first provisioner doesn't have this issue so it might be something specific to your script/win_cleanup.ps1
script. Is it possible that your win_cleanup
script is deleting the ps-env-vars file before Packer's clean up script runs?
I would check your script to ensure that it is not deleting all of the files in C:/Windows/Temp. If it is I would recommend narrowing its scope. Or if you don't want to spend much time changing your script you can pass the skip_clean
option to the provisioner to prevent Packer from trying to cleanup after itself.
{
"type": "powershell",
"skip_clean": true,
"script": "./script/win_cleanup.ps1"
}
Feel free to close this issue if the suggested next steps work for you . Cheers!
OK, now I remember why I moved from 1.5.6 to 1.6, so here's what I did, I changed the content of clean up script to the command show below, simple command to create a directory
New-Item -ItemType Directory -Path C:\Windows\Temp -Name try_packer.txt
Running Packer with verbosity & you'll see from the logs that Packer doesn't identify the content type. I thought PowerShell provisioner can handle a PowerShell script without using special syntax. This is just an example of how PowerShell provisioner is handling a one liner script.
[user@localhost ]$ time PACKER_LOG=1 packer build try_packer.json
2020/06/13 19:13:11 [INFO] Packer version: 1.6.0 [go1.13.12 linux amd64]
2020/06/13 19:13:11 Checking 'PACKER_CONFIG' for a config file path
2020/06/13 19:13:11 'PACKER_CONFIG' not set; checking the default config file path
2020/06/13 19:13:11 Attempting to open config file: /home/user/.packerconfig
2020/06/13 19:13:11 [WARN] Config file doesn't exist: /home/user/.packerconfig
2020/06/13 19:13:11 Setting cache directory: /home/user/tf-ansible//packer_cache
2020/06/13 19:13:11 Creating plugin client for path: /opt/packer
2020/06/13 19:13:11 Starting plugin: /opt/packer []string{"/opt/packer", "plugin", "packer-builder-amazon-ebs"}
2020/06/13 19:13:11 Waiting for RPC address for: /opt/packer
2020/06/13 19:13:11 packer-builder-amazon-ebs plugin: [INFO] Packer version: 1.6.0 [go1.13.12 linux amd64]
2020/06/13 19:13:11 packer-builder-amazon-ebs plugin: Checking 'PACKER_CONFIG' for a config file path
2020/06/13 19:13:11 packer-builder-amazon-ebs plugin: 'PACKER_CONFIG' not set; checking the default config file path
2020/06/13 19:13:11 packer-builder-amazon-ebs plugin: Attempting to open config file: /home/user/.packerconfig
2020/06/13 19:13:11 packer-builder-amazon-ebs plugin: [WARN] Config file doesn't exist: /home/user/.packerconfig
2020/06/13 19:13:11 packer-builder-amazon-ebs plugin: Setting cache directory: /home/user/tf-ansible//packer_cache
2020/06/13 19:13:11 packer-builder-amazon-ebs plugin: args: []string{"packer-builder-amazon-ebs"}
2020/06/13 19:13:11 packer-builder-amazon-ebs plugin: Plugin address: unix /tmp/packer-plugin134646339
2020/06/13 19:13:11 packer-builder-amazon-ebs plugin: Waiting for connection...
2020/06/13 19:13:11 Received unix RPC address for /opt/packer: addr is /tmp/packer-plugin134646339
2020/06/13 19:13:11 packer-builder-amazon-ebs plugin: Serving a plugin connection...
2020/06/13 19:13:11 Creating plugin client for path: /opt/packer
2020/06/13 19:13:11 Starting plugin: /opt/packer []string{"/opt/packer", "plugin", "packer-provisioner-powershell"}
2020/06/13 19:13:11 Waiting for RPC address for: /opt/packer
2020/06/13 19:13:11 packer-provisioner-powershell plugin: [INFO] Packer version: 1.6.0 [go1.13.12 linux amd64]
2020/06/13 19:13:11 packer-provisioner-powershell plugin: Checking 'PACKER_CONFIG' for a config file path
2020/06/13 19:13:11 packer-provisioner-powershell plugin: 'PACKER_CONFIG' not set; checking the default config file path
2020/06/13 19:13:11 packer-provisioner-powershell plugin: Attempting to open config file: /home/user/.packerconfig
2020/06/13 19:13:11 packer-provisioner-powershell plugin: [WARN] Config file doesn't exist: /home/user/.packerconfig
2020/06/13 19:13:11 packer-provisioner-powershell plugin: Setting cache directory: /home/user/tf-ansible//packer_cache
2020/06/13 19:13:11 packer-provisioner-powershell plugin: args: []string{"packer-provisioner-powershell"}
2020/06/13 19:13:11 packer-provisioner-powershell plugin: Plugin address: unix /tmp/packer-plugin156272711
2020/06/13 19:13:11 packer-provisioner-powershell plugin: Waiting for connection...
2020/06/13 19:13:11 Received unix RPC address for /opt/packer: addr is /tmp/packer-plugin156272711
2020/06/13 19:13:11 packer-provisioner-powershell plugin: Serving a plugin connection...
2020/06/13 19:13:11 Creating plugin client for path: /opt/packer
2020/06/13 19:13:11 Starting plugin: /opt/packer []string{"/opt/packer", "plugin", "packer-provisioner-powershell"}
2020/06/13 19:13:11 Waiting for RPC address for: /opt/packer
2020/06/13 19:13:11 packer-provisioner-powershell plugin: [INFO] Packer version: 1.6.0 [go1.13.12 linux amd64]
2020/06/13 19:13:11 packer-provisioner-powershell plugin: Checking 'PACKER_CONFIG' for a config file path
2020/06/13 19:13:11 packer-provisioner-powershell plugin: 'PACKER_CONFIG' not set; checking the default config file path
2020/06/13 19:13:11 packer-provisioner-powershell plugin: Attempting to open config file: /home/user/.packerconfig
2020/06/13 19:13:11 packer-provisioner-powershell plugin: [WARN] Config file doesn't exist: /home/user/.packerconfig
2020/06/13 19:13:11 packer-provisioner-powershell plugin: Setting cache directory: /home/user/tf-ansible//packer_cache
2020/06/13 19:13:11 packer-provisioner-powershell plugin: args: []string{"packer-provisioner-powershell"}
2020/06/13 19:13:11 Received unix RPC address for /opt/packer: addr is /tmp/packer-plugin625350747
2020/06/13 19:13:11 packer-provisioner-powershell plugin: Plugin address: unix /tmp/packer-plugin625350747
2020/06/13 19:13:11 packer-provisioner-powershell plugin: Waiting for connection...
2020/06/13 19:13:11 packer-provisioner-powershell plugin: Serving a plugin connection...
2020/06/13 19:13:11 Preparing build: amazon-ebs
amazon-ebs: output will be in this color.
2020/06/13 19:13:11 Build debug mode: false
2020/06/13 19:13:11 Force build: false
2020/06/13 19:13:11 On error:
2020/06/13 19:13:11 Waiting on builds to complete...
2020/06/13 19:13:11 Starting build run: amazon-ebs
2020/06/13 19:13:11 Running builder: amazon-ebs
2020/06/13 19:13:11 [INFO] (telemetry) Starting builder amazon-ebs
2020/06/13 19:13:11 packer-builder-amazon-ebs plugin: Found region us-east-1
2020/06/13 19:13:11 packer-builder-amazon-ebs plugin: [INFO] AWS Auth provider used: "SharedConfigCredentials: /home/user/.aws/credentials"
2020/06/13 19:13:11 packer-builder-amazon-ebs plugin: [INFO] (aws): No AWS timeout and polling overrides have been set. Packer will default to waiter-specific delays and timeouts. If you would like to customize the length of time between retries and max number of retries you may do so by setting the environment variables AWS_POLL_DELAY_SECONDS and AWS_MAX_ATTEMPTS to your desired values.
==> amazon-ebs: Prevalidating any provided VPC information
==> amazon-ebs: Prevalidating AMI Name: WIN2019-CUSTOM-1592032391
2020/06/13 19:13:14 packer-builder-amazon-ebs plugin: Using AMI Filters {
2020/06/13 19:13:14 packer-builder-amazon-ebs plugin: Filters: [{
2020/06/13 19:13:14 packer-builder-amazon-ebs plugin: Name: "name",
2020/06/13 19:13:14 packer-builder-amazon-ebs plugin: Values: ["Windows_Server-2019-English-Core-Base-*"]
2020/06/13 19:13:14 packer-builder-amazon-ebs plugin: },{
2020/06/13 19:13:14 packer-builder-amazon-ebs plugin: Name: "root-device-type",
2020/06/13 19:13:14 packer-builder-amazon-ebs plugin: Values: ["ebs"]
2020/06/13 19:13:14 packer-builder-amazon-ebs plugin: },{
2020/06/13 19:13:14 packer-builder-amazon-ebs plugin: Name: "virtualization-type",
2020/06/13 19:13:14 packer-builder-amazon-ebs plugin: Values: ["hvm"]
2020/06/13 19:13:14 packer-builder-amazon-ebs plugin: }],
2020/06/13 19:13:14 packer-builder-amazon-ebs plugin: Owners: ["801119661308"]
2020/06/13 19:13:14 packer-builder-amazon-ebs plugin: }
amazon-ebs: Found Image ID: ami-045391e125fb95c5e
==> amazon-ebs: Creating temporary keypair: packer_5ee47c87-529b-9b44-1e3e-0f83647133f1
==> amazon-ebs: Creating temporary security group for this instance: packer_5ee47c8c-d456-01cc-4c65-80946e192fd3
2020/06/13 19:13:17 packer-builder-amazon-ebs plugin: [DEBUG] Waiting for temporary security group: sg-09d1b9070f9fad821
2020/06/13 19:13:18 packer-builder-amazon-ebs plugin: [DEBUG] Found security group sg-09d1b9070f9fad821
==> amazon-ebs: Authorizing access to port 5986 from [0.0.0.0/0] in the temporary security groups...
2020/06/13 19:13:20 packer-builder-amazon-ebs plugin: [DEBUG] base64 encoding user data...
==> amazon-ebs: Launching a source AWS instance...
==> amazon-ebs: Adding tags to source instance
amazon-ebs: Adding tag: "Name": "Packer Builder"
amazon-ebs: Instance ID: i-01f7c19678f6f5550
==> amazon-ebs: Waiting for instance (i-01f7c19678f6f5550) to become ready...
==> amazon-ebs: Waiting for auto-generated password for instance...
amazon-ebs: but it usually takes around 5. Please wait.
amazon-ebs: It is normal for this process to take up to 15 minutes,
amazon-ebs: but it usually takes around 5. Please wait.
2020/06/13 19:14:01 packer-builder-amazon-ebs plugin: Retrieving auto-generated instance password...
2020/06/13 19:14:02 packer-builder-amazon-ebs plugin: [DEBUG] Password is blank, will retry...
2020/06/13 19:14:07 packer-builder-amazon-ebs plugin: Retrieving auto-generated instance password...
2020/06/13 19:14:08 packer-builder-amazon-ebs plugin: [DEBUG] Password is blank, will retry...
2020/06/13 19:14:13 packer-builder-amazon-ebs plugin: Retrieving auto-generated instance password...
2020/06/13 19:14:15 packer-builder-amazon-ebs plugin: [DEBUG] Password is blank, will retry...
2020/06/13 19:14:20 packer-builder-amazon-ebs plugin: Retrieving auto-generated instance password...
2020/06/13 19:14:21 packer-builder-amazon-ebs plugin: [DEBUG] Password is blank, will retry...
2020/06/13 19:14:26 packer-builder-amazon-ebs plugin: Retrieving auto-generated instance password...
2020/06/13 19:14:28 packer-builder-amazon-ebs plugin: [DEBUG] Password is blank, will retry...
2020/06/13 19:14:33 packer-builder-amazon-ebs plugin: Retrieving auto-generated instance password...
2020/06/13 19:14:34 packer-builder-amazon-ebs plugin: [DEBUG] Password is blank, will retry...
2020/06/13 19:14:39 packer-builder-amazon-ebs plugin: Retrieving auto-generated instance password...
2020/06/13 19:14:40 packer-builder-amazon-ebs plugin: [DEBUG] Password is blank, will retry...
2020/06/13 19:14:45 packer-builder-amazon-ebs plugin: Retrieving auto-generated instance password...
2020/06/13 19:14:46 packer-builder-amazon-ebs plugin: [DEBUG] Password is blank, will retry...
2020/06/13 19:14:51 packer-builder-amazon-ebs plugin: Retrieving auto-generated instance password...
2020/06/13 19:14:52 packer-builder-amazon-ebs plugin: [DEBUG] Password is blank, will retry...
2020/06/13 19:14:57 packer-builder-amazon-ebs plugin: Retrieving auto-generated instance password...
2020/06/13 19:14:59 packer-builder-amazon-ebs plugin: [DEBUG] Password is blank, will retry...
2020/06/13 19:15:04 packer-builder-amazon-ebs plugin: Retrieving auto-generated instance password...
2020/06/13 19:15:05 packer-builder-amazon-ebs plugin: [DEBUG] Password is blank, will retry...
2020/06/13 19:15:10 packer-builder-amazon-ebs plugin: Retrieving auto-generated instance password...
2020/06/13 19:15:11 packer-builder-amazon-ebs plugin: [DEBUG] Password is blank, will retry...
2020/06/13 19:15:16 packer-builder-amazon-ebs plugin: Retrieving auto-generated instance password...
2020/06/13 19:15:17 packer-builder-amazon-ebs plugin: [DEBUG] Password is blank, will retry...
2020/06/13 19:15:22 packer-builder-amazon-ebs plugin: Retrieving auto-generated instance password...
2020/06/13 19:15:24 packer-builder-amazon-ebs plugin: [DEBUG] Password is blank, will retry...
2020/06/13 19:15:29 packer-builder-amazon-ebs plugin: Retrieving auto-generated instance password...
2020/06/13 19:15:30 packer-builder-amazon-ebs plugin: [DEBUG] Password is blank, will retry...
2020/06/13 19:15:35 packer-builder-amazon-ebs plugin: Retrieving auto-generated instance password...
2020/06/13 19:15:36 packer-builder-amazon-ebs plugin: [DEBUG] Password is blank, will retry...
2020/06/13 19:15:41 packer-builder-amazon-ebs plugin: Retrieving auto-generated instance password...
amazon-ebs:
amazon-ebs: Password retrieved!
amazon-ebs: Password retrieved!
==> amazon-ebs: Using winrm communicator to connect: 100.25.26.63
2020/06/13 19:15:42 packer-builder-amazon-ebs plugin: Waiting for WinRM, up to timeout: 5m0s
==> amazon-ebs: Waiting for WinRM to become available...
2020/06/13 19:15:42 packer-builder-amazon-ebs plugin: Using host value: 100.25.26.63
2020/06/13 19:15:42 packer-builder-amazon-ebs plugin: [INFO] Attempting WinRM connection...
2020/06/13 19:15:42 packer-builder-amazon-ebs plugin: [DEBUG] connecting to remote shell using WinRM
2020/06/13 19:16:04 packer-builder-amazon-ebs plugin: Checking that WinRM is connected with: 'powershell.exe -EncodedCommand aQBmACAAKABUAGUAcwB0AC0AUABhAHQAaAAgAHYAYQByAGkAYQBiAGwAZQA6AGcAbABvAGIAYQBsADoAUAByAG8AZwByAGUAcwBzAFAAcgBlAGYAZQByAGUAbgBjAGUAKQB7ACQAUAByAG8AZwByAGUAcwBzAFAAcgBlAGYAZQByAGUAbgBjAGUAPQAnAFMAaQBsAGUAbgB0AGwAeQBDAG8AbgB0AGkAbgB1AGUAJwB9ADsAIABlAGMAaABvACAAIgBXAGkAbgBSAE0AIABjAG8AbgBuAGUAYwB0AGUAZAAuACIA'
2020/06/13 19:16:04 packer-builder-amazon-ebs plugin: [INFO] starting remote command: powershell.exe -EncodedCommand aQBmACAAKABUAGUAcwB0AC0AUABhAHQAaAAgAHYAYQByAGkAYQBiAGwAZQA6AGcAbABvAGIAYQBsADoAUAByAG8AZwByAGUAcwBzAFAAcgBlAGYAZQByAGUAbgBjAGUAKQB7ACQAUAByAG8AZwByAGUAcwBzAFAAcgBlAGYAZQByAGUAbgBjAGUAPQAnAFMAaQBsAGUAbgB0AGwAeQBDAG8AbgB0AGkAbgB1AGUAJwB9ADsAIABlAGMAaABvACAAIgBXAGkAbgBSAE0AIABjAG8AbgBuAGUAYwB0AGUAZAAuACIA
2020/06/13 19:16:05 packer-builder-amazon-ebs plugin: [INFO] command 'powershell.exe -EncodedCommand aQBmACAAKABUAGUAcwB0AC0AUABhAHQAaAAgAHYAYQByAGkAYQBiAGwAZQA6AGcAbABvAGIAYQBsADoAUAByAG8AZwByAGUAcwBzAFAAcgBlAGYAZQByAGUAbgBjAGUAKQB7ACQAUAByAG8AZwByAGUAcwBzAFAAcgBlAGYAZQByAGUAbgBjAGUAPQAnAFMAaQBsAGUAbgB0AGwAeQBDAG8AbgB0AGkAbgB1AGUAJwB9ADsAIABlAGMAaABvACAAIgBXAGkAbgBSAE0AIABjAG8AbgBuAGUAYwB0AGUAZAAuACIA' exited with code: 0
amazon-ebs: WinRM connected.
==> amazon-ebs: #< CLIXML
==> amazon-ebs: <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><Obj S="progress" RefId="1"><TNRef RefId="0" /><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>
2020/06/13 19:16:05 packer-builder-amazon-ebs plugin: Connected to machine
==> amazon-ebs: Connected to WinRM!
2020/06/13 19:16:05 packer-builder-amazon-ebs plugin: Running the provision hook
2020/06/13 19:16:05 [INFO] (telemetry) Starting provisioner powershell
==> amazon-ebs: Provisioning with Powershell...
2020/06/13 19:16:05 packer-provisioner-powershell plugin: Found command: C:\ProgramData\Amazon\EC2-Windows\Launch\Scripts\InitializeInstance.ps1 -Schedule
2020/06/13 19:16:05 packer-provisioner-powershell plugin: Found command: C:\ProgramData\Amazon\EC2-Windows\Launch\Scripts\SysprepInstance.ps1 -NoShutdown
==> amazon-ebs: Provisioning with powershell script: /tmp/powershell-provisioner117867770
2020/06/13 19:16:05 packer-provisioner-powershell plugin: Opening /tmp/powershell-provisioner117867770 for reading
2020/06/13 19:16:05 packer-provisioner-powershell plugin: Uploading env vars to c:/Windows/Temp/packer-ps-env-vars-5ee47c87-4345-b535-e108-096054fde84d.ps1
2020/06/13 19:16:05 packer-provisioner-powershell plugin: [INFO] 76 bytes written for 'uploadData'
2020/06/13 19:16:05 [INFO] 76 bytes written for 'uploadData'
2020/06/13 19:16:05 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-4345-b535-e108-096054fde84d.ps1'
2020/06/13 19:16:09 packer-builder-amazon-ebs plugin: #< CLIXML
2020/06/13 19:16:11 packer-builder-amazon-ebs plugin: <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>#< CLIXML
2020/06/13 19:16:12 packer-provisioner-powershell plugin: [INFO] 163 bytes written for 'uploadData'
2020/06/13 19:16:12 [INFO] 163 bytes written for 'uploadData'
2020/06/13 19:16:12 packer-builder-amazon-ebs plugin: <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>Uploading file to 'c:/Windows/Temp/script-5ee47c87-8b79-03ba-9923-5aeb94455f05.ps1'
2020/06/13 19:16:16 packer-builder-amazon-ebs plugin: #< CLIXML
2020/06/13 19:16:18 packer-builder-amazon-ebs plugin: <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>#< CLIXML
2020/06/13 19:16:20 packer-builder-amazon-ebs plugin: <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>[INFO] starting remote command: powershell -executionpolicy bypass "& { if (Test-Path variable:global:ProgressPreference){set-variable -name variable:global:ProgressPreference -value 'SilentlyContinue'};. c:/Windows/Temp/packer-ps-env-vars-5ee47c87-4345-b535-e108-096054fde84d.ps1; &'c:/Windows/Temp/script-5ee47c87-8b79-03ba-9923-5aeb94455f05.ps1'; exit $LastExitCode }"
amazon-ebs:
amazon-ebs: TaskPath TaskName State
amazon-ebs: -------- -------- -----
amazon-ebs: \ Amazon Ec2 Launch - Instance I... Ready
2020/06/13 19:17:50 packer-builder-amazon-ebs plugin: [INFO] command 'powershell -executionpolicy bypass "& { if (Test-Path variable:global:ProgressPreference){set-variable -name variable:global:ProgressPreference -value 'SilentlyContinue'};. c:/Windows/Temp/packer-ps-env-vars-5ee47c87-4345-b535-e108-096054fde84d.ps1; &'c:/Windows/Temp/script-5ee47c87-8b79-03ba-9923-5aeb94455f05.ps1'; exit $LastExitCode }"' exited with code: 0
2020/06/13 19:17:50 packer-builder-amazon-ebs plugin: [INFO] RPC endpoint: Communicator ended with: 0
2020/06/13 19:17:50 [INFO] 281 bytes written for 'stdout'
2020/06/13 19:17:50 [INFO] 0 bytes written for 'stderr'
2020/06/13 19:17:50 [INFO] RPC client: Communicator ended with: 0
2020/06/13 19:17:50 [INFO] RPC endpoint: Communicator ended with: 0
2020/06/13 19:17:50 packer-provisioner-powershell plugin: [INFO] 281 bytes written for 'stdout'
2020/06/13 19:17:50 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'stderr'
2020/06/13 19:17:50 packer-provisioner-powershell plugin: [INFO] RPC client: Communicator ended with: 0
2020/06/13 19:17:50 packer-provisioner-powershell plugin: c:/Windows/Temp/script-5ee47c87-8b79-03ba-9923-5aeb94455f05.ps1 returned with exit code 0
2020/06/13 19:17:50 packer-provisioner-powershell plugin: [INFO] 511 bytes written for 'uploadData'
2020/06/13 19:17:50 [INFO] 511 bytes written for 'uploadData'
2020/06/13 19:17:50 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-cleanup-5ee47c87-0c51-3f35-7886-3ad81b2848d0.ps1'
2020/06/13 19:17:51 packer-provisioner-powershell plugin: failed to upload the remote cleanup script: "clean up script \"c:/Windows/Temp/packer-cleanup-5ee47c87-0c51-3f35-7886-3ad81b2848d0.ps1\" failed to upload: Error uploading file to $env:TEMP\\winrmcp-230b537b-f00a-4698-443e-5e014d13a579.tmp: Couldn't create shell: http response error: 401 - invalid content type"
2020/06/13 19:17:51 packer-provisioner-powershell plugin: Retryable error: clean up script "c:/Windows/Temp/packer-cleanup-5ee47c87-0c51-3f35-7886-3ad81b2848d0.ps1" failed to upload: Error uploading file to $env:TEMP\winrmcp-230b537b-f00a-4698-443e-5e014d13a579.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:18:01 packer-provisioner-powershell plugin: [INFO] 511 bytes written for 'uploadData'
2020/06/13 19:18:01 [INFO] 511 bytes written for 'uploadData'
2020/06/13 19:18:01 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-cleanup-5ee47c87-0c51-3f35-7886-3ad81b2848d0.ps1'
2020/06/13 19:18:02 packer-provisioner-powershell plugin: failed to upload the remote cleanup script: "clean up script \"c:/Windows/Temp/packer-cleanup-5ee47c87-0c51-3f35-7886-3ad81b2848d0.ps1\" failed to upload: Error uploading file to $env:TEMP\\winrmcp-536e96ad-650f-4309-5faa-aa59abfda94e.tmp: Couldn't create shell: http response error: 401 - invalid content type"
2020/06/13 19:18:02 packer-provisioner-powershell plugin: Retryable error: clean up script "c:/Windows/Temp/packer-cleanup-5ee47c87-0c51-3f35-7886-3ad81b2848d0.ps1" failed to upload: Error uploading file to $env:TEMP\winrmcp-536e96ad-650f-4309-5faa-aa59abfda94e.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:18:12 packer-provisioner-powershell plugin: [INFO] 511 bytes written for 'uploadData'
2020/06/13 19:18:12 [INFO] 511 bytes written for 'uploadData'
2020/06/13 19:18:12 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-cleanup-5ee47c87-0c51-3f35-7886-3ad81b2848d0.ps1'
2020/06/13 19:18:12 packer-provisioner-powershell plugin: failed to upload the remote cleanup script: "clean up script \"c:/Windows/Temp/packer-cleanup-5ee47c87-0c51-3f35-7886-3ad81b2848d0.ps1\" failed to upload: Error uploading file to $env:TEMP\\winrmcp-1b373497-66f3-424a-5c40-67a3551ac14e.tmp: Couldn't create shell: http response error: 401 - invalid content type"
2020/06/13 19:18:12 packer-provisioner-powershell plugin: Retryable error: clean up script "c:/Windows/Temp/packer-cleanup-5ee47c87-0c51-3f35-7886-3ad81b2848d0.ps1" failed to upload: Error uploading file to $env:TEMP\winrmcp-1b373497-66f3-424a-5c40-67a3551ac14e.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:18:22 packer-provisioner-powershell plugin: [INFO] 511 bytes written for 'uploadData'
2020/06/13 19:18:22 [INFO] 511 bytes written for 'uploadData'
2020/06/13 19:18:22 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-cleanup-5ee47c87-0c51-3f35-7886-3ad81b2848d0.ps1'
2020/06/13 19:18:23 packer-provisioner-powershell plugin: failed to upload the remote cleanup script: "clean up script \"c:/Windows/Temp/packer-cleanup-5ee47c87-0c51-3f35-7886-3ad81b2848d0.ps1\" failed to upload: Error uploading file to $env:TEMP\\winrmcp-380ebd10-62dc-497d-63f3-245cdd8ee7b6.tmp: Couldn't create shell: http response error: 401 - invalid content type"
2020/06/13 19:18:23 packer-provisioner-powershell plugin: Retryable error: clean up script "c:/Windows/Temp/packer-cleanup-5ee47c87-0c51-3f35-7886-3ad81b2848d0.ps1" failed to upload: Error uploading file to $env:TEMP\winrmcp-380ebd10-62dc-497d-63f3-245cdd8ee7b6.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:18:33 packer-provisioner-powershell plugin: [INFO] 511 bytes written for 'uploadData'
2020/06/13 19:18:33 [INFO] 511 bytes written for 'uploadData'
2020/06/13 19:18:33 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-cleanup-5ee47c87-0c51-3f35-7886-3ad81b2848d0.ps1'
2020/06/13 19:18:34 packer-provisioner-powershell plugin: failed to upload the remote cleanup script: "clean up script \"c:/Windows/Temp/packer-cleanup-5ee47c87-0c51-3f35-7886-3ad81b2848d0.ps1\" failed to upload: Error uploading file to $env:TEMP\\winrmcp-1c034b98-1512-4aa8-55b9-d3d056706ad1.tmp: Couldn't create shell: http response error: 401 - invalid content type"
2020/06/13 19:18:34 packer-provisioner-powershell plugin: Retryable error: clean up script "c:/Windows/Temp/packer-cleanup-5ee47c87-0c51-3f35-7886-3ad81b2848d0.ps1" failed to upload: Error uploading file to $env:TEMP\winrmcp-1c034b98-1512-4aa8-55b9-d3d056706ad1.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:18:44 packer-provisioner-powershell plugin: [INFO] 511 bytes written for 'uploadData'
2020/06/13 19:18:44 [INFO] 511 bytes written for 'uploadData'
2020/06/13 19:18:44 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-cleanup-5ee47c87-0c51-3f35-7886-3ad81b2848d0.ps1'
2020/06/13 19:18:45 packer-provisioner-powershell plugin: failed to upload the remote cleanup script: "clean up script \"c:/Windows/Temp/packer-cleanup-5ee47c87-0c51-3f35-7886-3ad81b2848d0.ps1\" failed to upload: Error uploading file to $env:TEMP\\winrmcp-da2d290a-d72c-4a89-48db-c39559654cf9.tmp: Couldn't create shell: http response error: 401 - invalid content type"
2020/06/13 19:18:45 packer-provisioner-powershell plugin: Retryable error: clean up script "c:/Windows/Temp/packer-cleanup-5ee47c87-0c51-3f35-7886-3ad81b2848d0.ps1" failed to upload: Error uploading file to $env:TEMP\winrmcp-da2d290a-d72c-4a89-48db-c39559654cf9.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:18:55 packer-provisioner-powershell plugin: [INFO] 511 bytes written for 'uploadData'
2020/06/13 19:18:55 [INFO] 511 bytes written for 'uploadData'
2020/06/13 19:18:55 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-cleanup-5ee47c87-0c51-3f35-7886-3ad81b2848d0.ps1'
2020/06/13 19:18:56 packer-provisioner-powershell plugin: failed to upload the remote cleanup script: "clean up script \"c:/Windows/Temp/packer-cleanup-5ee47c87-0c51-3f35-7886-3ad81b2848d0.ps1\" failed to upload: Error uploading file to $env:TEMP\\winrmcp-0179dc9d-bea7-4c01-7864-f5c0b2c4ad9b.tmp: Couldn't create shell: http response error: 401 - invalid content type"
2020/06/13 19:18:56 packer-provisioner-powershell plugin: Retryable error: clean up script "c:/Windows/Temp/packer-cleanup-5ee47c87-0c51-3f35-7886-3ad81b2848d0.ps1" failed to upload: Error uploading file to $env:TEMP\winrmcp-0179dc9d-bea7-4c01-7864-f5c0b2c4ad9b.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:18:56 packer-provisioner-powershell plugin: remote cleanup script failed to upload; skipping the removal of temporary files: c:/Windows/Temp/packer-ps-env-vars-5ee47c87-4345-b535-e108-096054fde84d.ps1,c:/Windows/Temp/script-5ee47c87-8b79-03ba-9923-5aeb94455f05.ps1;
2020/06/13 19:18:56 [INFO] (telemetry) ending powershell
2020/06/13 19:18:56 [INFO] (telemetry) Starting provisioner powershell
==> amazon-ebs: Provisioning with Powershell...
==> amazon-ebs: Provisioning with powershell script: ./scripts/win_cleanup.ps1
2020/06/13 19:18:56 packer-provisioner-powershell plugin: Opening ./scripts/win_cleanup.ps1 for reading
2020/06/13 19:18:56 packer-provisioner-powershell plugin: Uploading env vars to c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1
2020/06/13 19:18:56 packer-provisioner-powershell plugin: [INFO] 76 bytes written for 'uploadData'
2020/06/13 19:18:56 [INFO] 76 bytes written for 'uploadData'
2020/06/13 19:18:56 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:18:56 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-765f7375-9980-46b4-76c9-626dddf55186.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:18:58 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:18:58 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:18:58 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:18:59 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-e1960376-2345-4969-7ca8-0ac662e7d361.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:19:01 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:19:01 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:19:01 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:19:02 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-ffd110a9-21e5-4663-4f36-c88ff3c11ccf.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:19:04 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:19:04 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:19:04 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:19:05 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-9a845b83-3667-4cce-7f6b-226f80f18224.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:19:07 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:19:07 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:19:07 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:19:08 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-a27386b0-b98f-4d84-52da-a46b5e56e71f.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:19:10 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:19:10 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:19:10 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:19:10 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-8545841b-eaf1-4862-70b4-a968dce4c564.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:19:12 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:19:12 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:19:12 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:19:13 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-272e00a9-74a7-4486-7ef9-35abc2152c98.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:19:15 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:19:15 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:19:15 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:19:16 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-42f5d0a3-4f24-481b-732d-36b531ab9df9.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:19:18 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:19:18 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:19:18 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:19:19 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-75d6c135-c4ce-4351-41ba-deacd5b43e5b.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:19:21 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:19:21 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:19:21 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:19:22 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-49ff4f47-3fcb-4b76-7d74-d8ea596d5a7f.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:19:24 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:19:24 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:19:24 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:19:24 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-9c5ec39c-b710-4379-6959-bae18b9decec.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:19:26 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:19:26 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:19:26 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:19:27 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-5e6385dd-bc77-4227-57eb-393390b96d9e.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:19:29 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:19:29 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:19:29 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:19:30 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-88adc0e3-b4ac-450e-6e9b-45f909a1f87f.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:19:32 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:19:32 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:19:32 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:19:33 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-cb830d8e-f730-47f8-484f-7591564e38a8.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:19:35 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:19:35 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:19:35 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:19:36 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-b91b149e-7df2-483d-4c16-b229cf0e756e.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:19:38 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:19:38 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:19:38 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:19:38 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-3b29176d-737f-47ed-55f4-cbdfeb1d37df.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:19:40 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:19:40 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:19:40 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:19:41 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-7a2e4782-6d3a-4f51-6c91-a8a6e15de557.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:19:43 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:19:43 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:19:43 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:19:44 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-0d6e1ab8-184b-4199-75a4-479ea75cf5c5.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:19:46 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:19:46 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:19:46 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:19:47 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-a12995b6-c3f2-48bb-7b14-ebaf752ae858.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:19:49 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:19:49 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:19:49 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:19:49 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-6ab3fd3a-99d8-4b33-78cb-3c0430860faf.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:19:51 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:19:52 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:19:52 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:19:52 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-0046eeda-d766-493d-64d3-1aecc119b6d7.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:19:54 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:19:54 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:19:54 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:19:55 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-3597c9e5-7a8d-4f92-606e-cea2872db075.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:19:57 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:19:57 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:19:57 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:19:58 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-07e885a8-4f64-48da-4ffb-e3c44c26d8de.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:20:00 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:00 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:00 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:20:01 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-b434a001-a5bb-40f8-69bd-2e0e387dffe9.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:20:03 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:03 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:03 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:20:03 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-7460e581-4977-4e4c-5759-50fdd5a9c69c.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:20:05 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:05 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:05 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:20:06 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-194a5a31-827b-47ab-42cb-21de71725711.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:20:08 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:08 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:08 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:20:09 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-b949402a-e930-47ec-58f1-559d027a6d98.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:20:11 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:11 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:11 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:20:12 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-a176ca98-2515-4b45-7701-42474d0ebe75.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:20:14 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:14 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:14 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:20:15 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-bedd7ed4-ee9c-4f51-5193-21ba310949ee.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:20:17 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:17 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:17 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:20:17 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-009d9967-1cda-458b-67e3-6363dbba5060.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:20:19 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:19 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:19 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:20:20 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-624e55e7-9aff-4ed8-6404-335e26866966.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:20:22 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:22 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:22 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:20:23 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-29794604-908d-4dba-6cc0-8844db802e86.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:20:25 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:25 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:25 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:20:26 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-4c339f54-02c1-4c1d-6ad1-e0217194e884.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:20:28 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:28 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:20:28 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:29 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-46d8c6c2-9e32-4f4b-5068-ebd32449824f.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:20:31 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:31 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:31 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:20:31 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-955f2264-a2be-46b9-59cb-518dafa68c6c.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:20:33 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:33 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:33 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:20:34 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-6e55ed7e-c1cb-4cbe-60c0-8a432ad397c3.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:20:36 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:36 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:36 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:20:37 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-256c26f0-6040-46ff-52b5-01a7dbad2737.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:20:39 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:39 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:39 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:20:40 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-95a103bb-845f-47f8-6495-2d57a9491b76.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:20:42 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:42 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:42 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:20:43 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-176ff246-3757-47ed-7ef3-687964b46d49.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:20:45 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:45 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:45 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:20:45 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-7e5a32bf-195b-4f7a-6d8e-d64be912a381.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:20:47 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:47 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:47 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:20:48 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-b3989ac6-8a25-46ec-7750-0d60645b139b.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:20:50 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:50 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:50 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:20:51 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-e74b90b0-b228-4403-615e-0f786111391f.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:20:53 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:53 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:53 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:20:54 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-bf08a828-ed1a-4c7f-55c0-4363aed7672b.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:20:56 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:56 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:56 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:20:57 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-f27f51e0-2fb3-4c8d-5c09-583ae66b7891.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:20:59 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:59 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:20:59 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:20:59 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-49ebc005-9ba8-4ffa-4d90-206c0f727edf.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:21:01 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:21:01 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:21:01 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:21:02 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-379e9c94-8ce0-4de9-61ce-9ef8ef23cd21.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:21:04 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:21:04 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:21:04 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:21:05 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-e873417f-6452-4fa1-5c8e-ae8b3f3d4298.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:21:07 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:21:07 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:21:07 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:21:08 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-17fa3265-98c4-4579-653f-1cc06d918cd2.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:21:10 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:21:10 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:21:10 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:21:11 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-4131f418-cfc7-45b4-449a-ddda31e3d3f4.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:21:13 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:21:13 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:21:13 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:21:13 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-e742580e-a2aa-4fee-4666-82c0ddea7629.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:21:15 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:21:15 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:21:15 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:21:16 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-cd739976-80aa-441d-532e-f8d9c743cbcd.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:21:18 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:21:18 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:21:18 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:21:19 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-950bb3f6-7883-4bbc-6810-29ac122be814.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:21:21 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:21:21 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:21:21 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:21:22 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-39fae136-39b5-452f-627d-0047a3e72d70.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:21:24 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:21:24 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:21:24 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:21:25 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-af7a3bba-b773-4228-7ea9-eab09fd20e38.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:21:27 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:21:27 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:21:27 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:21:27 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-ae5700db-3bea-4a25-5886-b6435e4cfdbf.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:21:29 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:21:29 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:21:29 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:21:30 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-3059c372-e82d-4760-72d2-bacdf0768d51.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:21:32 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:21:32 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:21:32 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:21:33 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-892c607f-329c-4583-7968-a68284cfc39e.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:21:35 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:21:35 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:21:35 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:21:36 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-20945920-a9a7-48fd-4e61-de4a364bc885.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:21:38 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:21:38 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:21:38 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:21:39 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-07e4b0be-1ebf-45c3-6861-995bc76e1f1d.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:21:41 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:21:41 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:21:41 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:21:41 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-9ca9dcb0-43c7-4f08-769d-ff0aaf95084e.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:21:43 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:21:43 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:21:43 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:21:44 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-8c48cc03-f626-4166-68de-867753b3d384.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:21:46 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:21:46 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:21:46 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:21:47 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-d3c3b5c2-cc03-48eb-53bb-5c391d3debb6.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:21:49 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:21:49 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:21:49 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:21:50 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-46545ae7-5d0a-400d-55df-f0371b57ee0a.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:21:52 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:21:52 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:21:52 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:21:53 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-da637a05-2857-4582-59c2-27f14af91412.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:21:55 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:21:55 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:21:55 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:21:55 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-2ba61eb0-f26e-45a3-43bc-0ee6c9e2e51e.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:21:57 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:21:57 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:21:57 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:21:58 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-c41ba7d3-cd8d-4ecb-5b56-c35a0ce8d3c1.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:22:00 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:00 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:00 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:22:01 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-bbcbc7c0-5ac3-4dee-6ee7-8107f6002d7a.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:22:03 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:03 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:03 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:22:04 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-e1bc4836-e8e3-4d69-4159-31ad5c5377e4.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:22:06 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:06 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:06 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:22:07 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-b79b42f5-68b3-47c0-53bf-61e16b6a4173.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:22:09 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:09 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:09 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:22:09 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-afb722b8-e139-431f-7afe-5d733c152421.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:22:11 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:11 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:11 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:22:12 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-2bfde097-1c81-4877-4907-c37db59176dd.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:22:14 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:14 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:14 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:22:15 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-c02a4054-6289-4b32-690b-3f49935d23ee.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:22:17 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:17 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:17 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:22:18 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-e529df32-49d6-4b9b-7408-88a007346e62.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:22:20 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:20 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:20 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:22:21 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-03b554fb-3ba1-42f2-51f6-5da4e077c075.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:22:23 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:23 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:23 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:22:23 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-68b1f0c5-b192-49e9-4f3d-456a412c5f36.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:22:25 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:25 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:25 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:22:26 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-2687b1cc-3f7c-4867-5317-76e370c9a827.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:22:28 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:28 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:28 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:22:29 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-db10e9f0-ecf8-48ed-675e-4ddbbeb5d823.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:22:31 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:31 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:31 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:22:32 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-fd7ea659-5771-453a-4e48-50773cd3ec57.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:22:34 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:34 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:34 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:22:35 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-51c7818b-6102-498f-5f6b-fd5bd38fcbbf.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:22:37 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:37 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:37 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:22:37 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-751f56ba-338f-422d-7beb-4d4d55384c83.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:22:39 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:39 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:39 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:22:40 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-b038b052-06bc-4929-760e-e4b6823f6029.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:22:42 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:42 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:42 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:22:43 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-208b63f9-53ea-44d0-66d3-94c342ea6e56.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:22:45 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:45 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:45 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:22:46 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-8d224f24-b953-40af-5968-9bfe1cb1ca73.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:22:48 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:48 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:48 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:22:48 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-229479fb-7bff-4c67-6d6e-a4541b9532b5.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:22:51 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:51 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:51 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:22:51 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-f29fa895-0fa4-4ae2-75b5-89f9a8f2d5f1.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:22:53 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:53 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:53 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:22:54 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-8096808c-3f79-4214-7345-b0cc02bfad3a.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:22:56 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:56 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:56 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:22:57 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-9f28a378-2672-4706-74c8-4d1a76526271.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:22:59 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:59 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:22:59 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:23:00 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-a8442234-b395-46fa-5c70-9d7ea3e910c0.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:23:02 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:23:02 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:23:02 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:23:02 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-f93e8dc8-d720-497a-5a87-ab24d02021a6.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:23:04 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:23:04 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:23:04 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:23:05 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-071ee60c-d710-45df-5492-57680e6a9473.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:23:07 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:23:07 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:23:07 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:23:08 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-63d749e6-42fb-4f49-78a0-d742412e8e5f.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:23:10 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:23:10 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:23:10 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:23:11 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-7c762e27-cd57-4e04-6b4d-2cb6bda64aa2.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:23:13 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:23:13 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:23:13 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:23:14 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-1eb98dd1-5219-4409-480b-f665199dd4dd.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:23:16 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:23:16 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:23:16 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:23:16 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-cec84406-4ecc-4f33-43bb-5b0c56b87017.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:23:18 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:23:18 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:23:18 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:23:19 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-17f22466-29ab-44c3-7b35-96b71bcd00c5.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:23:21 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:23:21 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:23:21 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:23:22 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-1686cab7-afae-4e6a-4268-5d264c65467c.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:23:24 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:23:24 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:23:24 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:23:25 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-d24af910-c721-4257-5dd3-caadf1880aa1.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:23:27 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:23:27 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:23:27 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:23:28 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-9107d7bb-bba0-471d-6bed-7be77bca6da6.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:23:30 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:23:30 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:23:30 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:23:30 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-2c030f51-666d-4671-4690-69e75125bcea.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:23:32 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:23:32 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:23:32 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:23:33 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-f9cdc6bb-97d4-4ccc-69d8-cabacfcdc1fc.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:23:35 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:23:35 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:23:35 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:23:36 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-3051be82-528a-4584-54bb-9bead9049ebc.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:23:38 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:23:38 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:23:38 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:23:39 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-f042ac8e-88bb-4c29-635d-98f9c57d1de5.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:23:41 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:23:41 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:23:41 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:23:42 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-f63e0951-3281-4b15-5f3f-17a3850bd972.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:23:44 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:23:44 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:23:44 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:23:44 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-c6be1c05-decd-40cd-5213-e1f278a852e4.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:23:46 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:23:46 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:23:46 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:23:47 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-ab9fec24-2f6d-41bb-66d2-bde026650a23.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:23:49 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:23:49 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:23:49 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:23:50 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-bcdc99fd-de06-454d-7859-1cf81aab951a.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:23:52 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:23:52 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:23:52 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:23:53 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-30465d0f-9e48-4248-75c7-cf6b29f7ad48.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:23:55 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:23:55 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:23:55 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:23:56 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-bf7d2f39-e846-48fc-5e2f-dbf78c9351db.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:23:58 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:23:58 [INFO] 0 bytes written for 'uploadData'
2020/06/13 19:23:58 packer-builder-amazon-ebs plugin: Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-5ee47c87-3904-de69-2834-789180a0ebe3.ps1'
2020/06/13 19:23:58 packer-provisioner-powershell plugin: Retryable error: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-44021ade-aff5-4312-7a97-32d82988d8ea.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:23:58 [INFO] (telemetry) ending powershell
==> amazon-ebs: Provisioning step had errors: Running the cleanup provisioner, if present...
==> amazon-ebs: Terminating the source AWS instance...
==> amazon-ebs: Cleaning up any extra volumes...
==> amazon-ebs: No volumes to clean up, skipping
==> amazon-ebs: Deleting temporary security group...
==> amazon-ebs: Deleting temporary keypair...
2020/06/13 19:24:37 [INFO] (telemetry) ending amazon-ebs
2020/06/13 19:24:37 machine readable: error-count []string{"1"}
==> Some builds didn't complete successfully and had errors:
2020/06/13 19:24:37 machine readable: amazon-ebs,error []string{"Error processing command: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\\winrmcp-44021ade-aff5-4312-7a97-32d82988d8ea.tmp: Couldn't create shell: http response error: 401 - invalid content type"}
==> Builds finished but no artifacts were created.
Build 'amazon-ebs' errored: Error processing command: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-44021ade-aff5-4312-7a97-32d82988d8ea.tmp: Couldn't create shell: http response error: 401 - invalid content type
2020/06/13 19:24:37 [INFO] (telemetry) Finalizing.
==> Some builds didn't complete successfully and had errors:
--> amazon-ebs: Error processing command: Error uploading ps script containing env vars: Error uploading file to $env:TEMP\winrmcp-44021ade-aff5-4312-7a97-32d82988d8ea.tmp: Couldn't create shell: http response error: 401 - invalid content type
==> Builds finished but no artifacts were created.
2020/06/13 19:24:38 waiting for all plugin processes to complete...
2020/06/13 19:24:38 /opt/packer: plugin process exited
2020/06/13 19:24:38 /opt/packer: plugin process exited
2020/06/13 19:24:38 /opt/packer: plugin process exited
real 11m27.589s
user 0m6.991s
sys 0m6.146s
[user@localhost ]$
I keep having this same issue coming and going it seems. Packer 1.6.5
==> amazon-ebs: Provisioning with Powershell...
--
230 | ==> amazon-ebs: Provisioning with powershell script: /tmp/powershell-provisioner910983523
231 | amazon-ebs: VERBOSE: Testing path for MSI package.
232 | amazon-ebs: VERBOSE: Testing path for Zip package.
233 | amazon-ebs: VERBOSE: PowerShell 7 Path: C:\Program Files\PowerShell\7\pwsh.exe
234 | amazon-ebs: VERBOSE: C:\vsts\IA\aws-nyl-win-srv-apps
235 | amazon-ebs: VERBOSE: No PowerShell 7 yet...
236 | amazon-ebs: VERBOSE: 1 of 8
237 | ==> amazon-ebs: Provisioning with Powershell...
238 | ==> amazon-ebs: Provisioning with powershell script: scripts/win_config.ps1
239 | ==> amazon-ebs: & : The term 'c:/Windows/Temp/script-5fa5831a-83f3-a9a2-1a8b-363e37d73922.ps1' is not recognized as the name of a
240 | ==> amazon-ebs: cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify
241 | ==> amazon-ebs: that the path is correct and try again.
242 | ==> amazon-ebs: At line:1 char:216
243 | ==> amazon-ebs: + ... 56e64.ps1; &'c:/Windows/Temp/script-5fa5831a-83f3-a9a2-1a8b-363e37d73 ...
244 | ==> amazon-ebs: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
245 | ==> amazon-ebs: + CategoryInfo : ObjectNotFound: (c:/Windows/Temp...63e37d73922.ps1:String) [], CommandNotFoundException
246 | ==> amazon-ebs: + FullyQualifiedErrorId : CommandNotFoundException
247 | ==> amazon-ebs:
248 | ==> amazon-ebs: Provisioning with Powershell...
249 | ==> amazon-ebs: Provisioning with powershell script: /tmp/powershell-provisioner283383853
There seems to be a high degree of inconsistency when working with packer and PowerShell on windows, questioning if it is the right solution.
I've seen this happen when there's a race condition -- winRM is available for Packer to connect to, but the powershell modules aren't all loaded. Adding a pause_before to your first provisioner should clear it up.
Is what you are saying is that when packer creates a temp script file, to place the PowerShell code, it needs more time to complete the file creation, so if you put a pause_before: "10s" it might give it the extra time it needs making sure the file is there? If so, do you know what the default delay is?
no, the "powershell modules" are a windows thing. Basically, windows isn't fully booted even though Packer can connect to it, and that causes problems. The default is no pause. But if you give it an arbitrary pause, that will give the vm time to finish booting.
Or if you don't want to spend much time changing your script you can pass the
skip_clean
option to the provisioner to prevent Packer from trying to cleanup after itself.{ "type": "powershell", "skip_clean": true, "script": "./script/win_cleanup.ps1" }
Feel free to close this issue if the suggested next steps work for you . Cheers!
This fixed the issue for us; we had a cleanup script that was deleting all files from C:\Windows\Temp
and couldn't work out what was happening here. If not for this comment, it would have been even more time consuming to track down.
Can the Packer cleanup step be enhanced to indicate that c:/Windows/Temp/packer-ps-env-vars-<guid>.ps1
was missing at the time Packer attempted to run it / source it / clean it up / whatever it's doing?
@nywilken @SwampDragons I think this is also related https://github.com/hashicorp/packer-plugin-googlecompute/issues/108
While skip_clean
worked for the problem with the cleanup scripts, it seems it's only kicked the problem down the road, as I see it for the packer-ps-env-vars-x
scripts, now - when I didn't previously. This is occurring when attempting to build a Windows Server 2025 Datacenter VM.
==> hyperv-iso.vm: Provisioning with powershell script: C:\Users\FELSOK~1\AppData\Local\Temp\powershell-provisioner3139313841
==> hyperv-iso.vm: . : The term 'c:/Windows/Temp/packer-ps-env-vars-670e338b-e5bf-1a32-1d85-8724ae2abb3d.ps1' is not recognized as the
==> hyperv-iso.vm: name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
==> hyperv-iso.vm: included, verify that the path is correct and try again.
==> hyperv-iso.vm: At line:1 char:138
==> hyperv-iso.vm: + ... ontinue'};. c:/Windows/Temp/packer-ps-env-vars-670e338b-e5bf-1a32-1d8 ...
==> hyperv-iso.vm: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
==> hyperv-iso.vm: + CategoryInfo : ObjectNotFound: (c:/Windows/Temp...724ae2abb3d.ps1:String) [], CommandNotFoundException
==> hyperv-iso.vm: + FullyQualifiedErrorId : CommandNotFoundException
==> hyperv-iso.vm:
This is occurring on 1.11.2 of packer.
packer --version
Packer v1.11.2
Sorry for double-posting comments but I found a work-around, for anyone else who stumbles across this via their internet search (as I did).
The work-around is to install PowerShell manually and then use use_pwsh=true
for all remaining PowerShell commands afterwards.
# Install PowerShell, first, to make pwsh available to the WinRM calls.
provisioner "powershell" {
inline = [
"Invoke-RestMethod https://github.com/PowerShell/PowerShell/releases/download/v7.4.5/PowerShell-7.4.5-win-x64.msi -OutFile C:\\Users\\Datacenter\\Downloads\\PowerShell-7.4.5-win-x64.msi",
"msiexec.exe /package C:\\Users\\Datacenter\\Downloads\\PowerShell-7.4.5-win-x64.msi /quiet ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL=1 ADD_FILE_CONTEXT_MENU_RUNPOWERSHELL=1 ENABLE_PSREMOTING=1 REGISTER_MANIFEST=1 USE_MU=1 ENABLE_MU=1 ADD_PATH=1 DISABLE_TELEMETRY=1"
]
}
This seems to stop the errors related to both the cleanup and vars scripts, as these error conditions appear to be specific to the PS version that's default installed on Win* images (a.k.a.: Windows PowerShell).
When filing a bug, please include the following headings if possible. Any example text in this template can be deleted.
Overview of the Issue
PowerShell Script will run & do the cleanup but the screen output shows RED message
Reproduction Steps
This is cleanup.ps1
Packer version
1.6.0
Simplified Packer Buildfile
Operating system and Environment details
Log Fragments and crash.log files
As above
Set the env var
PACKER_LOG=1
for maximum log detail.I would really like to see a full example of Packer configuring a Windows AMI for ports 5985 and 5986, not snippets but detailed examples with inline and scripts options. Using Packer has been a trouble so far as the documentation around WinRM is bite sized and incomplete.