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.
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!