VMware Server 1.0.9 und Kernel 2.6.31.3
Hier der Kernel-Patch kernel-2.6.31.3.mm_init.it-psycho.patch.bz2 (735 bytes) zum wiedereinfügen der Funktion INIT_MM() und des init_mm-Symbols.
Dazu gibt es noch eine angepasste VMware Server Modulversion: vmware-server-modules-2.6.31.3.it-psycho.tar.bz2 (173,63 KB)
Die aktualisierten Module vmmon.tar und vmnet.tar aus dem Modulpaket werden einfach in das Verzeichnis vmware-server-distrib/lib/modules/source (oder /usr/lib/vmware/modules/source/) kopiert und somit die alten Versionen überschrieben.
Danach wie gehabt VMware Server mit ./vmware-install.pl installieren resp. mit vmware-config.pl aktualisieren.
Artikel

Thx for patch, but … :(
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.31.3/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-2.6.31.3-patched’
CC [M] /tmp/vmware-config2/vmmon-only/linux/driver.o
In file included from /tmp/vmware-config2/vmmon-only/./include/machine.h:24,
from /tmp/vmware-config2/vmmon-only/linux/driver.h:15,
from /tmp/vmware-config2/vmmon-only/linux/driver.c:49:
/tmp/vmware-config2/vmmon-only/./include/x86.h:830:1: warning: “PTE_PFN_MASK” redefined
In file included from /usr/src/linux-2.6.31.3-patched/arch/x86/include/asm/paravirt.h:7,
from /usr/src/linux-2.6.31.3-patched/arch/x86/include/asm/irqflags.h:61,
from include/linux/irqflags.h:57,
from /usr/src/linux-2.6.31.3-patched/arch/x86/include/asm/system.h:11,
from /usr/src/linux-2.6.31.3-patched/arch/x86/include/asm/processor.h:17,
from include/linux/prefetch.h:14,
from include/linux/list.h:6,
from include/linux/module.h:9,
from /tmp/vmware-config2/vmmon-only/linux/driver.c:12:
/usr/src/linux-2.6.31.3-patched/arch/x86/include/asm/pgtable_types.h:182:1: warning: this is the location of the previous definition
In file included from /tmp/vmware-config2/vmmon-only/linux/driver.h:20,
from /tmp/vmware-config2/vmmon-only/linux/driver.c:49:
/tmp/vmware-config2/vmmon-only/./include/compat_wait.h:11:1: warning: “VMW_HAVE_EPOLL” redefined
: warning: this is the location of the previous definition
/tmp/vmware-config2/vmmon-only/linux/driver.c: In function ‘LinuxDriver_Ioctl’:
/tmp/vmware-config2/vmmon-only/linux/driver.c:1736: error: too many arguments to function ‘smp_call_function’
make[2]: *** [/tmp/vmware-config2/vmmon-only/linux/driver.o] Error 1
make[1]: *** [_module_/tmp/vmware-config2/vmmon-only] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.31.3-patched’
make: *** [vmmon.ko] Error 2
make: Leaving directory `/tmp/vmware-config2/vmmon-only’
Unable to build the vmmon module.
Try without SMP support and tell me if that works for you.
Hi,
# CONFIG_SMP is not set
and result is OK (with many warnings). Without SMP other 3 cores of my Quad are unusable, but i need them :( Can you help me pls?
Try this one:
Edit the line #1736 in vmmon-only/linux/driver.c
from
retval = compat_smp_call_function(LinuxDriverIPIHandler, NULL, 1, 1);
to
retval = compat_smp_call_function(LinuxDriverIPIHandler, NULL, 1);
Please let me know if that does the trick.
I don’t understand, 4 arguments are too many and 3 arguments are too little :(
/tmp/vmware-config0/vmmon-only/linux/driver.c:1736:71: error: macro “compat_smp_call_function” requires 4 arguments, but only 3 given
Besten Dank für die Anleitung. Wie benutze ich den patch – und läuft der auch für den Kernel 2.6.31-14-generic (Karmic -aktuell)?
Bin schon Tage am Suchen …
Freue mich über eine kurze Antwort.
Johann
Thanks for your corrections. It is easy to apply the patch to Kernel 2.6.31-14 which is shipped with Ubuntu. Just install the sources:
apt-get install linux-source-2.6.31
and the following packages required to build your own kernel:
apt-get install fakeroot build-essential crash kexec-tools makedumpfile kernel-wedge apt-get build-dep linux
The following has to be done as root:
sudo bash
Next, unpack the kernel sources:
cd /usr/src
tar xvfj linux-source-2.6.31.tar.bz2
and change to the source directory:
cd linux-source-2.6.31
Now, copy the kernel-config you use (I use the generic-pae one):
cp /boot/config-2.6.31-14-generic-pae .config
Now, patch the kernel sources manually:
vi arch/x86/kernel/init_task.c
after line:
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
add new line:
EXPORT_UNUSED_SYMBOL(init_mm);
vi include/linux/init_task.h
after line:
extern struct fs_struct init_fs;
add new lines:
#define INIT_MM(name) \
{ \
.mm_rb = RB_ROOT, \
.pgd = swapper_pg_dir, \
.mm_users = ATOMIC_INIT(2), \
.mm_count = ATOMIC_INIT(1), \
.mmap_sem = __RWSEM_INITIALIZER(name.mmap_sem), \
.page_table_lock = __SPIN_LOCK_UNLOCKED(name.page_table_lock), \
.mmlist = LIST_HEAD_INIT(name.mmlist), \
.cpu_vm_mask = CPU_MASK_ALL, \
}
That’s it. Now you need to build the kernel as documented:
http://blog.avirtualhome.com/2009/11/03/how-to-compile-a-kernel-for-ubuntu-karmic/
and install the kernel with
dpkg -i
Don’t forget to use the kernel modules provided by IT-Psycho to get VMWare
running. Here, you might need to change all calls:
compat_smp_call_function(LinuxDriverIPIHandler, NULL, 1, 1);
into:
compat_smp_call_function(LinuxDriverIPIHandler, NULL, 1);
for the files vmmon-only/linux/driver.c and vmmon-only/linux/hostif.c
For better comfort you may want to download the fixed kernel (only based on
generic-pae) and the VMWare module files here:
http://in-flux.de/docs/linux-image-2.6.31-14-vmware-pae_2.6.31-14.48_i386.deb
http://in-flux.de/docs/linux-headers-2.6.31-14-vmware-pae_2.6.31-14.48_i386.deb
http://in-flux.de/docs/vmmon.tar
http://in-flux.de/docs/vmnet.tar
Best regards and thank you for your wonderful blog entry,
Michael.
Btw: There is no need to manually patch the init_mm export. There is a patchset available in this blog posting.
[...] Die aktuellsten Versionen von VMware Server (1.0.10) und dem Linux Kernel (2.6.32.2) funktionieren weiterhin mit den bereits existierenden IT-Psycho Patches vom Oktober. [...]