Назад | Перейти на главную страницу

Не удается запустить сценарий sysprep EC2 с упаковщиком

Это последний сценарий, который я запускаю в манифесте:

    {
      "type": "powershell",
      "inline": [
        "Write-Host '===== Configure sysprep behaviour ====='",
        "C:\\ProgramData\\Amazon\\EC2-Windows\\Launch\\Scripts\\SendWindowsIsReady.ps1 -Schedule",
        "C:\\ProgramData\\Amazon\\EC2-Windows\\Launch\\Scripts\\InitializeInstance.ps1 -Schedule",
        "C:\\ProgramData\\Amazon\\EC2-Windows\\Launch\\Scripts\\SysprepInstance.ps1 -NoShutdown"
      ]
    }
  ]

Но я получаю ошибку в сборке:

020/06/19 20:57:26 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-5eed5bcf-965d-d55c-1aab-e76af845b5d4.ps1; &'c:/Windows/Temp/script-5eed5bcf-d0f8-04e5-f6c5-c4117d28842d.ps1'; exit $LastExitCode }"' exited with code: 0
2020/06/19 20:57:26 packer-builder-amazon-ebs plugin: [INFO] RPC endpoint: Communicator ended with: 0
2020/06/19 20:57:26 [INFO] 414 bytes written for 'stdout'
2020/06/19 20:57:26 [INFO] 0 bytes written for 'stderr'
2020/06/19 20:57:26 [INFO] RPC client: Communicator ended with: 0
2020/06/19 20:57:26 [INFO] RPC endpoint: Communicator ended with: 0
2020/06/19 20:57:26 packer-provisioner-powershell plugin: [INFO] 414 bytes written for 'stdout'
2020/06/19 20:57:26 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'stderr'
2020/06/19 20:57:26 packer-provisioner-powershell plugin: [INFO] RPC client: Communicator ended with: 0
2020/06/19 20:57:26 packer-provisioner-powershell plugin: c:/Windows/Temp/script-5eed5bcf-d0f8-04e5-f6c5-c4117d28842d.ps1 returned with exit code 0

Я не могу понять, что заставило его выйти из строя