Setting up VMware on SUSE Linux


From openSUSE

This article is outdated because it is about VMware Workstation 5.5.x
For up-to-date instructions, see Setting up VMware Workstation 6.5.x on openSUSE 11.1

If it remains outdated, it may eventually be deleted. Please update this article.
Refer to this article's discussion page for more information.


Setting up VMware Workstation on the build versions of SUSE Linux (or even after a simple kernel update on the stable version) can be a bit taxing. This page should help you resolve some of the steps to recovering your VMware installation, or getting your first install to work.

Contents

[hide]

Background

  • VMware uses kernel modules that were built for specific kernel versions. That means that out of the box, VMware only supports certain distributions and kernel versions.
  • On unsupported distributions and/or kernel versions, the VMware kernel modules can be compiled from source. This requires some packages that are not part of the default SUSE Linux install. It also requires a couple steps to prepare the system for building kernel modules.
  • None of this is hard to do. (Just hard to figure out without instructions, especially if you are new to Linux.)

Status Updates:

  • VMware Workstation 5.5 includes SUSE Linux 10.0 support. This eliminates the need to build modules, and to use the vmware-any-any update. The install /usr/bin/vmware-config.pl script will run just fine.
  • Dec 06, 2005: A kernel patch released today has broken the default drivers included with VMware Workstation 5.5. This means you will need to (re-)run /usr/bin/vmware-config.pl script and compile the drivers from source. It should compile just fine without the vmware-any-any update.
  • VMware Workstation 5.5.2 released on Aug. 10, 2006 includes built-in support for SUSE Linux 10.1, 32-bit and 64-bit.
  • Dec 21, 2006: VMWare 5.5.3 on SUSE Linux 10.2 has a library mismatch issue which can cause a VFS error and lead to problems opening existing VM's. A workaround to this issue is to change the symlink /usr/lib/vmware/lib/libpng12.so.0/libpng12.so.0 to point to /usr/lib/libpng12.so.0 and also change /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1 to point to /lib/libgcc_s.so.1. A discussion of this issue can be found at http://www.vmware.com/community/thread.jspa?messageID=535418.
    • This issue is also seen with the VMware Server console utility. However, the library paths are /usr/lib/vmware-server-console/lib/ instead of /usr/lib/vmware/lib.
  • Bridged networking on WiFi is not supported on Linux so do not select it.
  • This works for VMware Player too.
  • Sept 11th, 2007: VMware Workstation 5.5.4 on SLED 10 SP 1 requires the same libraries workaround as 5.5.3 on OpenSUSE 10.1 above.

Instructions for a New Install

If you are installing VMware for the first time, these instructions will help you get the task done.

This procedure concentrates on getting a new VMware system up and running. If you have broken a previously-working VMware system by installing a newer kernel version, you will find information on how to re-compile the VMware kernel modules at Recovering VMware Workstation After a Kernel Update.

Install the Packages Required for Building Kernel Modules

Install the following packages. The Software Management tool in YaST makes this easy to do.

  • binutils
  • gcc
  • gcc-c++
  • kernel-source
  • make (this is probably already installed)

Make sure that your Kernel is up to date. Your kernel version must match the version of the kernel-syms and kernel-source packages.


Warning: If you update your kernel you must be sure to update kernel-source to be sure that they all have the same version. If you update your kernel via YOU (YaST Online Update) you can be 99% sure that if you update the kernel all installed kernel-packages (kernel-{source,doc}) will be updated as well, but better check twice and do not let YOU update your kernel without informing you. Updating kernel (e.g. installing version 2.6.13-2) means that kernel-source (e.g. version 2.6.13) will not match and chances are good that VMware will not work (even with the vmware-any-any-patch).

Install VMware Workstation from RPM

YaST is able to install the RPM for VMware Workstation on SUSE Linux without any problem. You can get the RPM-based installer for VMware from www.vmware.com. Also, VMware will provide you with a 30-day evaluation license to try the product before you buy it. After applying the RPM for VMware, DO NOT run the VMware configuration script (/usr/bin/vmware-config.pl). It will not work properly yet.

If you prefer to install the RPM package on the command line, or have problems installing via the graphical interface (as I did on my new 10.2 installation) you can also install from the console (as root) with:

yast -i path-to-your-RPM-file

Download and Apply vmware-any-any-update

Download the latest vmware-any-any-update from http://knihovny.cvut.cz/ftp/pub/vmware/ (or its mirror http://ftp.cvut.cz/vmware). This update is a relatively small, compressed archive with an automated installer script.

(Note: the version at the time of this writing was vmware-any-any-update113.tar.gz, which worked on OpenSUSE 10.3)

1. Extract the archive, then follow these steps:

2. Open a Terminal window

3. Use su to become root

4. Switch to the directory in which you extracted vmware-any-any-update

5. Run ./runme.pl and follow the prompts.

    • Note: After applying the patch, the runme.pl script will call the VMware configuration script /usr/bin/vmware-config.pl. Follow these prompts as well.

Responding to the Configuration Script Prompts

  • If you need it, Cool Solutions has an article detailing how to respond to each of the prompts.

Start VMware

There are two common ways to start VMware Workstation.

Note: VMware does not require you to be root. Therefore, it is best practice to run VMware as a regular user. However, you may need to assign appropriate file permissions that allow you to access certain folders.

Starting VMware from Command Line

  • In a terminal session, type vmware

Starting from a launcher icon

  • In KDE
    • Kmenu > System > More Programs > VMware Workstation





  • GNOME
    • Applications > System > More Programs > VMware Workstation

Activate VMware with a License Key

Once you have VMware Workstation running, click on the Help menu and choose Enter Serial Number. This will unlock VMware so you can start creating and using virtual machines.


Troubleshooting

Bridge Networking setup fails; Running VMware Prompts you to Run vmware-config.pl

If you attempted to enable networking during the vmware-config.pl script, and then received this message when you tried to start VMware.

vmware is installed, but it has not been (correctly) configured for this system. To (re-)configure it, invoke the following command: /usr/bin/vmware-config.pl.

Also, if you run vmware-config.pl and do not enable networking, VMware Workstation starts.

This means that you probably ran the vmware-config.pl script before running runme.pl from the vmware-any-any-update. Configuring the VMware networking support fails unless you have already applied the vmware-any-any-update

VFS Error when browsing for a file

Run the following command as root (10.2)

cd /usr/lib/vmware/lib/libpng12.so.0

mv libpng12.so.0 libpng12.so.0.old
ln -sf /usr/lib/libpng12.so.0
cd /usr/lib/vmware/lib/libgcc_s.so.1
mv libgcc_s.so.1 libgcc_s.so.1.old
ln -sf /lib/libgcc_s.so.1

You may have to repeat the above steps in the /usr/lib/vmware-server-console directory as well if you install vmware server console and have similar errors there. One place where you are likely to see this error in the vmware server console is if you take a screen shot of a vm and are prompted to select a location to save the screen shot to.

Attaching USB Devices to Guest OS (10.2)

VMWare Workstation 5.x includes the ability to attach USB devices directly to the guest OS. In the default OpenSUSE 10.2 there are problems making this feature work because VMWare Workstation 5.x looks to /proc/bus/usb for grabbing the USB device. This was disabled for security reasons with the release of 10.2, but with the latest updates it can be enabled.

First, make sure you have the latest 10.2 kernel updates. The usbfs module is disabled in the default 10.2 kernel. (YaST -> Online Update)

Then before starting VMWare, run the following command as root:

mount -t usbfs none /proc/bus/usb

Now start VMWare and boot up your guest OS. Make sure VMWare has focus and attach your USB device. Now instead of seeing your SuSE Hardware dialog, you should instead see your guest OS natively handle the device. This can be useful for devices like MP3 players, USB security keys, hardware dongles, etc.

See Also