#1 2019-04-16 11:12:44

admin
Administrator
Registered: 2017-04-21
Posts: 802

ESXi 6.7U2 bash interpreter bug: syntax error: unexpected &

Some changes in the bash interpreter bundled with ESXi have caused some kind of incompatibility in ESXi 6.7U2. We'll fix this issue in short so that XSIBACKUP-PRO is compatible with version 6.7U2

xsibackup: line 605: syntax error: unexpected "&"

Offline

#2 2019-04-16 17:31:58

admin
Administrator
Registered: 2017-04-21
Posts: 802

Re: ESXi 6.7U2 bash interpreter bug: syntax error: unexpected &

UPDATE 1:

We have found that VMWare has upgraded Busybox from v 1.22 to 1.29 in their latest minor update ESXi 6.7 U2
The bash interpreter bundled with this Busybox version treats some text inside quotes, even single quotes ;-( as code and tries to parse it through the interpreter instead of escaping it. We have found this to happen with parenthesis and ampersands, but may affect other characters too.

This apparent bug will affect, not only XSIBackup, but any other bash scripts that may be needed by ESXi, including service scripts.

We recommend that you skip this build by now and wait to see if VMWare does something in regards to this issue.

UPDATE 2:

As per our latest tests, it seems to be affecting even commented out text, so we believe this to be a Busybox/ ESXi bug.

Offline

#3 2019-04-17 09:46:25

admin
Administrator
Registered: 2017-04-21
Posts: 802

Re: ESXi 6.7U2 bash interpreter bug: syntax error: unexpected &

This is a clear bug in the bash interpreter of Busybox. We can provide a solution for those that for some reason cannot skip this ESXi version (6.7 U2), although, as this bug will affect any other bash script, and there are some used by ESXi internally, using this version in production is a kind of shooting your feet.

Workaround:

1: copy some older busybox release from an older version of ESXi to your xsi-dir/bin folder in ESXi 6.7 U2. We used busybox in ESXi 6.5, its location is:

/usr/lib/vmware/busybox/bin/busybox

2: create a hardlink in the xsi-dir named sh and pointing to the busybox binary you just copied.

ln -s /vmfs/volumes/datastore1/xsi-dir/bin/busybox /vmfs/volumes/datastore1/xsi-dir/sh

3: change the shebang at the top of the xsibackup script and point it to the newly created sh link

#!/vmfs/volumes/datastore1/xsi-dir/sh

This is just a quick workaround that we have not tested thoroughly, so use at your own risk. The recommended procedure is to skip this broken ESXi release.

Offline

#4 2019-04-19 18:19:59

admin
Administrator
Registered: 2017-04-21
Posts: 802

Re: ESXi 6.7U2 bash interpreter bug: syntax error: unexpected &

We can provide an upgrade (v. 11.2.5) that contains a fix for this issue. The fix consists in XSIBackup being shipped with its own bash interpreter, still XSIBackup will depend on the other Busybox utilities present in ESXi PATH variable.

Contact support to get the update, we won't publish it for download ultil it has gone through the regular verification and testing process.

The near future evolution of XSIBackup will be to use its own shell, avoiding this way any incompatibility caused by the ESXi shell utilities. It will then depend on the ESXi's GlibC library mainly.

Offline

#5 2019-05-02 15:27:26

admin
Administrator
Registered: 2017-04-21
Posts: 802

Re: ESXi 6.7U2 bash interpreter bug: syntax error: unexpected &

VMWare has finally released a fix for the broken bash in ESXi 6.7.0 U2
https://docs.vmware.com/en/VMware-vSphe … g-resolved

We recommend that you skip this version until a more stable build is reached or that you patch your ESXi box with the most recent fix to use XSIBackup.

Offline

Board footer