VMware

This Question is Possibly Answered

1 "correct" answer available (10 pts) 1 "helpful" answer available (6 pts)
1 2 Previous Next 17 Replies Last post: Apr 28, 2008 9:33 AM by birdie  

2.6.25 host: 6.0.2 needs some help.... posted: Feb 13, 2008 2:36 PM

Click to view selinux's profile Enthusiast 117 posts since
Jan 15, 2005

After downloading/installing a 2.6.25rc1 kernel, "vmware-config.pl" fails.

I've localized some issues to the comple of task.c: some changes in the kernel headers seem to break g++.

Looks like <asm/page.h> is being included, as the preprocessor flag: "_I386_PAGE_H" appears renamed to "_ASM_X86_PAGE_H".

Fixing this allows vmmon to compile, but the insmod fails with:

Feb 13 09:04:11 localhost kernel: vmmon: Unknown symbol init_mm
Feb 13 09:04:11 localhost kernel: vmmon: Unknown symbol init_mm

This symbol is now defined in <linux/init_task.h> , but I haven't figured out where/how to include it. A simple "brute force" insert into "linux/driver.c" results in "mismatch" error message at the insmod.

I vaguely remember fiddling with this before: something to do with LINUX_VERSION_CODE or some such.

Anyone remember or have hints?

Anyone already have this working?


thanks,

tom

Re: 2.6.25 host: 6.0.2 needs some help....

1. Feb 15, 2008 9:26 AM in response to: selinux
Click to view ran's profile Enthusiast 53 posts since
Sep 30, 2005

Same problem running vmware-config.pl:

......

In file included from /tmp/vmware-config0/vmmon-only/common/hostKernel.h:56,
from /tmp/vmware-config0/vmmon-only/common/task.c:30:
include/asm/page.h: In function ‘pte_t native_make_pte(pteval_t)’:
include/asm/page.h:128: error: expected primary-expression before ‘)’ token
include/asm/page.h:128: error: expected ‘;’ before ‘{’ token
include/asm/page.h:128: error: expected primary-expression before ‘.’ token
include/asm/page.h:128: error: expected `;' before ‘}’ token
In file included from /tmp/vmware-config0/vmmon-only/common/task.c:1194:
/tmp/vmware-config0/vmmon-only/common/task_compat.h: At global scope:
/tmp/vmware-config0/vmmon-only/common/task_compat.h:9: warning: ‘typedef’ was ignored in this declaration
make[2]: *** [/tmp/vmware-config0/vmmon-only/common/task.o] Error 1
make[1]: *** _module_/tmp/vmware-config0/vmmon-only Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.25-0.40.rc1.git2.fc9-x86_64'
make: *** http://vmmon.ko Error 2

Does anybody have solve it?


Re: 2.6.25 host: 6.0.2 needs some help....

2. Feb 27, 2008 3:17 PM in response to: ran
Click to view Ehud's profile Novice 16 posts since
Feb 27, 2008
The following changes allow vmnet and vmmon to compile and load. I was not able to figure out how to get superoperations.read_inode fixed so vmblock won't build but it's not cruicial.

I also apologize it's not in patch form. I just did it and am posting the info to help others. My "original" tars are actually after vmware-any-any-115 and a private patch to change the version to 167.

vmnet-only/compat_sock.h

old:
#include <net/sock.h>

new:
#include <net/sock.h>

/* http://forum.openvz.org/index.php?t=msg&goto=23299& */
static inline void sock_valbool_flag(struct sock *sk, int bit, int valbool)
{
if (valbool)
sock_set_flag(sk, bit);
else
sock_reset_flag(sk, bit);
}


filter.c:

old:
#include <linux/netdevice.h>

new:
#include <linux/netdevice.h>
#define NF_IP_LOCAL_OUT NF_INET_LOCAL_OUT
#define NF_IP_LOCAL_IN NF_INET_LOCAL_IN
#define NF_IP_POST_ROUTING NF_INET_POST_ROUTING

vmmon:
common/task.c:

old:
#define _I386_PAGE_H

new:
#define _ASM_X86_PAGE_H

root@egdell vmmon-only# uname -a
Linux egdell.wetwork.net 2.6.25-rc1 #1 SMP Sun Feb 24 08:58:34 MST 2008 x86_64 x86_64 x86_64 GNU/Linux
root@egdell vmmon-only# service vmware status
At least one instance of VMware Workstation is still running.

Bridged networking on /dev/vmnet0 is running
Host network detection is not running
Host-only networking on /dev/vmnet8 is running
DHCP server on /dev/vmnet8 is running
NAT networking on /dev/vmnet8 is running
Module vmmon loaded
Module vmnet loaded

Ehud

Re: 2.6.25 host: 6.0.2 needs some help....

3. Feb 27, 2008 3:39 PM in response to: selinux
Click to view KevinG's profile Guru 16,980 posts since
Jan 8, 2004

Hi tom,

Did you try Petr's latest vmware-any-any-update patch?

http://knihovny.cvut.cz/ftp/pub/vmware/

I would put things back as they were before applying the patch

Re: 2.6.25 host: 6.0.2 needs some help....

4. Feb 27, 2008 3:51 PM in response to: KevinG
Click to view Ehud's profile Novice 16 posts since
Feb 27, 2008

KevinG the changes I posted are to be applied to a POST vmware-update-any-any-115 to get it to work on 2.6.25.

There is no vmware-update-any-any that covers 2.6.25 (which is only in -rc1 anyway).

Cheers,

Ehud

Re: 2.6.25 host: 6.0.2 needs some help....

5. Feb 27, 2008 3:59 PM in response to: Ehud
Click to view KevinG's profile Guru 16,980 posts since
Jan 8, 2004

Hi Ehud,

To be honest I have not looked at Petr's patches for sometime to see what kernel versions he is supporting, so I will take your word on it for now.

I will have to talk with Petr the next time I see him in the hallways and see what his future plans are for any updates.

  • Kevin


Re: 2.6.25 host: 6.0.2 needs some help....

7. Feb 27, 2008 5:41 PM in response to: selinux
Click to view Ehud's profile Novice 16 posts since
Feb 27, 2008

Tom I'm suspecting one of three things:

1. Mismatch between your version of kernel-headers, kernel-devel, and the kernel itself

2. vmware-config.pl erroneously chose the wrong directory in which to compile the modules (although it looks correct from the "leaving directory...." message). I'm also assuming your architechture is i686. Mine is x86_64 so I'm not sure if that's a factor.

and

3. That Fedora's Development kernel doesn't have all the upstream changes yet.

What I do is git the wireless-dev kernel:

git clone git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git
cd wireless-2.6
git checkout -b everything origin/everything

That is where I got 2.6.25-rc1. I've had to apply the public Nvidia patch and vmware-update-any-any-115 and the patches above, but both load and run perfectly.

I have not had success with Fedora's Development kernels. For example 2.6.24-0.133.rc6.git8.fc9 LOOKED fine but right after Nash started it said it couldn't set the real time clock!

The time was then way way off, and ntpd couldn't bind, and I had to service restart ntpd to correct. On shutdown it said it was synching the time and yet... didn't. This didn't happen with any of the 2.6.24's I built (-rc1 through -rc8 through final release) or the Fedora 2.6.23 release kernel or the wireless-dev 2.6.25.

As for init_mm please check out http://www.nvnews.net/vbulletin/showthread.php?t=107144&page=3 ... Again I did not have this issue.

I hope any of this helps...

Ehud

Re: 2.6.25 host: 6.0.2 needs some help....

9. Feb 27, 2008 6:07 PM in response to: selinux
Click to view Ehud's profile Novice 16 posts since
Feb 27, 2008

Yeah those all look correct. The link I mentioned has the following gem in it, which may correct the problem for you. (I'm unsure why I don't have it unless init_mm is still in -rc1 but isn't later and the Fedora guys have already removed it...

While I used to do lots of virtual memory stuff (back in the old VMS days) I'm not at all up to date on how the Linux kernel does it, so I'm like a blind coder here. Does this even help or am I wasting your time? :)

Ehud

For the init_mm-struct, in old kernels (2.0) init_mm wasn't exported
too. So there was a workaround for those modules, which needed it:

Quote:
static struct mm_struct *init_mm_ptr;
#define init_mm (*init_mm_ptr) /* spaetere ifdefs vermeiden */

static void retrieve_init_mm_ptr(void)
{
struct task_struct *p;

for (p = current ; (p = p->next_task) != current ; )
if (p->pid == 0)
break;

init_mm_ptr = p->mm;
}

The code is from the german version of "Linux Device Drivers" by
Alessandro Rubini & Jonathan Corbet. It can be found in chapter 13
(Backward Compatibility).

Re: 2.6.25 host: 6.0.2 needs some help....

10. Feb 27, 2008 6:10 PM in response to: Ehud
Click to view Ehud's profile Novice 16 posts since
Feb 27, 2008

Short followup: Looks like it's still in 2.6.25-rc3:

See http://www.linuxhq.com/kernel/v2.6/25-rc3/kernel/fork.c

Ehud

Re: 2.6.25 host: 6.0.2 needs some help....

13. Feb 28, 2008 12:58 PM in response to: selinux
Click to view Ehud's profile Novice 16 posts since
Feb 27, 2008

I wish I knew what it did... I found a web page that uses it and defines it at http://www.ussg.iu.edu/hypermail/linux/kernel/0506.3/2054.html

and his definition is:

static int __init mm_init(void)

I don't think it will help but you might try it. Alternately look for where mm_init is being used, and if you can paste that code perhaps I or someone brighter than me can figure out how to recode it. I realized why I don't have this problem - I'm using VMware Workstation...

E

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