VMware Cloud Community
richdenis
Enthusiast
Enthusiast

vCloud Customization Script Timeout

Hi,

I have a vApp, that I added a script to.  The script's purpose is to wget a file and then install it.  The problem seems to be that the script never finished executing.  Its as if there is a timeout.  I have seen other producs with customization features and timeouts but nothing that says if that timeout is adjustable.  My question is simply, Is there a way to adjust the timeout for the Script Customization?  Is there somewhere I can look on the machine for confirmation of a timeout?

Some additional info.  I have tried a more simplistic script that whose payload is small in size <1M and it all works.  The other tell tale smell of a timeout is the file is downloaded at east in part.   I get about 30 of the 200Mb downloaded.

Thanks    

Reply
0 Kudos
5 Replies
keiooz
Enthusiast
Enthusiast

Where did you get this type of script? Is it part of VMware feature?

Reply
0 Kudos
richdenis
Enthusiast
Enthusiast

Hi Kelly

The script I have is something I created.  It is a simple sh script that I uploaded.  it looks like:

cd /root

wget http://dl.dropbox.com/someLargeFile

unzip someLargeFile

cp largeFile to new location

Nothing fancy.  As I said, if I change that to someSmallFile then the script executes to completion.

Thanks

Rich

Reply
0 Kudos
nirvy
Commander
Commander

I don't know if there is a timeout but you should wrap your script with some logic as per the users guide or it will run both in pre and post customization...

do you have enough space in /root for the file?

Reply
0 Kudos
richdenis
Enthusiast
Enthusiast

Hi Nirvy,

Thanks for your reply.  I changed the script up some and put my commands in the postcustomization section.

When the machine booted up I logged in and I could see that the file was being downloaded.  The download dies around 200Mb, sometimes a bit more and sometimes less.

My assumption is it is hitting a timeout.

I am certain that the script works and that it has enough space since once logged in I can execute an sh file with the same commands and the script runs to completion.  Also if I put the script into rc.local the script will run on startup. 

Any other ideas?

Rich

Reply
0 Kudos
richdenis
Enthusiast
Enthusiast

SOLVED:

While I have not been able to figure out how to change the timeout, what I did was to use the customization script as a way to inject into rc.local the code to run a script that I also inject onto the system.  This way this script executes fast, and I can then use the OS's native startup services.

Here is a sample of what the solution looks like for anyone else that may find themselves here.

#!/bin/sh
if [ x$1 == x"postcustomization" ]; then
echo cd /root >> /root/install-my-file.sh
echo wget http://dl.dropbox.com/u/xxxxxxxxx/my-installer.sh >> /rootinstall-my-file.sh

echo sh install-my-file.sh-q -varfile response.varfile >> /root/install-my-file.sh
echo rm install-my-file.sh >> /root/install-my-file.sh
echo 'nohup sh /root/install-my-file.sh &' >> /etc/rc.local
fi

Reply
0 Kudos