VMware scripted installations kept dumping out of the installation for “no reason”

On a recent job, I was plagued with one of my ks.cfg scripts whereby everything would be getting configured, then BLAM-MO.  I’d get dumped to the login prompt with no further configuration taking place.

I correctly surmised that it was taking place around the creation of the vmkernel port for vMotion.  However, I incorrectly surmised that it was something to do with my vmkernel syntax.

After this happening about half a dozen times, I decided to fire up Snag-it’s video capture feature.  I captured the entire install up to the point of failure.  There was a “red blip” that happened when the install would fail.  However, it was so fast that the human eye couldn’t catch it.  I was hoping Snagit video capture would (I could’ve used Camtasia, but I wanted to try the built in snagit one.

Thanks to snagit, I finally saw the error and corrected my script. (It was a syntax problem, just nothing to do with configuring vmware networking as you’ll see).

In my scripting I create a bunch of “echo” comments in order for me to know where the script is during the build.  What I didn’t know is that you cannot have the “(” character in a “working” part of the script.  That is, you may use ( within comments, but you cannot use them when the interpreter actually runs them….EVEN in an echo statement.

Here’s the error:

The offending code was:
echo assigning IP address to vmknic withOUT Jumbo frames (removed -m 9000)

So I ended up just deleting the “(” and “)” in the echo command and viola:
echo assigning IP address to vmknic withOUT Jumbo frames removed -m 9000

Now the script works without issue.  I hope this helps anyone out there so you don’t spend days debugging it!

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s