SUSE Conversations


Allow VMWare Server to load after reboot without having to rerun vmware-config.pl



By: joharmon

February 13, 2009 2:50 pm

Reads:613

Comments:1

Rating:0

After installing VMWare server 2.x onto OpenSuse servers/workstations, it was necessary to run vmware-config.pl after every reboot to get VMWare to load correctly, and behave as it should. The only solution I have found to prevent this is as follows:

STEPS:

  1. Edit the /etc/sysconfig/boot file. Find the RUN_PARALLEL=”yes” line, and change it to “no”.What does this do? On systems with multiple CPUs, during bootup and shutdown only (not during run time), it forces startup and shutdown scripts to run sequentially on a single CPU instead of simultaneously on multiple CPUs. Setting this to “no” can prevent some timing issues if they exist.
  2. Edit the /etc/init.d/vmware file in your favorite editor. There are two sections that include information about a file called “not_configured”. Edit them as follows:a) From this
    check_configured() {
       if [ -e "$vmware_etc_dir"/not_configured ]; then
          echo "`vmware_product_name`"' is installed, but it has not been (correctly) configured'
          echo 'for the running kernel. To (re-)configure it, invoke the'
          echo 'following command: '"$vmdb_answer_BINDIR"'/vmware-config.pl.'
          echo
          exit 1
       fi
    }

    To this

    check_configured() {
       if [ -e "$vmware_etc_dir"/not_configured ]; then
          rm -f "$vmware_etc_dir"/not_configured
       fi
       if [ -e "$vmware_etc_dir"/not_configured ]; then
          echo "`vmware_product_name`"' is installed, but it has not been (correctly) configured'
          echo 'for the running kernel. To (re-)configure it, invoke the'
          echo 'following command: '"$vmdb_answer_BINDIR"'/vmware-config.pl.'
          echo
    
          exit 1
       fi
    }

    Is this very graceful? Probably not, but it does it does delete the not_configured file if it exists, before it can run a check to see if it exists. If vmware-config.pl hasn’t ever been run, be sure to run it after making these changes, otherwise you may have a hard time figuring out what is wrong.

    b) From this

             if [ "$exitcode" -gt 0 -a `vmware_product` != "ws" ]; then
                # Set the 'not configured' flag
                touch "$vmware_etc_dir"'/not_configured'
                chmod 644 "$vmware_etc_dir"'/not_configured'
                db_add_file "$vmware_db" "$vmware_etc_dir"'/not_configured' \                    
                $vmware_etc_dir"'/not_configured'
                exit 1
             fi

    To this

             if [ "$exitcode" -gt 0 -a `vmware_product` != "ws" ]; then
                # Set the 'not configured' flag
    # START EDIT
    #            touch "$vmware_etc_dir"'/not_configured'
    #            chmod 644 "$vmware_etc_dir"'/not_configured'
    #            db_add_file "$vmware_db" "$vmware_etc_dir"'/not_configured' \
    #               "$vmware_etc_dir"'/not_configured'
    # END EDIT
                exit 1
             fi

This is redundant, but it prevents the not_configured file from ever being created.

Remember that if the kernel is ever upgraded that the vmware-config.pl does need to be ran again, but hopefully this workaround is found useful by some.

NOTE: Upgrading the RPM will revert the above changes and they will have to be done again.

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)

Tags: ,
Categories: openSUSE, SUSE Linux Enterprise Server, Technical Solutions

Disclaimer: As with everything else at SUSE Conversations, this content is definitely not supported by SUSE (so don't even think of calling Support if you try something and it blows up).  It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.

1 Comment

  1. By:tmm13

    The key is joharmon’s second edit, where the “touch not_configured” occurs. If any component of the server software has a start-up problem, the un-edited version of the script creates the not_configured file. I do not see the file appear during shutdown.

    I have been testing an installation of Server 2.0.2 on openSuSe 11.0 (the vmware-config.pl script is patched, yes) and see the not_configured file appear when running the /etc/init.d/vmware script interactively. I downgraded to 11.0 from 11.2 because the vmon module was not stable under 11.2.

    So the real question is: How to figure out why a VMware component is not starting correctly? Your mileage may vary.

Comment

RSS