I had the privilege of installing VMWare 1.0.5 on a brand new 2.6.25 kernel.  I downloaded the 2.6.XX patch for vmware 1.0.4, applied the one change from asm to linux in vcpuset.h.  That had worked for me before when using 1.0.5 on a 2.6.24 kernel, but today I downloaded a 2.6.25 kernel for someone and of course, someone changed something slightly, causing the vmware module (vmnet) to no longer compile.  Fortunately for me, a small bit of hacking fixed it, and now I can go to bed.The function that is missing in the 2.6.26 kernel is sock_valbool_flag, which was recently made inline, so it causes a "implicit declaration of function" error when running the standard vmware-config.pl script.  I saw that the function still exists in the kernel sources, but was made a static function, and moved to sock.c.  So, after taking a look at the function, I figured it wouldn't hurt to simply copy it from sock.c into vmware's bridge.c and off I went.  tada!
Posted by Jon Daley on April 18, 2008, 12:28 am | Read 67209 times
Category Programming: [first] [previous] [next] [newest]
Comments
1 2 3  Next»

Were you going to include a patch [for VMware server on 2.6.25]? :)

Posted by Brice Burgess on April 19, 2008, 11:47 pm

Yeah, I was thinking I should post the complete patch, to make it easier for folks. I just made the patch, let me know if it works - it has a bit of extra stuff in it due to the way my kernels are compiled on the machine that I generated the patch. I think it won't affect the build, but it might cause a make error.

If it has an error, I can rebuild the patch.

I also don't have a 2.6.25 machine at the moment, and so I guessed at the format of the #if kernel version part. The simple way would be to comment out the if statement, since you are compiling for a 2.6.25 kernel, but leaving the if statement in means it will compile on 2.6.24 or 2.6.25 for vmware 1.04 or 1.05, which seemed like a nicer patch.

vmnet 2.6.25

vmmon 2.6.25

Posted by jondaley on April 20, 2008, 1:01 pm

Has anyone else tried the patch? It'd be nice to comment here and let folks know if it does or does not work.

Posted by jondaley on April 23, 2008, 11:05 am

I would try it, but I'm afraid I am not that familiar with vmware server's inner workings. Can you go a bit into detail on what to apply those patches on, and where to find those modules etc? So far I always used the any-any patches, this one seems a bit too heavy right now.

Appreciate your effort, thanks in advance!

Posted by SirAwesomeSupery on April 23, 2008, 2:34 pm

I just copied the modules from vmware's forums for 1.0.4 -> 2.6.24, added the one line that the guy forgot to add, and mentioned in his post.

The only "real" work I did was copying the one function from 2.6.25 that was made static. No interesting changes from the prior patch.

Posted by jondaley on April 23, 2008, 5:11 pm

Hi,
I have successfully installed vmware server 1.0.5 on my vanilla kernel 2.6.25 following the simple passes explained at lenrek.wordpress.com and, of course, using your patches.

I'd only point out two things:
* I applied the patches to a standard vmware server 1.0.5 without "any-any" pathes
* since you have posted the vmmon patch attachment with "vmnet 2.6.25" name, it's too easy to miss its download.

Thank you very much

Posted by d.cavestro on April 24, 2008, 9:17 am

Hi, confirmed. The patches work as supposed to. I got a bit confused, because I tried to wget the patches from the links above. That results in garbage being downloaded since the links point to another page first (doh!).

I also had reconfigure all my virtual networks, but then everything works fine. Thanks for the help everyone.

Posted by SirAwesomSupery on April 24, 2008, 11:52 am

Ah, sorry about the filename problem, and yes, I should have used links to the direct filenames, instead the html. I'll fix that as well.

Posted by jondaley on April 24, 2008, 12:40 pm

Could you be more detailed in how to use the patch? As a rather new linux user, I am not sure what to do with it.
I tried Lenrek's suggestion but I got a bunch errors when patching. I posted on his site also.

I just compiled the new kernel and now want to install vmware. What I really want to do is log into my window's partition using vmware.
Thanks
Frank

Posted by Frank on April 25, 2008, 11:27 pm

So I tried the patch, got a few rejections

For those that do not know the patches apply to the contents of the source tar files that live in /usr/lib/vmware/modules/source (if you installed via RPM). One untars the file (via sudo or as the root user), and then applies the patch files with the aptly named patch command. This can be achieved via the normal form:
patch -p0 < $FOO
where $FOO is the name of the patch file.

Here was my mileage-

sudo patch -p0 < ~/vmnet-2.6.25.patch
patching file vmnet-only/bridge.c
Hunk #1 succeeded at 106 (offset 4 lines).
patching file vmnet-only/compat_wait.h
Hunk #1 succeeded at 38 (offset 4 lines).
patching file vmnet-only/driver.c
Hunk #1 FAILED at 516.
1 out of 1 hunk FAILED -- saving rejects to file vmnet-only/driver.c.rej
patching file vmnet-only/Makefile.kernel
Hunk #1 FAILED at 7.
1 out of 1 hunk FAILED -- saving rejects to file vmnet-only/Makefile.kernel.rej
patching file vmnet-only/netif.c
Hunk #1 FAILED at 295.
1 out of 1 hunk FAILED -- saving rejects to file vmnet-only/netif.c.rej
patching file vmnet-only/sk_alloc.c
Hunk #1 succeeded at 12 with fuzz 2 (offset 8 lines).
Hunk #2 succeeded at 13 with fuzz 2.
patching file vmnet-only/vm_basic_types.h
Hunk #1 FAILED at 154.
Hunk #2 succeeded at 187 with fuzz 1 (offset 19 lines).
Hunk #3 succeeded at 294 with fuzz 1 (offset 32 lines).
1 out of 3 hunks FAILED -- saving rejects to file vmnet-only/vm_basic_types.h.rej
patching file vmnet-only/vmnetInt.h
Hunk #1 FAILED at 35.
1 out of 1 hunk FAILED -- saving rejects to file vmnet-only/vmnetInt.h.rej
patching file vmnet-only/vnetInt.h
Hunk #1 FAILED at 29.
1 out of 1 hunk FAILED -- saving rejects to file vmnet-only/vnetInt.h.rej

-----------------------------------------------

wget -qO - https://jon.limedaley.com/plog/gallery/1/vmmon-2.6.25.patch | sudo patch -p0
patching file vmmon-only/include/vcpuset.h
Hunk #1 FAILED at 71.
1 out of 1 hunk FAILED -- saving rejects to file vmmon-only/include/vcpuset.h.rej
patching file vmmon-only/include/vm_basic_types.h
Hunk #1 succeeded at 163 (offset 9 lines).
Hunk #3 succeeded at 273 with fuzz 1 (offset 11 lines).
patching file vmmon-only/linux/driver.c
Hunk #1 FAILED at 1655.
1 out of 1 hunk FAILED -- saving rejects to file vmmon-only/linux/driver.c.rej
patching file vmmon-only/Makefile.kernel

-----------------------------------------------

I'll be happy to provide the *.rejs or the whole source tar.

FWIW, This was a virginal install of VMware-workstation-6.0.2-59824.x86_64.rpm

No vmware-any-any-116.tgz.

Posted by Matthew A. R. Sherian on April 26, 2008, 12:40 am

Ah, this patch is meant for the vmware server, not workstation.

Posted by joyful on April 26, 2008, 12:39 pm

Hi, I finally got it to work!
Thanks Jon for the patch!
I left a detailed explanation for a linux noob like me on how to get it up and running at the following link:
http://lenrek.wordpress.com/2008/04/24/vmware-105-and-kernel-2625/

I had the same problem as Matthew. I downloaded wmplayer instead of vmserver.

More detailed instructions would be a great help.

Thanks a bunch.
Frank

Posted by Frank on April 26, 2008, 5:39 pm

I guess my post got spammed so I thought I would write it again to help others.

I finally got vmware up and running. Thanks Jon for the patch. However, it would be great to supply more complete info for linux noobs like me.

I did the same mistake as Matthew but downloaded vmplayer instead of vmserver.

I provided additional detailed info on setting up vmserver on the 2.6.25 kernel at lenrek's site.
Cheers
Frank

Posted by Frank on April 26, 2008, 5:46 pm

Tested with 2.6.25 vanilla and vmware-server-1.0.5: all went ok except some minor warnings

Building the vmmon module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config2/vmmon-only’
make -C /lib/modules/2.6.25/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/home/tmp214/Downloads/linux-2.6.25′
CC [M] /tmp/vmware-config2/vmmon-only/linux/driver.o
CC [M] /tmp/vmware-config2/vmmon-only/linux/hostif.o
CC [M] /tmp/vmware-config2/vmmon-only/common/cpuid.o
CC [M] /tmp/vmware-config2/vmmon-only/common/hash.o
CC [M] /tmp/vmware-config2/vmmon-only/common/memtrack.o
CC [M] /tmp/vmware-config2/vmmon-only/common/phystrack.o
CC [M] /tmp/vmware-config2/vmmon-only/common/task.o
CC [M] /tmp/vmware-config2/vmmon-only/common/vmx86.o
/tmp/vmware-config2/vmmon-only/common/vmx86.c: In function ‘Vmx86_GetkHzEstimate’:
/tmp/vmware-config2/vmmon-only/common/vmx86.c:1899: warning: passing argument 4 of ‘Div643264’ from incompatible pointer type
/tmp/vmware-config2/vmmon-only/common/vmx86.c:1908: warning: passing argument 4 of ‘Div643232’ from incompatible pointer type
CC [M] /tmp/vmware-config2/vmmon-only/vmcore/moduleloop.o
LD [M] /tmp/vmware-config2/vmmon-only/vmmon.o
Building modules, stage 2.
MODPOST 1 modules
WARNING: modpost: module vmmon.ko uses symbol ‘init_mm’ marked UNUSED
CC /tmp/vmware-config2/vmmon-only/vmmon.mod.o
LD [M] /tmp/vmware-config2/vmmon-only/vmmon.ko
make[1]: Leaving directory `/home/tmp214/Downloads/linux-2.6.25′
cp -f vmmon.ko ./../vmmon.o
make: Leaving directory `/tmp/vmware-config2/vmmon-only’
The module loads perfectly in the running kernel.

Posted by Michele Masè on April 26, 2008, 6:46 pm

Jon -> apologies for the delay! I migrated to VMware beta 2... and then went to Xen for a bit. I just got around to testing your patches and they worked flawlessly!

Here's the steps I took;

VMWare 1.0.5 on 2.6.25 steps;

1) Download the TAR binary from http://www.vmware.com/download/server/
2) Uncompress, run vmware-install.pl as root.
2a. I choose to install the binaries to /opt/vmware/bin for organizational purposes.
2b. Do not choose to run vmware-config.pl. If you do by accident, no problem. Proceed to step 3 when compilation fails.
3) Download the vmmon-2.6.25.patch and vmnet-2.6.25 path courtesy of Jon Daley [above]
3a. Copy the patches to the VMware module source [e.g. /opt/vmware/lib/vmware/modules/source or /usr/lib/vmware/modules/source ]
4) Apply the patches to the VMware modules (see 3a above for example of file locations)
4a. Uncompress vmnet.tar and vmmon.tar
4b. Apply the appropriate patch for example;
--
cd vmmon-only
patch -p1 Enable unused/obsolete exported symbols )
1a. If it is not, you will recieve complaints about unrecognized symbol (init_mm) during vmmon compilation.
2b. You can always rebuild your kernel and compile VMware 1.0.5 later, so don't worry too much about this at first.

Posted by Brice Burgess on April 27, 2008, 2:31 pm
1 2 3  Next»
Add Comment
Add comment
E-mail me when comments occur on this article

culpable-adaptable