VMware
1 2 3 Previous Next 43 Replies Last post: Sep 13, 2009 12:40 PM by disruptor   Go to original post
Click to view bergerkos's profile Lurker 4 posts since
May 15, 2009
Hey, many great thanks to you! Nice job, especially with the script you wrote.

Your patch (along with the .sh script to apply it) worked out fine for me with VMware Server 2.0.1!!!

Only, I had to modify the patch a bit, so it could install:


as there are only vsock, vmmon, vmci, vmnet in the VMware Server, I had to remove the #1 chunk pertaining to vmblock-only;


diff -urN source-OLD/vmblock-only/Makefile source-NEW/vmblock-only/Makefile

      • source-OLD/vmblock-only/Makefile 2008-10-28 22:47:20.000000000 -0700
+ source-NEW/vmblock-only/Makefile 2009-03-26 19:29:30.000000000 -0700
@@ -113,7 +113,7 @@

vm_check_build = $(shell if $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) \
$(CPPFLAGS) $(CFLAGS) $(CFLAGS_KERNEL) \
  • $(EXTRA_CFLAGS) -Iinclude2/asm/mach-default \
+ $(EXTRA_CFLAGS) -I$(HEADER_DIR) -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)
then, in the next part:


diff -urN source-OLD/vmmon-only/include/x86apic.h source-NEW/vmmon-only/include/x86apic.h

      • source-OLD/vmmon-only/include/x86apic.h 2008-10-28 22:47:17.000000000 -0700
+ source-NEW/vmmon-only/include/x86apic.h 2009-03-31 11:18:30.000000000 -0700
@@ -94,7 +94,11 @@
#define APIC_LVT_DELVMODE(_lvt) (_lvt & 0x700)
#define APIC_LVT_RESET_VALUE 0x00010000

+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
#define APIC_BASE_MSR 0x1b
+#else
+#define APIC_BASE_MSR 0x800
+#endif


there is actually no line "#define APIC_BASE_MSR 0x1b" in x86apic.h of this VMware Server 2.0.1 version, so I changed the section accordingly.
Or, perhaps, it was better to remove the section altogether? Well, I left the definition for the 2.6.29 kernel and it works fine so far. Logically though, it shouldn't change a lot even if it is not used at all, right? I must admit, I'm not a programmer at all -- just a DIY user.


So, thanks a lot! Nice job.

{color}

Click to view kroser's profile Lurker 1 posts since
May 25, 2009

bergerkos,

I couldn't actually follow the changes you made to the workstation patch to produce the server patch. Could you post your modified patch for Vmware Server 2.0.1?

Click to view bergerkos's profile Lurker 4 posts since
May 15, 2009

well that's actually pretty simple and straightforward.

First, you delete from the patch the first chunk, starting with "diff -urN source-OLD/vmblock-only/Makefile source-NEW/vmblock-only/Makefile".

Second, you also delete from the patch the chunk, starting with "diff -urN source-OLD/vmmon-only/include/x86apic.h source-NEW/vmmon-only/include/x86apic.h", because it is not actually needed at all.

That's it! Then you run the *.sh script and it does all the job successfully, making a complete testing of the results. After which you just run the normal command "vmware-config.pl".

Here is patch for Server 2.* on Linux 2.6.29 kernel

34. Jun 11, 2009 10:06 AM in response to: bergerkos
Click to view arth1's profile Novice 6 posts since
Nov 6, 2007
Instead of messing with the patch for VMWare Workstation, which misses some of the Server stuff, here's a quick fix for VMWare Server 2.x:

#!/bin/sh
cd /usr/lib/vmware-tools/modules/source || exit 10
/bin/ls -1 *.tar | xargs -n1 tar xf
perl -pi.bak -e 's/-Iinclude2/-I\$(HEADER_DIR) -Iinclude2/' */Makefile
/bin/ls -1 *.tar | sed 's/\.tar$//' | awk '{print "tar cf "$1".tar "$1"-only"}' | sh
/bin/rm -rf *-only


There will still be lots of warnings, but all modules except one should compile now.
Click to view Fogliato's profile Lurker 1 posts since
Jun 12, 2009
Thanks! Very, very, very thanks! You resolved my problem!
Click to view hceuterpe's profile Novice 18 posts since
Dec 1, 2006

It's still breaking for me, after that server patch:

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config3/vmmon-only'
make -C /lib/modules/2.6.29.4-167.fc11.x86_64/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/kernels/2.6.29.4-167.fc11.x86_64'
CC [M] /tmp/vmware-config3/vmmon-only/linux/driver.o
In file included from /tmp/vmware-config3/vmmon-only/./include/vmware.h:38,
from /tmp/vmware-config3/vmmon-only/linux/driver.c:99:
/tmp/vmware-config3/vmmon-only/./include/vm_basic_types.h:108:7: warning: "__FreeBSD__" is not defined
In file included from /tmp/vmware-config3/vmmon-only/./include/vcpuset.h:103,
from /tmp/vmware-config3/vmmon-only/./include/modulecall.h:37,
from /tmp/vmware-config3/vmmon-only/./common/vmx86.h:33,
from /tmp/vmware-config3/vmmon-only/linux/driver.h:29,
from /tmp/vmware-config3/vmmon-only/linux/driver.c:101:
/tmp/vmware-config3/vmmon-only/./include/vm_atomic.h:329:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config3/vmmon-only/./include/vm_atomic.h:333:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config3/vmmon-only/./include/vm_atomic.h:401:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config3/vmmon-only/./include/vm_atomic.h:407:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config3/vmmon-only/./include/vm_atomic.h:460:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config3/vmmon-only/./include/vm_atomic.h:506:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config3/vmmon-only/./include/vm_atomic.h:551:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config3/vmmon-only/./include/vm_atomic.h:595:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config3/vmmon-only/./include/vm_atomic.h:640:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config3/vmmon-only/./include/vm_atomic.h:684:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config3/vmmon-only/./include/vm_atomic.h:729:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config3/vmmon-only/./include/vm_atomic.h:773:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config3/vmmon-only/./include/vm_atomic.h:775:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config3/vmmon-only/./include/vm_atomic.h:816:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config3/vmmon-only/./include/vm_atomic.h:860:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config3/vmmon-only/./include/vm_atomic.h:862:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config3/vmmon-only/./include/vm_atomic.h:903:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config3/vmmon-only/./include/vm_atomic.h:945:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config3/vmmon-only/./include/vm_atomic.h:947:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config3/vmmon-only/./include/vm_atomic.h:986:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config3/vmmon-only/./include/vm_atomic.h:1028:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config3/vmmon-only/./include/vm_atomic.h:1030:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config3/vmmon-only/./include/vm_atomic.h:1069:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config3/vmmon-only/./include/vm_atomic.h:1223:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config3/vmmon-only/./include/vm_atomic.h:1227:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config3/vmmon-only/./include/vm_atomic.h:1313:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config3/vmmon-only/./include/vm_atomic.h:1536:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config3/vmmon-only/./include/vm_atomic.h:1663:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config3/vmmon-only/./include/vm_atomic.h:1796:7: warning: "_MSC_VER" is not defined
In file included from /tmp/vmware-config3/vmmon-only/./include/vm_asm_x86_64.h:39,
from /tmp/vmware-config3/vmmon-only/./include/vm_asm.h:41,
from /tmp/vmware-config3/vmmon-only/linux/driver.c:103:
/tmp/vmware-config3/vmmon-only/./include/vm_asm_x86.h:486:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config3/vmmon-only/./include/vm_asm_x86.h:779:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config3/vmmon-only/./include/vm_asm_x86.h:820:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config3/vmmon-only/./include/vm_asm_x86.h:922:7: warning: "_MSC_VER" is not defined
In file included from /tmp/vmware-config3/vmmon-only/./include/vm_asm.h:41,
from /tmp/vmware-config3/vmmon-only/linux/driver.c:103:
/tmp/vmware-config3/vmmon-only/./include/vm_asm_x86_64.h:56:7: warning: "_MSC_VER" is not defined
In file included from /tmp/vmware-config3/vmmon-only/linux/driver.c:119:
/tmp/vmware-config3/vmmon-only/./common/hostif.h:53:7: warning: "WINNT_DDK" is not defined
/tmp/vmware-config3/vmmon-only/linux/driver.c: In function ‘LinuxDriver_Ioctl’:
/tmp/vmware-config3/vmmon-only/linux/driver.c:1987: error: ‘struct task_struct’ has no member named ‘euid’
/tmp/vmware-config3/vmmon-only/linux/driver.c:1987: error: ‘struct task_struct’ has no member named ‘uid’
/tmp/vmware-config3/vmmon-only/linux/driver.c:1988: error: ‘struct task_struct’ has no member named ‘fsuid’
/tmp/vmware-config3/vmmon-only/linux/driver.c:1988: error: ‘struct task_struct’ has no member named ‘uid’
/tmp/vmware-config3/vmmon-only/linux/driver.c:1989: error: ‘struct task_struct’ has no member named ‘egid’
/tmp/vmware-config3/vmmon-only/linux/driver.c:1989: error: ‘struct task_struct’ has no member named ‘gid’
/tmp/vmware-config3/vmmon-only/linux/driver.c:1990: error: ‘struct task_struct’ has no member named ‘fsgid’
/tmp/vmware-config3/vmmon-only/linux/driver.c:1990: error: ‘struct task_struct’ has no member named ‘gid’
make[2]: *** [/tmp/vmware-config3/vmmon-only/linux/driver.o] Error 1
make[1]: *** _module_/tmp/vmware-config3/vmmon-only Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.29.4-167.fc11.x86_64'
make: *** http://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/go/unsup-linux-products" and
"http://www.vmware.com/go/unsup-linux-tools".

Execution aborted.

Any ideas?

Click to view bergerkos's profile Lurker 4 posts since
May 15, 2009
Your error is the same as I had before I tried (successfully) the VMware Workstation patch. I mean, it gives the error, which reflects the missing definitions, which were added by that patch.

I feel I must try myself the "quick fix" by the friend above, which he kindly suggests instead of messing with the Workstation patch. Especially so, if that patch is missing some Server stuff (which I haven't felt yet).


Kostya

Click to view arth1's profile Novice 6 posts since
Nov 6, 2007
Did you miss "all modules except one should compile now"?
Unless you suspend/resume the VM from the host side, you can get by without vmmon.
Click to view gmarcotte3's profile Novice 15 posts since
May 28, 2007

tried to run the patch and it gives me this:

Found tar file for vsock module
Found tar file for vmnet module
Found tar file for vmmon module
Found tar file for vmblock module
Found tar file for vmppuser module
Found tar file for vmci module
Using patch file: /root/vmware-6.5.2-modules-2.6.29-fix.patch
Using module directory: /usr/lib/vmware/modules/source
Using backup directory: /usr/lib/vmware/modules/source-backup
Backing up ./vsock.tar to /usr/lib/vmware/modules/source-backup/./vsock.tar
Backing up ./vmnet.tar to /usr/lib/vmware/modules/source-backup/./vmnet.tar
Backing up ./vmmon.tar to /usr/lib/vmware/modules/source-backup/./vmmon.tar
Backing up ./vmblock.tar to /usr/lib/vmware/modules/source-backup/./vmblock.tar
Backing up ./vmppuser.tar to /usr/lib/vmware/modules/source-backup/./vmppuser.tar
Backing up ./vmci.tar to /usr/lib/vmware/modules/source-backup/./vmci.tar
Untarring vsock.tar
Untarring vmnet.tar
Untarring vmmon.tar
Untarring vmblock.tar
Untarring vmppuser.tar
Untarring vmci.tar
Testing patch
patching file vmblock-only/Makefile
Hunk #1 FAILED at 122.
1 out of 1 hunk FAILED -- saving rejects to file vmblock-only/Makefile.rej
patching file vmci-only/Makefile
patching file vmmon-only/include/x86apic.h
Hunk #1 succeeded at 78 with fuzz 2 (offset -16 lines).
patching file vmmon-only/linux/driver.c
Hunk #1 FAILED at 1984.
1 out of 1 hunk FAILED -- saving rejects to file vmmon-only/linux/driver.c.rej
patching file vmmon-only/linux/hostif.c
Hunk #1 succeeded at 3226 (offset -198 lines).
Hunk #2 FAILED at 3340.
Hunk #3 FAILED at 3464.
2 out of 3 hunks FAILED -- saving rejects to file vmmon-only/linux/hostif.c.rej
patching file vmmon-only/Makefile
Hunk #1 FAILED at 122.
1 out of 1 hunk FAILED -- saving rejects to file vmmon-only/Makefile.rej
patching file vmnet-only/Makefile
Hunk #1 FAILED at 122.
1 out of 1 hunk FAILED -- saving rejects to file vmnet-only/Makefile.rej
patching file vmnet-only/netif.c
Hunk #1 FAILED at 324.
Hunk #2 succeeded at 533 (offset -37 lines).
Hunk #4 succeeded at 650 (offset -37 lines).
1 out of 4 hunks FAILED -- saving rejects to file vmnet-only/netif.c.rej
patching file vsock-only/Makefile
Sorry, problem with the patch, I can't apply it

so what do I have to do to run this patch?

Click to view gmarcotte3's profile Novice 15 posts since
May 28, 2007

uninstalled then installed again then ran the script it ran without any errors but after doing

vmware-modconfig --console --install-all

I get

.....

tmp/vmware-root/modules/vmmon-only/./include/compat_wait.h:78: error: conflicting types for ‘poll_initwait’
include/linux/poll.h:67: note: previous declaration of ‘poll_initwait’ was here
/tmp/vmware-root/modules/vmmon-only/linux/driver.c: In function ‘LinuxDriverSyncCallOnEachCPU’:
/tmp/vmware-root/modules/vmmon-only/linux/driver.c:1423: error: too many arguments to function ‘smp_call_function’
/tmp/vmware-root/modules/vmmon-only/linux/driver.c: In function ‘LinuxDriver_Ioctl’:
/tmp/vmware-root/modules/vmmon-only/linux/driver.c:1987: error: ‘struct task_struct’ has no member named ‘euid’
/tmp/vmware-root/modules/vmmon-only/linux/driver.c:1987: error: ‘struct task_struct’ has no member named ‘uid’
/tmp/vmware-root/modules/vmmon-only/linux/driver.c:1988: error: ‘struct task_struct’ has no member named ‘fsuid’
/tmp/vmware-root/modules/vmmon-only/linux/driver.c:1988: error: ‘struct task_struct’ has no member named ‘uid’
/tmp/vmware-root/modules/vmmon-only/linux/driver.c:1989: error: ‘struct task_struct’ has no member named ‘egid’
/tmp/vmware-root/modules/vmmon-only/linux/driver.c:1989: error: ‘struct task_struct’ has no member named ‘gid’
/tmp/vmware-root/modules/vmmon-only/linux/driver.c:1990: error: ‘struct task_struct’ has no member named ‘fsgid’
/tmp/vmware-root/modules/vmmon-only/linux/driver.c:1990: error: ‘struct task_struct’ has no member named ‘gid’
/tmp/vmware-root/modules/vmmon-only/linux/driver.c:2007: error: too many arguments to function ‘smp_call_function’
make[2]: *** [/tmp/vmware-root/modules/vmmon-only/linux/driver.o] Error 1
make[1]: *** _module_/tmp/vmware-root/modules/vmmon-only Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.29.4-167.fc11.i686.PAE'
make: *** http://vmmon.ko Error 2
make: Leaving directory `/tmp/vmware-root/modules/vmmon-only'
Unable to install vmmon

Click to view woopps's profile Lurker 1 posts since
Jun 28, 2009

Thanks a lot, Krellan and bergerkos.

I installed VMWare 2.0.1 server on Fedora 11Kernel 2.6.29.4-167.fc11.x86_64 with Krellan's patch kit and bergerkos's trick. Everything went through smoothly.

Great job. All your efforts are greatly appreciated.

Click to view gmarcotte3's profile Novice 15 posts since
May 28, 2007
got it to install and run by uninstalling VMworkstation. making sure /usr/lib/vmware/ was clean then reinstalled vmware 6.5 by doing:

  1. export LANG=C

then

  1. rpm -i VMware-Workstation-6.5.2-156735.i386.rpm

and it ran without any errors and the /usr/lib/vmware director
looks clean

then

  1. bash ./vmware-6.5.2-modules-2.6.29-fix.sh

and then

  1. vmware-modconfig --console --install-all

this ran ok then rebooted and try vmware load

and it works

Click to view disruptor's profile Lurker 1 posts since
Sep 13, 2009

Hi i've used the patch for linux distribution Mandriva 2009.1 with kernel 2.6.29.6-desktop-2mnb.

It works. I've used it as you describe .

Many thanks.

VMware Developer

SDKs, APIs, Videos, Learn and much more in the Developer community.

Learn More

Developer Sample Code

Increase your developer productivity with VMware API sample code.

Learn More

VMworld Sessions & Labs

Online access to the latest VMworld Sessions & Labs and online services.

Learn more

Purchase PSO Credits Online

Purchase credits to redeem training and consulting services online.

Buy Now

Community Hardware Software

View reported configurations or report your own.

Learn More

VMware vSphere

Come witness the next giant leap in virtualization.

Register Today

Communities