Wednesday, May 17, 2006

 

VMWare Workstation on SuSE Linux 10.1

VMWare workstation allows user to run multiple operating systems on one machine. I decided to try the eval version on my newly installed SUSE 10.1 box. The installation however was not as smooth as I would have liked. Installation fails while compiling vmmon module for my kernel version (2.6.16.13-4-bigsmp, SuSE 10.1). Fortunately, there is a workaround as mentioned in this forum, but it took me considerable time to figure out what to do in order to make vmmon compile. Hence, I am posting what exactly needs to be done.

I downloaded the tarball for evaluation version of VMWare workstation from their website and tried to install it using the provided installation script.

tar zxvf VMware-workstation-5.5.1-19175.tar.gz
cd /vmware-distrib/
./vmware-install.pl

I answered all the questions with their default answers. The script after installation executed vmware-config.pl, which exited with the following error while compiling vmmon.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config3/vmmon-only'
make -C /lib/modules/2.6.16.13-4-bigsmp/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-2.6.16.13-4-obj/i386/bigsmp'
make -C ../../../linux-2.6.16.13-4 O=../linux-2.6.16.13-4-obj/i386/bigsmp modules
  CC [M]  /tmp/vmware-config3/vmmon-only/linux/driver.o
In file included from /tmp/vmware-config3/vmmon-only/linux/driver.h:20,
                 from /tmp/vmware-config3/vmmon-only/linux/driver.c:49:
/tmp/vmware-config3/vmmon-only/./include/compat_wait.h:37:5: warning: "VMW_HAVE_EPOLL" is not defined
/tmp/vmware-config3/vmmon-only/./include/compat_wait.h:43:5: warning: "VMW_HAVE_EPOLL" is not defined
In file included from /tmp/vmware-config3/vmmon-only/linux/driver.h:20,
                 from /tmp/vmware-config3/vmmon-only/linux/driver.c:49:
/tmp/vmware-config3/vmmon-only/./include/compat_wait.h:60: error: conflicting types for ‘poll_initwait’
/usr/src/linux-2.6.16.13-4/include/linux/poll.h:45: error: previous declaration of ‘poll_initwait’ was here
/tmp/vmware-config3/vmmon-only/linux/driver.c:145: warning: initialization from incompatible pointer type
/tmp/vmware-config3/vmmon-only/linux/driver.c:149: warning: initialization from incompatible pointer type
make[4]: *** [/tmp/vmware-config3/vmmon-only/linux/driver.o] Error 1
make[3]: *** [_module_/tmp/vmware-config3/vmmon-only] Error 2
make[2]: *** [modules] Error 2
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.16.13-4-obj/i386/bigsmp'
make: *** [vmmon.ko] Error 2
make: Leaving directory `/tmp/vmware-config3/vmmon-only'
Unable to build the vmmon module.

For more information on how to troubleshoot module-related problems, please
visit our Web site at "http://www.vmware.com/download/modules/modules.html" and
"http://www.vmware.com/support/reference/linux/prebuilt_modules_linux.html".

The workaround is to modify the Makefile.kernel, by adding -DKBUILD_BASENAME=\"$(DRIVER)\" just after -Iinclude2/asm/mach-default (on the same line). Do the following step by step.

cd /usr/lib/vmware/modules/source
tar xf vmmon.tar
tar xf vmnet.tar
vim vmmon-only/Makefile.kernel #EDIT as mentioned above
vim vmnet-only/Makefile.kernel #EDIT as mentioned above
mv vmmon.tar vmmon.tar.save
mv vmnet.tar vmnet.tar.save
tar cf vmmon.tar vmmon-only
tar cf vmnet.tar vmnet-only

After modification, first few lines of vmnet-only/Makefile.kernel looks like

vm_check_build = $(shell if $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_KERNEL) \
        $(EXTRA_CFLAGS) -Iinclude2/asm/mach-default \
        -DKBUILD_BASENAME=\"$(DRIVER)\" \
        -Werror -S -o /dev/null -xc $(1) \
        > /dev/null 2>&1; then echo "$(2)"; else echo "$(3)"; fi)

and that of vmmon-only/Makefile.kernel looks like

vm_check_build = $(shell if $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_KERNEL) \
        $(EXTRA_CFLAGS) -Iinclude2/asm/mach-default \
        -DKBUILD_BASENAME=\"$(DRIVER)\" \
        -Werror -S -o /dev/null -xc $(1) \
        > /dev/null 2>&1; then echo "$(2)"; else echo "$(3)"; fi)

After modifying both the Makefile.kernel files, execute /usr/bin/vmware-config.pl again. The compilation should go fine this time.


Comments:
Thanks!!
I was having the same issue and this solved it for me. Nice clean writting!

I am using AMD64 so i also had to change the default location of the directory of C header files to:
/usr/src/linux-obj/x86_64/default/include
 
I hope you write doc on your job. This is easy to follow and works. You are the man.
 
vmware works, but my network doesn't work;
someone have runing network on vmware 5.5 with suse 10.1?
 
Thanks for that. I'm also using AMD64 but did not have to change the default header path. However, I did have to also make the compat_page.h patch to solve the "mem_map undeclared" problem. Details for that are provided by "petr" in the original thread linked in the main blog entry above.
 
Thanks. Having the same problem. Great step by step guide. It has solved the problem.
 
EXCELLENT.
 
Worked like a charm. Thanks a lot!
 
Hi
I''m new in Linux and I did what you did but didn't work with me, I don't know why :-(
But I did download and install this file "vmware-any-any-update101.tar.gz" from "http://ftp.cvut.cz/vmware/" and work will for me, thank you anyway
 
thanks a lot for your quick and good solution
roland.jentsch@gmail.com
 
Thanks a lot for this helpfull and easy guide .

100% working with SuSE 10.1 x86_64
 
Good work Dude Working 100%
 
Thank you too!
Absolutly great work, this description!
Easy to read and understand AND it works!
 
Does anyone know what I need to do to get VMware 4.5.3 running? The lines mentioned in this post are already present in the any-any-update101 packages.

Thanks.
 
good job. thanks!
 
Good job. Thank you very much for your help.
 
I am still getting an error after following your advice.

Any ideas?

Newby to Linux.

Using SUSE 10.1 on 64bit on AMD machine...
Thanks,
Don


dglaptop:/usr/lib/vmware/modules/source # tar -xf vmmon.tar
dglaptop:/usr/lib/vmware/modules/source # tar -xf vmnet.tar
dglaptop:/usr/lib/vmware/modules/source # vim vmmon-only/Makefile.kernel #EDIT
dglaptop:/usr/lib/vmware/modules/source # vim vmnet-only/Makefile.kernel #EDIT
dglaptop:/usr/lib/vmware/modules/source # /usr/bin/vmware-config.pl
Making sure services for VMware Workstation are stopped.

Stopping VMware services:
Virtual machine monitor done

Configuring fallback GTK+ 2.4 libraries.

In which directory do you want to install the mime type icons?
[/usr/share/icons]

What directory contains your desktop menu entry files? These files have a
.desktop file extension. [/usr/share/applications]

In which directory do you want to install the application's icon?
[/usr/share/pixmaps]

Trying to find a suitable vmmon module for your running kernel.

None of the pre-built vmmon modules for VMware Workstation is suitable for your
running kernel. Do you want this program to try to build the vmmon module for
your system (you need to have a C compiler installed on your system)? [yes] yes

Using compiler "/usr/bin/gcc". Use environment variable CC to override.

What is the location of the directory of C header files that match your running
kernel? [/lib/modules/2.6.16.13-4-smp/build/include]

Extracting the sources of the vmmon module.

Building the vmmon module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config4/vmmon-only'
make -C /lib/modules/2.6.16.13-4-smp/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-2.6.16.13-4-obj/i386/smp'
make -C ../../../linux-2.6.16.13-4 O=../linux-2.6.16.13-4-obj/i386/smp modules
CC [M] /tmp/vmware-config4/vmmon-only/linux/driver.o
In file included from /tmp/vmware-config4/vmmon-only/linux/driver.h:20,
from /tmp/vmware-config4/vmmon-only/linux/driver.c:49:
/tmp/vmware-config4/vmmon-only/./include/compat_wait.h:37:5: warning: "VMW_HAVE_EPOLL" is not defined
/tmp/vmware-config4/vmmon-only/./include/compat_wait.h:43:5: warning: "VMW_HAVE_EPOLL" is not defined
In file included from /tmp/vmware-config4/vmmon-only/linux/driver.h:20,
from /tmp/vmware-config4/vmmon-only/linux/driver.c:49:
/tmp/vmware-config4/vmmon-only/./include/compat_wait.h:60: error: conflicting types for ‘poll_initwait’
/usr/src/linux-2.6.16.13-4/include/linux/poll.h:45: error: previous declaration of ‘poll_initwait’ was here
/tmp/vmware-config4/vmmon-only/linux/driver.c:145: warning: initialization from incompatible pointer type
/tmp/vmware-config4/vmmon-only/linux/driver.c:149: warning: initialization from incompatible pointer type
make[4]: *** [/tmp/vmware-config4/vmmon-only/linux/driver.o] Error 1
make[3]: *** [_module_/tmp/vmware-config4/vmmon-only] Error 2
make[2]: *** [modules] Error 2
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.16.13-4-obj/i386/smp'
make: *** [vmmon.ko] Error 2
make: Leaving directory `/tmp/vmware-config4/vmmon-only'
Unable to build the vmmon module.

For more information on how to troubleshoot module-related problems, please
visit our Web site at "http://www.vmware.com/download/modules/modules.html" and
"http://www.vmware.com/support/reference/linux/prebuilt_modules_linux.html".

Execution aborted.
 
So then I tried to follow carlwarnick's sugestion and this is the response...

None of the pre-built vmmon modules for VMware Workstation is suitable for your
running kernel. Do you want this program to try to build the vmmon module for
your system (you need to have a C compiler installed on your system)? [yes] yes

Using compiler "/usr/bin/gcc". Use environment variable CC to override.

What is the location of the directory of C header files that match your running
kernel? [/lib/modules/2.6.16.13-4-smp/build/include] /usr/src/linux-obj/x86_64/default/include

The path "/usr/src/linux-obj/x86_64/default/include" is not an existing
directory.

What is the location of the directory of C header files that match your running
kernel? [/lib/modules/2.6.16.13-4-smp/build/include] /usr/src/linux-obj/i586/default/include

The directory of kernel headers (version 2.6.16.13-4-default) does not match
your running kernel (version 2.6.16.13-4-smp). Even if the module were to
compile successfully, it would not load into the running kernel.

What is the location of the directory of C header files that match your running
kernel? [/lib/modules/2.6.16.13-4-smp/build/include] /usr/src/linux-obj/i386/default/include

The directory of kernel headers (version 2.6.16.13-4-default) does not match
your running kernel (version 2.6.16.13-4-smp). Even if the module were to
compile successfully, it would not load into the running kernel.

What is the location of the directory of C header files that match your running
kernel? [/lib/modules/2.6.16.13-4-smp/build/include]
 
Thank you for the great instructions. You helped me get vmware working on my suse 10.1 system.
 
Works for me. Thanks a ton
-Raks
 
The instructions worked flawlessly on SLED 10. Thanks!
 
Thanks - This worked great. A shame VMware doesn't fix this problem.
 
Worked great! I was about to throw my computer in a pond before reading this :D

Thanks!
 
Hey thanks a bunch!
 
Rock on man, saved me a ton of time, worked flawlessly
 
Thx a lot!
I'm was running workstation on ubuntu 6.06 and upgrade to 6.10. I need to recompile vmmon for the new kernel and rocks!!!
 
thanks dude - just saved me a load of time!
 
thank you mate,

running vmware on kubuntu 2.6.17.11 seems possible to me now!

cheers
 
After more than 20 hours of struggling to make it work under Fedora core 6. I installed Ubuntu 2.6.17-10-generic and followed your steps and ALLLL IS working great now.
Thx for taking the time to document your findings...
 
Hi i do everything you say, but i see this:

building the vmmon module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config6/vmmon-only'
Makefile.kernel:9: *** unterminated call to function `shell': missing `)'. Stop
make:Leaving directory `/tmp/vmware-config6/vmmon-only'
Unable to build the vmmon module

Please Help Me I want change my Fuck Windows for Linux

Thanks
 
on opensuse 10.2 x86_64 this was the path that worked for me for the kernel source headers:

/usr/src/linux-2.6.18.8-0.3-obj/x86_64/default/include/linux/
 
You solved my problem while compiling vmware 5.5.0 modules... VMware now runs perfectly! Very thanks dude.
[Sorry for my bad english ;)]
 
Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?