vmware web-konsole stürzt nach CentOS-Upgrade ab

[stextbox id=“warning“ caption=“Achtung“]Ab CentOS 5.6 ist das Problem mit der glibc zwar wieder behoben; doch dann stürzt die vmware-konsole ab (vmware-hostd mit einem „Segemnation fault“), wenn der hack aktiv ist!

Um das Problem dann wieder zu lösen muss man lediglich in /usr/sbin/vmware-hostd die zweitletzte Zeile

export LD_LIBRARY_PATH=/usr/lib/vmware/lib/libc.so.6:$LD_LIBRARY_PATH

auskommentieren oder löschen.

Diese Beschreibung bleibt deshalb nur noch als Referenz hier und für solche welche den Hack früher schon mal gemacht hatten. – Falls der Hack noch nicht ausgeführt wurde, sollte man ab jetzt gleich auf CentOS 5.6 upgraden.[/stextbox]

Nach dem upgrade von CentOS 5.3 auf 5.4 oder eine höhere Version stürzt die vmware web-konsole mit einem "HTTP error code" ab.

Grund ist ein bug in vmware, der mit der aktuellen glibc nicht zurecht kommt.

Glücklicherweise lässt sich dies aber sehr einfach lösen, indem man die alte glibc herunter lädt und diese mit vmware verlinkt.

Folgendes script löst das Problem automatisch:

#!/bin/bash
###########################################
# This may help using the vmware-server2  #
# on a CentOS 5.4 x86_64 Host.            #
# There is a problem with the the libc    #
# More informations:                      #
# <a href="http://bugs.centos.org/view.php?id=3884" target="blank">http://bugs.centos.org/view.php?id=3884</a> #
#-----------------------------------------#
# Version 0.1                             #
# This script will get the 'old' libc     #
# from the CentOS 5.3 repositories and    #
# configures vmware-server2 to use this   #
# The original libc (for the 5.4-system)  #
# will not be replaced or touched.        #
#-----------------------------------------#
# License: Do with the code whatever you  #
# want. This came without any warrenty.   #
###########################################
 
LIBC_DIR="/usr/lib/vmware/lib/libc.so.6"
TEMP_DIR="/tmp/vmw_glibc"
VMWARE_CONFIGFILE="/usr/sbin/vmware-hostd"
VMWARE_CONFIGFILE_BAK=$VMWARE_CONFIGFILE.bak
 
# Checking for root
if <span class="keys"> $EUID -ne 0 </span>; then
    echo "This script must be run as root"
    exit 1
fi
 
# We test for the commands  we need:
echo "Looking for some commands I need..."
which wget
if [ $? != 0 ]; then
    echo "I can't find wget but need it to download the files. Please install."
fi
which rpm2cpio
if [ $? != 0 ]; then
    echo "I can't find rpm2cpio but need it to extract Files from a .rpm-file. Please install."
fi
 
# Creating a directory for the 'old' glibc
mkdir -p $LIBC_DIR
if [ $? != 0 ]; then
    echo "Can't create directory $LIBC_DIR"
    exit 2
fi
 
# Removing and creating a temporary directory for the rpm,
# downloading it, extracting the old glibc and copy
# the them to our new directory
rm -rf $TEMP_DIR
mkdir -p $TEMP_DIR
if [ $? != 0 ]; then
    echo "Can't create directory $TEMP_DIR"
    exit 2
fi
cd $TEMP_DIR
wget <a href="http://vault.centos.org/5.3/os/x86_64/CentOS/glibc-2.5-34.x86_64.rpm" target="blank">http://vault.centos.org/5.3/os/x86_64/CentOS/glibc-2.5-34.x86_64.rpm</a>
if [ $? != 0 ]; then
    echo "Something was wrong while downloading"
    exit 2
fi
rpm2cpio glibc-2.5-34.x86_64.rpm | cpio -ivd
mv lib64/libc-2.5.so $LIBC_DIR/libc.so.6
if [ $? != 0 ]; then
    echo "Can't move the libc into directory $LIBC_DIR"
    echo "Removing temporary files..."
    echo -rf $TEMP_DIR
    exit 2
fi
echo "The file libc-2.5.so from the centOS 5.3 rep. was saved in: $LIBC_DIR as libc.so.6"
 
echo "Removing temporary files..."
rm -rf $TEMP_DIR
 
# Now we editing the start-config of the vmware-server
echo "I must change $VMWARE_CONFIGFILE now, you will find a backup in $VMWARE_CONFIGFILE_BAK"
mv $VMWARE_CONFIGFILE $VMWARE_CONFIGFILE_BAK
cat $VMWARE_CONFIGFILE_BAK | grep -v 'eval exec "$DEBUG_CMD" "$binary" "$@"' > $VMWARE_CONFIGFILE
echo export LD_LIBRARY_PATH=$LIBC_DIR/libc.so.6:'$LD_LIBRARY_PATH' >> $VMWARE_CONFIGFILE
echo '' >> $VMWARE_CONFIGFILE
echo 'eval exec "$DEBUG_CMD" "$binary" "$@"' >> $VMWARE_CONFIGFILE
 
# Ensuring the script is executable
chmod 555 $VMWARE_CONFIGFILE
 
echo "Everything is done, please restart your vmware-server2"

Inhalt

Troubleshooting

Nach dem ausführen des scriptes sollte überprüft werden ob das file: /usr/sbin/vmware-hostd ausführbar ist.

Weiter öffnet man am besten mal: /usr/sbin/vmware-hostd und prüft die unterste export Zeile; dabei muss man darauf achten, dass LD_LIBRARY_PATH auf das Verzeichnis zeigt wo die "libc.so.6" liegt und nicht das File selbst!

So ist es falsch:

export LD_LIBRARY_PATH=/usr/lib/vmware/lib/libc.so.6/libc.so.6:$LD_LIBRARY_PATH

So sieht die korrekte export-Zeile aus:

export LD_LIBRARY_PATH=/usr/lib/vmware/lib/libc.so.6:$LD_LIBRARY_PATH

(Dies wird manchmal vom script durcheinander gebracht)

Nach einem vmware-neustart sollte sich dann die Konsole wieder öffnen lassen.

[stextbox id=“note“ caption=“Hinweis“]Seit der Firefox-Version 3.6 lässt sich die vmware Web-Konsole nicht mehr korrekt öffnen; dies ist jedoch nicht mit diesem bug relevant, sondern ein Bug im Firefox-Plugin.[/stextbox]

Related Links

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert