jetbrains-infra / packer-builder-vsphere

Packer plugin for remote builds on VMware vSphere
Mozilla Public License 2.0
543 stars 175 forks source link

WinRM times out: infinite '401 - invalid content type - Builder' response ('vsphere-iso' + Win10) #281

Open HealthyJR opened 4 years ago

HealthyJR commented 4 years ago

Hi .

we do run into WinRM timeouts constantly - IF we do not configure a sleep for an amount of time before configuring WinRM with the widelyknown script/steps. (see Sleep180Seconds.ps1 and ConfigureWinRm.ps1 from Autoattended.xml) WinRM/packer never establishes any connection and times out. Any recommendations how to remove this workaround? Kind regards J

<settings pass="oobeSystem">
   ...
      <FirstLogonCommands>
         <SynchronousCommand wcm:action="add">
            <Order>1</Order>
            <CommandLine>powershell -NoLogo -ExecutionPolicy Bypass -File a:\Sleep180Seconds.ps1</CommandLine>
              <RequiresUserInput>true</RequiresUserInput>
         </SynchronousCommand>
         <SynchronousCommand wcm:action="add">
              <Order>2</Order>
              <CommandLine>powershell -NoLogo -ExecutionPolicy Bypass -File a:\ConfigureWinRm.ps1</CommandLine>
              <RequiresUserInput>true</RequiresUserInput>
         </SynchronousCommand>
...

packer.log ConfigureWinRm.ps1