Hi Guys,
I'm having some problem with running the shell provisioner in vmware-iso builder, following is the error that i get
2014/10/13 16:34:51 packer-builder-vmware-iso: 2014/10/13 16:34:51 scp stderr (length 25): Sink: C0644 26 script.sh
2014/10/13 16:34:51 packer-builder-vmware-iso: 2014/10/13 16:34:51 opening new ssh session
2014/10/13 16:34:51 packer-builder-vmware-iso: 2014/10/13 16:34:51 starting remote command: chmod 0777 /tmp/script.sh
2014/10/13 16:34:51 packer-builder-vmware-iso: 2014/10/13 16:34:51 remote command exited with '0': chmod 0777 /tmp/script.sh
2014/10/13 16:34:51 packer-builder-vmware-iso: 2014/10/13 16:34:51 [INFO] RPC endpoint: Communicator ended with: 0
2014/10/13 16:34:51 [INFO] RPC client: Communicator ended with: 0
2014/10/13 16:34:51 [INFO] RPC endpoint: Communicator ended with: 0
2014/10/13 16:34:51 packer-command-build: 2014/10/13 16:34:51 [INFO] RPC client: Communicator ended with: 0
2014/10/13 16:34:51 packer-command-build: 2014/10/13 16:34:51 [INFO] RPC endpoint: Communicator ended with: 0
2014/10/13 16:34:51 [INFO] RPC client: Communicator ended with: 0
2014/10/13 16:34:51 [INFO] RPC endpoint: Communicator ended with: 0
2014/10/13 16:34:51 packer-provisioner-shell: 2014/10/13 16:34:51 [INFO] RPC client: Communicator ended with: 0
2014/10/13 16:34:51 packer-builder-vmware-iso: 2014/10/13 16:34:51 opening new ssh session
2014/10/13 16:34:51 packer-builder-vmware-iso: 2014/10/13 16:34:51 starting remote command: chmod +x /tmp/script.sh; PACKER_BUILD_NAME=vmware-iso PACKER_BUILDER_TYPE=vmware-iso /tmp/script.sh
vmware-iso: bash: /tmp/script.sh: #!/bin/sh: bad interpreter: Permission denied
2014/10/13 16:34:51 ui: vmware-iso: bash: /tmp/script.sh: #!/bin/sh: bad interpreter: Permission denied
2014/10/13 16:34:51 packer-builder-vmware-iso: 2014/10/13 16:34:51 remote command exited with '126': chmod +x /tmp/script.sh; PACKER_BUILD_NAME=vmware-iso PACKER_BUILDER_TYPE=vmware-iso /tmp/script.sh
2014/10/13 16:34:51 packer-builder-vmware-iso: 2014/10/13 16:34:51 [INFO] RPC endpoint: Communicator ended with: 126
2014/10/13 16:34:51 [INFO] 0 bytes written for 'stderr'
2014/10/13 16:34:51 [INFO] 69 bytes written for 'stdout'
2014/10/13 16:34:51 [INFO] RPC client: Communicator ended with: 126
2014/10/13 16:34:51 [INFO] RPC endpoint: Communicator ended with: 126
2014/10/13 16:34:51 packer-command-build: 2014/10/13 16:34:51 [INFO] 0 bytes written for 'stderr'
2014/10/13 16:34:51 packer-command-build: 2014/10/13 16:34:51 [INFO] 69 bytes written for 'stdout'
2014/10/13 16:34:51 packer-command-build: 2014/10/13 16:34:51 [INFO] RPC client: Communicator ended with: 126
2014/10/13 16:34:51 packer-command-build: 2014/10/13 16:34:51 [INFO] RPC endpoint: Communicator ended with: 126
2014/10/13 16:34:51 [INFO] RPC client: Communicator ended with: 126
2014/10/13 16:34:51 [INFO] 0 bytes written for 'stderr'
my provisioner is as following
"provisioners": [
{
"type": "file",
"source": "/root/test",
"destination": "/root",
"only": ["vmware-iso"]
},
{
"type": "shell",
"scripts": [
"/root/test/install.sh"
]
},
{
"type": "shell",
"inline": ["sleep 1000"],
"only": ["vmware-iso"]
}
]
I copy few files and then run a script that i already copied. Any suggestions would be great here on what is going wrong.
Thank You
-Sheshagiri