I have encounter issue.
Obviously there is no such as Azure Linux Agent under AWS. But the point is to run packer from the same source code in parallel. AWS part and Azure is in the same packer json file. So Provisioner is executing the same scripts and commands for both Azure and AWS.
{
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} sudo -E sh '{{ .Path }}'",
"inline": [
"/usr/sbin/waagent -force -deprovision+user && export HISTSIZE=0 && sync"
],
"inline_shebang": "/bin/sh -x",
"type": "shell",
"skip_clean": true,
"pause_before": "5s"
}
ERROR:
amazon-ebs: /tmp/script_9362.sh: line 2: /usr/sbin/waagent: No such file or directory
==> amazon-ebs: Cleaning up any extra volumes...
==> amazon-ebs: Destroying volume (vol-03eec40b543b65765)...
==> amazon-ebs: Deleting temporary keypair...
Build 'amazon-ebs' errored: Script exited with non-zero exit status: 127