Short answer: If lsdoctor.py stops right after launch with IndexError: list index out of range in _getVersion, the vCenter Server Appliance has a custom login banner in /etc/issue. lsdoctor reads the vCenter version from that file. Broadcom KB 320837 says to put the default two-line content back for the run, with your real version number, run lsdoctor, then restore your banner. The KB does not list an lsdoctor build that fixes this.
This page covers only this one error. For download, options (-l, -t, -s, -u, -r, -p) and usage, see the lsdoctor guide: check and repair the vCenter Lookup Service.
The lsdoctor IndexError traceback
This is the error exactly as Broadcom KB 320837 shows it (vCenter Server 8.0.3.00000, lsdoctor-240201). It happens before lsdoctor asks for the SSO password, so no check or repair has run yet:
[ ~/lsdoctor-240201 ]# ./lsdoctor.py -l
Traceback (most recent call last):
File "/root/lsdoctor-240201/./lsdoctor.py", line 547, in <module>
main()
File "/root/lsdoctor-240201/./lsdoctor.py", line 458, in main
params = parameters()
File "/root/lsdoctor-240201/./lsdoctor.py", line 136, in parameters
params = get_params()
File "/root/lsdoctor-240201/lib/utils.py", line 1349, in __init__
version, build = _getVersion()
File "/root/lsdoctor-240201/lib/utils.py", line 145, in _getVersion
version = version.rsplit(' ',1)[1]
IndexError: list index out of range
Here is how to recognise it: the last frame is _getVersion in lib/utils.py, and the failing line is version.rsplit(' ',1)[1]. That code splits a line of text at the last space and takes the part after it. It expects something like VMware vCenter Server 8.0.3.00000. If the line it reads has no space-separated version at the end, the split returns a single element and index [1] does not exist. Line numbers differ between lsdoctor builds. The function name and the rsplit line are the parts to match.
Root cause: a custom /etc/issue login banner
KB 320837 says the script “will fail with below error” if /etc/issue has been changed to hold a custom login banner. Security teams often ask for a legal banner on the appliance console and SSH, and the easy way is to overwrite /etc/issue. The appliance keeps running normally, but lsdoctor can no longer work out which vCenter build it is on. That build decides which service registration template lsdoctor loads.
The default content the KB expects (the example is for 8.0.3.00000) is:
VMware vCenter Server 8.0.3.00000
Type: vCenter Server with an embedded Platform Services Controller
Fix: restore the default banner for the lsdoctor run
This follows the KB’s procedure. It adds a backup of your banner and uses standard shell commands on the VCSA as root:
- Note your exact vCenter version, for example from the VAMI Summary page (
https://<vcenter>:5480). The KB warns that the version in the file must match your actual vCenter version. Do not paste 8.0.3.00000 into a different build. - Back up the custom banner:
cp /etc/issue /root/issue.custom - Write the default content, with your own version on line 1 (see the block below).
- Run lsdoctor from its extracted directory, for example
python lsdoctor.py -l. It should now ask for the SSO administrator password and run. - Put your banner back:
cp /root/issue.custom /etc/issue
cp /etc/issue /root/issue.custom
cat > /etc/issue <<'EOF'
VMware vCenter Server 8.0.3.00000
Type: vCenter Server with an embedded Platform Services Controller
EOF
cat /etc/issue
python lsdoctor.py -l
cp /root/issue.custom /etc/issue
If you plan to use a repair option (-t, -s, -u, -r) rather than the read-only -l check, leave the default banner in place until you have finished. Follow the KB warning too: take offline snapshots of every vCenter/PSC in the SSO domain at the same time before any change.
Is there an lsdoctor build that fixes the IndexError?
Not a documented one. In September 2026, KB 320837 attaches lsdoctor-260716.zip (hash added 07/16/2026). The same KB still includes the custom-banner note and the traceback above, and gives no fixed build. So download the current ZIP from the KB (the KB page is public and lists the MD5/SHA256 hashes), but do not expect a newer build alone to remove the error. Plan on the banner workaround.
| Item | Status in KB 320837 |
|---|---|
| Error | IndexError: list index out of range in _getVersion |
| Trigger | /etc/issue changed to a custom login banner |
| Example version in the KB | vCenter Server 8.0.3.00000 (lsdoctor-240201 in the traceback) |
| Workaround | Restore default content with the correct version, run, then revert |
| Fixed lsdoctor build | Not documented (current attachment: lsdoctor-260716.zip) |
| Supported vCenter | 6.7 and later, including 7.x, 8.x and 9.x |
Impact and how to avoid it next time
- The custom banner does not affect vCenter services. It only blocks lsdoctor, so you cannot run Lookup Service checks or repairs until the file is back to default.
- Add “restore default
/etc/issue” to your lsdoctor runbook. Keep the approved banner text in a file (for example/root/issue.custom) so reverting takes one command. - After a vCenter update, the version in the default content changes. Always write the version of the build you are running now.
Sources
- Broadcom KB 320837 – Using the ‘lsdoctor’ Tool (custom banner note, traceback, current ZIP and hashes)

