TransWikia.com

VMware Workstation 12 wont compile modules on linux kernel 4.6

Ask Ubuntu Asked by Rqomey on January 9, 2021

I recently had to install kernel 4.6 in my Ubuntu 16.04 to stop the random “suspend” crashes.

After install I ran:

sudo vmware-modconfig --console --install-all

and got the error:

<snip>

from /tmp/modconfig-VKdGcJ/vmmon-only/linux/hostif.c:32:
/tmp/modconfig-VKdGcJ/vmmon-only/linux/hostif.c: In function ‘HostIFGetUserPages’:
./arch/x86/include/asm/current.h:17:17: warning: passing argument 1 of ‘get_user_pages’ makes integer from pointer without a cast [-Wint-conversion]
 #define current get_current()


<snip>
from /tmp/modconfig-VKdGcJ/vmmon-only/linux/hostif.c:32:
./arch/x86/include/asm/current.h:17:17: warning: passing argument 2 of ‘get_user_pages’ makes integer from pointer without a cast [-Wint-conversion]
#define current get_current()

<snip>

from /tmp/modconfig-VKdGcJ/vmnet-only/userif.c:26:
/tmp/modconfig-VKdGcJ/vmnet-only/userif.c: In function ‘UserifLockPage’:
./arch/x86/include/asm/current.h:17:17: warning: passing argument 1 of ‘get_user_pages’ makes integer from pointer without a cast [-Wint-conversion]
#define current get_current()

<snip>
scripts/Makefile.build:291: recipe for target '/tmp/modconfig-VKdGcJ/vmnet-only/userif.o' failed
make[2]: *** [/tmp/modconfig-VKdGcJ/vmnet-only/userif.o] Error 1
make[2]: *** Waiting for unfinished jobs....
Makefile:1434: recipe for target '_module_/tmp/modconfig-VKdGcJ/vmnet-only' failed
make[1]: *** [_module_/tmp/modconfig-VKdGcJ/vmnet-only] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.6.0-040600-generic'
Makefile:120: recipe for target 'vmnet.ko' failed
make: *** [vmnet.ko] Error 2
make: Leaving directory '/tmp/modconfig-VKdGcJ/vmnet-only'
Unable to install all modules.  See log for details.

VMs wouldn’t run with an error regarding been unable to load vmmon

2 Answers

Prayag Sangode's answer on Before you can run VMware several modules must be compiled - Unix & Linux resolved the issue on Ubuntu 18 (VMware version 15.5).

git clone https://github.com/mkubecek/vmware-host-modules
cd vmware-host-modules
git checkout workstation-15.5.6
sudo make ; sudo make install

Answered by Yuvraj Takey on January 9, 2021

It appears get_user_pages was replaced with get_user_pages_remote

With this patch: https://lkml.org/lkml/2016/2/10/555

To resolve:

(From Arch linux wiki:)

https://wiki.archlinux.org/index.php/VMware#Kernel_modules_fail_to_build_after_Linux_4.6

cd /usr/lib/vmware/modules/source
tar xf vmmon.tar
mv vmmon.tar vmmon.old.tar
sed -i -e 's/get_user_pages/get_user_pages_remote/g' vmmon-only/linux/hostif.c
tar cf vmmon.tar vmmon-only
rm -r vmmon-only
tar xf vmnet.tar
mv vmnet.tar vmnet.old.tar
sed -i -e 's/get_user_pages/get_user_pages_remote/g' vmnet-only/userif.c
tar cf vmnet.tar vmnet-only
rm -r vmnet-only

To me it seems like this is a linux patch breaking userspace, am I wrong?

Answered by Rqomey on January 9, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP