Ask Your Question
1

Vmware workstation 12.1 does not compile on kernel 4.7

asked 2016-09-09 07:00:24 -0500

hhlp gravatar image

updated 2016-09-09 07:56:49 -0500

FranciscoD_ gravatar image

besides this error in VmWare 12 vmware-workstation-not-launching-on-fedora-23 and workstation-121-does-not-compile-on-kernel-46 we can find another one :

Workstation 12.1 does not compile on kernel >= 4.7 expecific error is Failed to compile module vmnet

Regards.,

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2016-09-09 07:02:24 -0500

hhlp gravatar image

updated 2016-09-09 07:25:00 -0500

The problem is that we need to make some adjust in the vmware source, here are the bug an instruction how to avoid that problem in this forum:

Vmware workstation 12.1.1 and 4.7 kernel is broke

the step simple :

su -
cd /usr/lib/vmware/modules/source
tar xf vmnet.tar
mv vmnet.tar vmnet.old.tar
sed -i -e 's/dev->trans_start = jiffies/netif_trans_update(dev)/g' vmnet-only/netif.c
tar cf vmnet.tar vmnet-only
rm -r vmnet-only

Remember to compile vmware after each kernel Update or your interface will be gone :

vmware-modconfig --console --install-all

Regards.,

edit flag offensive delete link more
2

answered 2017-01-16 13:38:21 -0500

joseluismantilla gravatar image

updated 2017-01-17 04:08:53 -0500

hhlp gravatar image

If you have kernel 4.9 you will need.

Steps:

tar -xf /usr/lib/vmware/modules/source/vmmon.tar
gedit vmmon-only/linux/hostif.c

In vmmon-only/linux/hostif.c, around line 1162, change

#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
retval = get_user_pages((unsigned long)uvAddr, numPages, 0, 0, ppages, NULL);
#else
retval = get_user_pages(current, current->mm, (unsigned long)uvAddr,
numPages, 0, 0, ppages, NULL);
#endif

to

#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
retval = get_user_pages((unsigned long)uvAddr, numPages, 0, ppages, NULL);
#else
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
retval = get_user_pages((unsigned long)uvAddr, numPages, 0, 0, ppages, NULL);
#else
retval = get_user_pages(current, current->mm, (unsigned long)uvAddr,
numPages, 0, 0, ppages, NULL);
#endif
#endif

sudo tar -cf /usr/lib/vmware/modules/source/vmmon.tar vmmon-only/
tar -xf /usr/lib/vmware/modules/source/vmnet.tar
gedit vmnet-only/userif.c

In vmnet-only/userif.c, around line 113, change

#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
retval = get_user_pages(addr, 1, 1, 0, &page, NULL);
#else
retval = get_user_pages(current, current->mm, addr,
1, 1, 0, &page, NULL);
#endif

to

#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
retval = get_user_pages(addr, 1, 0, &page, NULL);
#else
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
retval = get_user_pages(addr, 1, 1, 0, &page, NULL);
#else
retval = get_user_pages(current, current->mm, addr,
1, 1, 0, &page, NULL);
#endif
#endif

sudo tar -cf /usr/lib/vmware/modules/source/vmnet.tar vmnet-only/

Greetings

edit flag offensive delete link more

Comments

If you can add more explanations to your answer, i think this should be the answer for 4.6-4.9. There's also additional steps for 4.8-4.9 that i had to do yesterday to get vmmon to compile;

In /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c, around line 1594, change

unsigned int anonPages = global_page_state(NR_ANON_PAGES);

to

unsigned int anonPages = global_page_state(NR_ANON_MAPPED);
elsaso gravatar imageelsaso ( 2017-01-17 10:42:51 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-09-09 07:00:24 -0500

Seen: 2,399 times

Last updated: Jan 17 '17