VMware Server 2 on CentOS 5.4

centos-logo

Well, I’m sure that there are many people that are running VMware Server 2 on CentOS 5. After all, it’s one of the major Host OSes that VMware recognizes. Popularity notwithstanding, there is a major bug that can bring your VM screamer to a hault.

CentOS 5.4 has a new glibc package that essentially breaks VMware Server’s hostd process. There are many posts out there regarding the issues, and various means of fixing them. However, I am just going to summarize info I’ve found out there on the net, and hopefully you should be able to follow very easily and get your VMs back up and running.

PROBLEM:

VMware Server 2 (hostd) crashes on CentOS 5 after upgrading to the latest releases of glibc and glibc-common

NOTE ON SOLUTIONS: There are two methods to solve this. The first requires downgrading the libraries system-wide. This should be fine if you only use the CentOS host as a VMware Server Host and nothing else. However, if you are in doubt whether your other applications, etc. on that host will run on a slightly older version of glibc, please use SOLUTION METHOD 2 as it will only affect VMware, and essentially tell VMware Server where to look for the correct libraries it needs.

Disclaimer: I am not responsible for you rendering your server useless. When in doubt, don’t upgrade to CentOS 5.4… Although, you probably already did that, and this is why you’re here.

SOLUTION METHOD 1:

Step 1: Go to /etc/yum.repos.d and copy the file CentOS-Base.repo to CentOS53-Base.repo

Step 2: In CentOS53-Base.repo, rename all the packages to reflect the 5.3 version. So, change:

[base] --> [base53]
[updates] --> [updates53]
[addons] --> [addons53]
[extras] --> [extras53]
[centosplus] --> [centosplus53]
[contrib] --> [contrib53]

Step 3: In CentOS53-Base.repo, replace all instances of release=$releasever with release=5.3

Step 4: Now, downgrade the glibc and glibc-common libraries by running the following commands:

yum downgrade glibc glibc-common

Step 5: To avoid any problems with future upgrades/updates, it would be best to exclude them from the list of available updates on yum. Add the following to your /etc/yum.conf file:

exclude=glibc glibc-common glibc-devel glibc-headers glibc-utils nscd

Step 6: Reboot the server, and now re-run /usr/bin/vmware-config.pl to reconfigure with downgraded glibc libraries.

/usr/bin/vmware-config.pl

Step 7: (Optional) Run the following command to make sure future upgrades/updates will not download the updated glibc* libraries.

yum list glibc*

Now, if you have other applications installed on CentOS, and you don’t want to worry about any issues with future use of glibc on your server, please follow the next method to manually link VMware hostd process to use the older glibc libraries.

SOLUTION METHOD 2:

(Make sure you are logged in as root for these steps)

Step 1: Install the latest 2.0.2 VMware Server package and run the configuration. It will crash, but just ignore this for now.

Step 2: Run the following command, and make note of the response.

arch

Step 3: Run the following commands, and replace any instance of {ARCH} with the result of Step 2:

mkdir ~/vmwareglibc
cd ~/vmwareglibc
wget http://mirror.centos.org/centos/5.3/os/{ARCH}/CentOS/glibc-2.5-34.{ARCH}.rpm
rpm2cpio glibc-2.5-34.{ARCH}.rpm | cpio -ivd
mkdir /usr/lib/vmware/lib/libc.so.6
mv lib64/libc-2.5.so /usr/lib/vmware/lib/libc.so.6/libc.so.6

Step 4: Open the VMware hostd process script for editing.

vim /usr/sbin/vmware-hostd

Step 5: At line 372, before the program is called, insert two empty lines and add the following:

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

Before Example:

if [ ! "@@[email protected]@" = 1 ]; then
     export MALLOC_CHECK_=2
fi
 
eval exec "$DEBUG_CMD" "$binary" "[email protected]"

After Example:

if [ ! "@@[email protected]@" = 1 ]; then
     export MALLOC_CHECK_=2
fi
 
export LD_LIBRARY_PATH=/usr/lib/vmware/lib/libc.so.6:$LD_LIBRARY_PATH
 
eval exec "$DEBUG_CMD" "$binary" "[email protected]"

NOTE: In Step 3, the wget command may in the future be this as 5.3 repositories are taken off of the main CentOS Mirrors:

wget http://vault.centos.org/5.3/os/{ARCH}/CentOS/glibc-2.5-34.{ARCH}.rpm

Either method you use should get you the desired end result: VMware Server 2 running on CentOS 5.4

Be sure to comment if this helped you. Thanks.

2/11/2010 UPDATE: A bug exists to where if you’re on the VMware Host server and trying to access the VMware Web Access UI with HTTPS via Firefox you will simply see a blank screen. Instead, use http://:8222/ui

2/12/2010 UPDATE: Firefox 3.6 does not work with the Remote Console Plugin – you must use 3.5.7 or earlier, Internet Explorer, or use the VI Client. – VMware Communities Thread

David Markley

Well, I was born to my parents... and did the school thing, and then work. So, pretty standard humanoid setup... :-)

  • Pingback: VMware Server 2 on CentOS 5.4 | Just linux!()

  • Dear David, i will try tonight

  • snevigat

    I've followed “SOLUTION METHOD 1” and it worked absolut perfect for our environment.
    Thanks a lot!

  • spsah

    Hi David,

    This post is a life saver for me. I was so frustrated with crashing VM server 2.x on my CentOS 5.4 for the past 1 month that today I decided to downgrade to VM Server 1.x but just before that I found your post.

    Tried METHOD1 and I can immediately I can see the difference. Earlier I had to run this commane ” /etc/init.d/vmware-mgmt restart ” after almost every mouse click when managing the VM Guests. I will try method 2 on another server and post of comment if I find anything different.

    Thanks a again for this great post.

  • Nate Davis

    Option 2 worked great for me. Don't know why Option 1 didn't, but doesn't matter as long as it works. Thanks so much for the Tip. Saved me tonight!!!!!

  • Roberto Mason

    I've got two system, x86_64 and i686, Centos 5.4. On he X86_64, no problem,it works quite well. On the i686, I repaced the (ARCH}, with i386. and on the move command <<mv lib64/libc-2.5.so /usr/lib/vmware/lib/libc.so.6/libc.so.6>> I replace the lib64 with lib. All the steps execute properly. I modify the vmware-hostd file, restart vmware. I'm unable to open the web page. No login appears. When I remove the export line, and restart vmware, the page loads.

    Unless I made a mistake, (I did these steps twice on the i686, there's a problem here. As I said on my 64bit Centos, it works fine.

    🙂

  • Roberto,

    I don't have a 32-bit CentOS machine right now to test this on, but try this:

    Use this URL when following Solution Method 2 and Step 3 under the wget line – http://mirror.centos.org/centos/5.3/os/i386/Cen

    CentOS has the arch folder as i386, but there are two packages for glibc – one for i386 and one for i686.

    Continue with the rest of the steps to see if that corrects the issue.

    -David

  • Roberto Mason

    Hi David, Following your suggestion, this is what I did:
    1. deleted vmwreglibc directory
    2. deleted /usr/lib/vmware/lib/libc.so.6 directory
    3. Ran the following lines in a script file:

    mkdir ~/vmwareglibc
    cd ~/vmwareglibc
    wget http://mirror.centos.org/centos/5.3/os/i386/Cen
    rpm2cpio glibc-2.5-34.i686.rpm | cpio -ivd
    mkdir /usr/lib/vmware/lib/libc.so.6
    mv -v lib/libc-2.5.so /usr/lib/vmware/lib/libc.so.6/libc.so.6

    4 made sure that that the export line was in file vmware-hostd

    if [ ! “@@[email protected]@” = 1 ]; then
    export MALLOC_CHECK_=2
    fi

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

    eval exec “$DEBUG_CMD” “$binary” “[email protected]

    5 rebooted the server.

    Result, I now get a blank webpage – status bar says done.

  • Roberto Mason

    As the saying goes, stop the presses. What I tried after installing the I686 version of glibc, I reran vmware-conf.pl, and it now works. I'll do some more testing tonight, ex. adding a virtual machine, and let u know tomorrow

  • Roberto Mason

    I've been testing it out. Vmware on Centos 5.4 I386 works well. David, I thank you immensely. Happy New Year

  • Great to hear, Roberto. Glad it's working for you, and Happy New Year to you as well.

  • sjutech

    Solution 1: I fololwed the instructions and all was working well… So i took a shot and ran yum update. Even after excluding the glibc and glic-common files from the YUM.repose.conf i ran the YUM updates and it somehow updated the glibc files again.

    Is there additional files that need to be excluded to be sure this is not a problem?

  • SJUTECH

    Found 1 issue witht the exclude line in the yum.conf file:

    exclude=glibc glibc-common glibc-devel glibc-headers glibc-utils nscd

    what was fixed is the glibc=headers and added glibc-utils since I was still getting updates after that casued it to break the VMserver.

    this line should exclude all glibc

  • You are correct. I have edited the post to reflect the typo correction. Thanks.

  • You are correct. I have edited the post to reflect the typo correction. Thanks.

  • SJUTECH

    Dave,

    Thanks for the info.. It is working great now. I was at a loss to what the issue was and spent alot of time on google looking for the answer.

    Have you thought about positng this to VMware communities? I found that Fedora core 12 same issues with the glibc files being updated.

    Great Job on this post it has been a life saver. I was about to roll back to centos 5.2 or Fedors core 10.

  • I have posted this link to one thread there at VMware Communities. However, is there a place for these types of posts? I didn't want to start a “VMware blog” as I already have one. Based on their forum structure of each thread being a 'question' that can be 'answered', I didn't think it would be proper to start a thread with an 'answer'. Let me know if you have any ideas. Just here to help.

  • haraldvillemoes

    Worked fine for me – thanks

  • Dan

    Hello. I've tried option 2 four times; however, I keep getting a blank Web page when accessing the Web agent. Very frustrated, and I'm hoping someone can help. Thanks.

  • Dan, I'm aware of a problem if you're using Firefox on the host to go to the 8333 (HTTPS) port. You have to use the 8222 (HTTP) port to access from the host. I would try from a different system on the LAN and try to hit that web address (http://<HOST_IP_ADDRESS&gt;:8222/ui)

  • Dan

    Hello Dave – thanks for the info. After a day of hacking with both solutions (and reversing the hacks), I somehow figured out the non-ssl and 8222 port access via ff. Actually before I figured that out, my solution was to initialize my vms via vmrun (without the ff ui). All's well that ends well… I cannot believe that an 'official' fix hasn't been implemented yet. Sorry, I should have posted my experiences; however, I overspent my time credit just getting my server back to where it was prior to the CentOS 5.4 upgrade… DOH! If I could humbly make a recommendation – maybe add the http://<HOST_IP_ADDRESS&gt;:8222/ui tip to your post? I think this would really help folks out. Thanks again Dave…

  • brent

    David,

    You are my hero. Thank you so much.

  • Nice of you to source your info that we put together for you – http://bugs.centos.org/view.php?id=3884

  • I may be misreading your comment, however it appears that you are upset in what you are expressing as not giving credit to the CentOS Bugs page regarding glibc problems with VMware Server? I simply summarized info into an easily read and followed post. The Bugs page you linked does have a good amount of info, however I got the main content from several posts on the VMware communities forum, and simply made a page for the ease of most users that don't have a lot of experience with Linux and needed an easy to follow solution. Thanks

  • SJUTECH

    FYI – Centos has taken the 5.3 Mirror down and has not added it to there Vault… So the Downgrade will not work unless you make a small change to the CentOS53-Base.repo.

    I found that there is one US located mirror that is 50.3 days out of sync and still has the repositories on it for the 5.3 release (http://mirror.3fl.net.au/pub/centos/5.3/). So I had to make the Following Adjustments on my recent build of VMserver:

    [base53]
    name=CentOS-5.3 – Base
    #mirrorlist=http://mirrorlist.centos.org/?release=5.3&arch=$basearch&repo=os
    baseurl=http://mirror.3fl.net.au/pub/centos/5.3/os/$basearch/
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

    #released updates
    [updates53]
    name=CentOS-5.3 – Updates
    #mirrorlist=http://mirrorlist.centos.org/?release=5.3&arch=$basearch&repo=os
    baseurl=http://mirror.3fl.net.au/pub/centos/5.3/updates/$basearch/
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

    #packages used/produced in the build but not released
    [addons53]
    name=CentOS-5.3 – Addons
    #mirrorlist=http://mirrorlist.centos.org/?release=5.3&arch=$basearch&repo=os
    baseurl=http://mirror.3fl.net.au/pub/centos/5.3/addons/$basearch/
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

    #additional packages that may be useful
    [extras53]
    name=CentOS-5.3 – Extras
    #mirrorlist=http://mirrorlist.centos.org/?release=5.3&arch=$basearch&repo=os
    baseurl=http://mirror.3fl.net.au/pub/centos/5.3/extras/$basearch/
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

    #additional packages that extend functionality of existing packages
    [centosplus53]
    name=CentOS-5.3 – Plus
    #mirrorlist=http://mirrorlist.centos.org/?release=5.3&arch=$basearch&repo=os
    baseurl=http://mirror.3fl.net.au/pub/centos/5.3/centosplus/$basearch/
    gpgcheck=1
    enabled=0
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

    #contrib – packages by Centos Users
    [contrib53]
    name=CentOS-5.3 – Contrib
    #mirrorlist=http://mirrorlist.centos.org/?release=5.3&arch=$basearch&repo=os
    baseurl=http://mirror.3fl.net.au/pub/centos/5.3/contrib/$basearch/
    gpgcheck=1
    enabled=0
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

    What I Did was:

    I commentted out the Mirrorlist line and uncommented the baseurl and then set it to look at the http://mirror.3fl.net.au/pub/centos/5.3/“ Directoryname” and then I was able to sucessfully downgrade to the 2.5-34.el5_3.1 glibc files.

    I also made a slight cahnge to the yum.conf:

    instead of exclude=glibc glibc-common glibc-devel glibc-headers glibc-utils nscd

    I am using exclude=*2.5-42* to exclude jsut the package that is the issue allowing me to still get all the glibc updates for centos 5.3.

  • cyberbot

    Thank you for the nice trick
    i didnt get this step
    Step 1: Go to /etc/yum.repos.d and copy the file CentOS-Base.repo to CentOS53-Base.repo

    i can browse to /etc/yum.repos.d
    but you mean rename the centos-base.repo to Centos53-base.repo?
    i didnt get it thank you

  • Eric

    Thanks Dave,

    Option 2 worked very well for me.

    Eric

  • Pingback: Unix notes » Некоторые проблемы при установке VMWare Server 2 на linux()

  • Pingback: CentOS 5.4 i VMware server 2.0.2 – login operation failed » Štap i kanap()

  • I know that there are problems with the 3.6 version of Firefox, so you may check from a lesser version and/or try from another system other than the VMware Host.

  • David,

    You are my favorite person in the world right now! I had one of those super frustrating, super stressful all-nighters tonight trying to deal with one set of problems and causing another by upgrading CentOS from 5.2 to 5.5. It took me *forever* to think of Googling for CentOS 5.5. specific problems since I figured that VMWare Server is so self-contained that the OS it runs on is pretty much irrelevant so long as the kernel modules work. I was obviously wrong!

    I can go back to breathing again, thanks again for this very thoughtful and detailed fix!

  • varun

    Thanks Dave. Your post helped solve my problem. Option 2 worked for me as well.

    varun

  • Apendleton

    Solution 2 saved the day for me.

  • Trent Doyle

    I appreciate your work on this. I was trying to get vmware server to work on centos 5.5 and was about to pull my hair out over it….

  • Cogs66

    Hey Dave. Thank you so much, solution2 worked perfectly.

    Andy

  • Pingback: Vmware Server 2 on CentOS 5.4 - Iam8up Blog()

  • Tarang

    Option 2 Worked very well; I used glibc from CentOS 5.2; before that vmware was crapping out even on a very mild IO activity.

    Saved a tonne of aggravation. Thanks for the tip.

  • P4rnak

    it’s not worked for me.

    when i remove This Line  “export LD_LIBRARY_PATH=/usr/lib/vmware/lib/libc.so.6:$LD_LIBRARY_PATH
    ” From File. My Vmware Panel Load (With Crash)

    And When I Add This, Vmware Web Panel Does Not Loaded Succesfull.

    Thanks