SDB:Installing VMware server or workstation

Jump to: navigation, search
For kernel versions greater than or equal to 2.6.32 patching of the kernel modules used by VMware is required to enable them to compile. This article explains how to install a pre-built rpm containing the current patches along with the necessary scripts to simplify the installation and building of these kernel modules.

Tested on openSUSE

Recommended articles

Icon-manual.png

Related articles


VMware workstation or server installation

Prerequsites

The following development applications are required;

  • make, gcc, patch, kernel-source, kernel-syms, linux-glibc-devel or linux-kernel-headers.
  • Either VMware-server 2.0.2, VMware-Workstation 6.5.4 or 6.5.5 and less than 7.1

Clean up previous patches

Unsuccessful installation or patching can leave remnants, therefore it's best to uninstall any previous installs of VMware and clean out the following directory. Open a terminal session and run the following commands;

su -
Password
cd /usr/lib/vmware/modules
pwd {TO CHECK YOU ARE IN THE CORRECT DIRECTORY!!}
ls
rm -rf source*
exit

Installing VMware Workstation (openSUSE)

On openSUSE 11.3 there was an issue where the workstation install hung, so this can be overcome by unpacking the rpm to install.

Open a terminal session and as your user cd to the download location of the rpm (a work directory under your home directory is a good idea) and run the following commands;

rpm2cpio VMware-Workstation-6.5.4-246459.x86_64.rpm | cpio -idmv
./var/cache/vmware/VMware-Workstation-6.5.4-246459.x86_64.bundle
774099 blocks
mv ./var/cache/vmware/VMware-Workstation-6.5.4-246459.x86_64.bundle .
chmod u+x *.bundle

Now you need to open a second terminal session and become root user and run the following commands;

su -
Password:
while true; do killall -9 vmware-modconfig-console; sleep 1; done

In the previous terminal (where you unpacked the rpm also become root user and install the bundle by running the following commands;

su -
Password:
cd <the bundle location>
./VMware-Workstation-6.5.4-246459.x86_64.bundle --ignore-errors

Now proceed as required until the installer finishes, then in the terminal session running the killall command, press ctrl+c to quit the looping command and exit/close the terminal.

Installing VMware Workstation (SLE 11 SP1)

For VMware-workstation install via the rpm command, so open a terminal session and run the following commands;

su -
Password:
rpm -Uhv <path_to_rpm>/<name_of_rpm_to_install>

Installing VMware Server (openSUSE or SLE 11 SP1)

For VMware-server install via the rpm command, so open a terminal session and run the following commands;

su -
Password:
rpm -Uhv <path_to_rpm>/<name_of_rpm_to_install>

Patching VMware

Install vmware-fix

First you need to grab the vmware-fix rpm for your system, they can be found by using the openSUSE Build Service search feature software.opensuse.org: Search Results

You can then use your preferred method to install the rpm. On openSUSE 11.3 there is a post install script that runs to create softlinks to autoconf.h and utsrelease.h. If you uninstall the rpm it will delete them.

Once the vmware-fix rpm has installed, open a terminal session and become root user and run the following commands as per your install below;

Install vmware-fix-workstation-6.5.5 for openSUSE 11.4

First you need to grab the vmware-fix-workstation-6.5.5 rpm for your system, they can be found by using the openSUSE Build Service search feature software.opensuse.org: Search Results

You can then use your preferred method to install the rpm. On openSUSE 11.4 there is a post install script that runs to create softlinks to autoconf.h and utsrelease.h. If you uninstall the rpm it will delete them.

Once the vmware-fix-workstation-6.5.5 rpm has installed, open a terminal session and become root user and run the following commands as per your install below;

For vmware-server;

su -
Password
vmware_server_fix

[Update]: For those having trouble with Host-only or NAT networking the patch provided in the rpm needs to be a different one: http://risesecurity.org/2010/04/02/vmware-server-2-0-2-update-patch-2/ . In a nutshell the vmnet interfaces show no mac address then and are configured not for ethernet but netrom (AMPR NET/ROM in `ip addr`). If you're affected here's the temporary diff to the patch (until we figured out a rpm based solution):

--- /usr/sbin/vmware_server_fix.orig    2010-09-28 22:29:08.484777254 +0100
+++ /usr/sbin/vmware_server_fix 2010-11-04 12:11:51.467653463 +0100
@@ -37,12 +37,12 @@
find vsock-only/ -type f -exec chmod 644 {} \;

#Copy patch into fixed directory and apply
-cp /usr/share/vmware-fix/vmware-server-2.0.2-203138.patch /tmp/fixed
+cp /usr/share/vmware-fix/VMware-server-2.0.2-203138-update-2.patch /tmp/fixed
if [ -f vmmon-only/include/compat_cred.h ]; then
  echo "compat_cred.h exists, removing"
  rm -f vmmon-only/include/compat_cred.h
fi
-patch -p0 < vmware-server-2.0.2-203138.patch
+patch -p4 < VMware-server-2.0.2-203138-update-2.patch

[/Update]


For vmware-workstation

su -
Password
vmware_workstation_fix

In both the above cases, the script runs the installer routines after patches have been applied, so it's just a matter of answering the questions until the install is completed.


Kernel Update Issues

The above patching and scripts only need to be run ONCE to patch the modules, after a kernel upgrade restarting the workstation or server will rebuild the already patched modules.

For openSUSE 11.3 and 11.4

After a kernel update there is a new <kernel-version>-obj directory added, so the softlinks to autoconf.h and utsrelease.h need updating. So before running any vmware reconfiguration after a kernel update you need to run the following commands;

su -
Password
vmware_update_softlinks

For openSUSE 12.3

With the 3.7.* kernels, the location of .version.h has changed from VMWare's default path. This may not affect all versions of VMWare, however, this applies to Version 9.0.1 and above.

The location in SUSE changes from /usr/src/linux/linux-$(uname -r)/include/linux/version.h to /usr/src/linux-3.7.x-x.xx-obj/x86_64/desktop/include/generated/uapi/linux/version.h . However, VMWare will look for it in /lib/modules/3.7.x-x.xx-desktop/build/include/linux/version.h. A clean method can be implemented by creating a symbolic link to version.h (but this is not required unless you habitually change your kernel, in which case it would be best to memorize the paths). A dirty method of fixing this is to copy the version.h to the path where VMWare is looking for it.

This is done by: mkdir /lib/modules/3.7.x-x.xx-desktop/build/include/linux/ cp /usr/src/linux-3.7.x-x.xx-obj/x86_64/desktop/include/generated/uapi/linux/version.h /lib/modules/3.7.x-x.xx-desktop/build/include/linux/


Communication

Team members


See also

External links