VMware Communities
mfelker
Expert
Expert

VMware WS 12.5.6 fails to compile on openSUSE Leap 42.3 with kernel 4.4.68-2-default

VMware Workstation is having problems with openSUSE or vice-versa - again.

1)   Installed openSUSE Leap 42.2

2)   VMware Workkstation 12.5.6 compiles with kernel 4.4.62-18.6-default

but the Workstation Servef does not start

3)    Upgraded openSUSE to openSUSE Leap 42.3 Beta

4)   With Kernel  4.4.68-2-default WS fails to compile since it cannot find file version.h.   Version.h is nowhere to be found in any sources.    This happened with some versions of openSUSE many years ago but there version.h could be found otherwise.

5)   I have a choice.   I can go back to kernel 4.4.62-18.6-default or I can use kernel-4.4.68-2-vanilla which I know will compile and has version.h.    The other possibility of course is to use another distro.   Unfortunately I'm finding that Debian 9 has problems with recent upgrades.

If anybody knows how I can version.h for the current Leap kernel I'd appreciate it.

Marty

22 Replies
mfelker
Expert
Expert

Hopefully an openSUSE Kernel dev uses VMware Workstation but I guess I'll need to post to the openSUSE forums.

Adding the latest openSUSE Leap 42.3 kernel reposI find kernel 4.4.68-5.g47b5464-default fails to compile because version.h is not found but kernel 4.4.68-5.g47b5464-vanilla will compile but the Workstation server still fails to start.  

I think I will live with this for awhile since Virtualbox 5.1.23-115382 (a test build) compiles and run just fine and I like openSUSE otherwise and the Windows version of WS works completely on Windows Server 2016 which I can boot to (as well as Windows 10 where I'm using Hyper-V).

Reply
0 Kudos
HuanguoZhong
VMware Employee
VMware Employee

Thanks for coming to Workstation community. It reproduces on our side, we've opened a bug to track it.

Reply
0 Kudos
joseph_robert_m
Contributor
Contributor

Make sure you have the vanilla kernels installed also.  I run openSUSe also, and anything after 10.1 both the kernel source and vanilla kernels need to be installed to compile Workstation.

**EDIT: DO NOT install the vanilla kernels.  I am have issues connecting to vSphere server after an upgrade, and noticed that the vanilla kernels were not installed. I re-installed them, and Workstation will not run at all now.  But do as

Reply
0 Kudos
mkubecek
Hot Shot
Hot Shot

Do you have kernel-default, kernel-default-devel and kernel-devel packages (with the same version) installed?

I tried to build against 4.4.68-2 from 42.3 now and the only problem was redefinition of PCI_VENDOR_ID_VMWARE which can be addressed by vmnet: use standard definition of PCI_VENDOR_ID_VMWARE if available · mkubecek/vmware-host-modules@c... . I have no idea why this problem doesn't manifest on other distributions with kernel 3.18 and later.

Reply
0 Kudos
mfelker
Expert
Expert

How's the tracking on this bug coming along.   WS 12.5.7 still fails to install on the release version of openSUSE Leap 42.3.   Hope this is a priority.   If you need I can supply logs.

I will install the vanilla kernel which should work.

Reply
0 Kudos
mfelker
Expert
Expert

Basically, WS 12.5.7 doesn't really work on openSUSE Leap 42.3 even with a vanilla kernel.   I will compile but WS Server won't start so no Shared VMs.   Can't connect to a ESXiVM either.   I may as well install Tumblewee <sigh>

Reply
0 Kudos
hendrikw84
Contributor
Contributor

I solved this by manually editing the sources of the kernel modules.

How (for vmware player 12.5.7):

>>> go to the modules sources and unpack:

cd /usr/lib/vmware/modules/source/

tar -xf vmnet.tar

tar -xf vmmon.tar

cd vmmon-only/linux/

vi hostif.c

>>> replace:

#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)

   retval = get_user_pages((unsigned long)uvAddr, numPages, 0, ppages, NULL);

#elif 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

>>> with:

#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)

   retval = get_user_pages((unsigned long)uvAddr, numPages, 0, ppages, NULL);

#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)

   retval = get_user_pages((unsigned long)uvAddr, numPages, 0, 0, ppages, NULL);

#else

   retval = retval = get_user_pages((unsigned long)uvAddr, numPages, 0, ppages, NULL);

#endif

cd ../..

cd vmnet-only/

vi userif.c

>>>  replace:

#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)

   retval = get_user_pages(addr, 1, FOLL_WRITE, &page, NULL);

#elif 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

>>> with :

#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)

   retval = get_user_pages(addr, 1, FOLL_WRITE, &page, NULL);

#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)

   retval = get_user_pages(addr, 1, 1, 0, &page, NULL);

#else

   retval = get_user_pages(addr, 1, 0, &page, NULL);

#endif

vi netif.c

>>> change:

compat_netif_trans_update(dev);

>>> to:

netif_trans_update(dev);

>>> put the changed files back into the tar balls:

cd ..

tar -cf vmnet.tar vmnet-only/

tar -cf vmmon.tar vmmon-only/

>>> compile everything:

vmware-modconfig --console --install-all

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

As you can see, the interface of get_user_pages() changed from Leap 42.2 to 42.3 even though it is the same kernel version (4.4).

Backports ...

Hendrik

Dr__Jürgen_Voll
Contributor
Contributor

The bugfix nr 7 given by hendrikw84 worked for

  • VMware-Workstation-Full-12.5.7-5813279.x86_64.bundle

and

  • openSUSE Leap 42.3 with kernel 4.4.76-1-default

too

Reply
0 Kudos
SteveBacon
Contributor
Contributor

Thanks Hendrik,

  I applied this patch and all is compiling properly. Some caveats to previous posts...

I installed default kernel source and build environment rather vanilla version as

I run the default kernel  4.4.76-1-default in the production version of Leap 42.3.

Thanks again,

stevedb

Reply
0 Kudos
hendrikw84
Contributor
Contributor

Hi Steve,

this is meant to be used with the default kernel. The "vanilla" kernel, as I understand it, does not contain the backports from kernel 4.10, which cause the compilation errors.

Hendrik

Reply
0 Kudos
dickwaite
Contributor
Contributor

Grand Evening,

The kernel today (2017-08-08) is 4.4.76-1 and it still gives issues with VMware Workstation 12.5.7 Seems the good company SUSE does not test with 3rd party apps.

The tar balls you created, can this be "found" some where public ? I'm dead in the water at the moment, either I re-install LEAP 42.2 or VMware issues a fix ...

>>> compile everything:

vmware-modconfig --console --install-all

I can handle the final build but the parts before that are not in my league.

Many Thanks,

__R

hendrikw84
Contributor
Contributor

I've put the patched modules for VMWare Player 12.5.7 on my website:

http://www.hendrik-woltersdorf.de/linux/vmware/index.html

I don't know, if VMWare workstation uses the same modules as the player. If not, I could put them on my site too, if someone sends me either the patched versions or the unpatched ones. Use the email address in the imprint ("Impressum") on the site.

Hendrik

MichaelOF
Contributor
Contributor

Hi all,

I'm affected by the issue discussed here, but it's not really time critical for me: As it seems that Hendrik narrowed down the issue and has found a solution, will his changes find it's way back to VMware? Any ideas if and when this bug will be fixed?

Regards,

Michael

hendrikw84
Contributor
Contributor

The problem is openSUSE 42.3 specific. Therefore it is not easy to find a solution, that works everywhere.

But Oracle found a way to solve this for Virtualbox:

https://www.virtualbox.org/changeset/68217/vbox/?old=68214&old_path=%2Fvbox

Maybe this could be an "inspiration" for VMWare...

Hendrik

Reply
0 Kudos
mfelker
Expert
Expert

Has anybody tried the script I uploaded in a previous post.    It was apparently made for openSUSE but in my case worked perfeectlyto bypass the hideous "cannot determine gcc information" problem.   My kernel was 4.12.0.1 on Debian Sid using gcc 6.4

Reply
0 Kudos
harricot
Contributor
Contributor

I tried. I had to. Smiley Happy  For my work as a text editor, I want to use the same software like my customers do for the texts they send me. Most of them still use the MS Office thing. So I must have a reliable Windows installed in a vm.

I runned your script, but no cigar: [Bash] gcc-mfelker.log - Pastebin.com

(Using: gcc (SUSE Linux) 4.8.5, kernel 4.4.79-19-default)

Harrie Baken

Reply
0 Kudos
terryxela
Contributor
Contributor

Hendrik,

I use your patch in both VMware workstation

12.0.1 build-3160714

12.5.7 build-5813279

and they work great. I did uninstall of 12.0.1 and then install the 12.5.7. I am not sure if you use the automatic upgrade if you have to reinstall or not the modules, most likely you do.

VIELEN DANK Hendrik!

-=terry=-

Reply
0 Kudos
harry4516
Contributor
Contributor

Hendrik's patch works very well and vmware starts and can be used locally.

It still crashes when accessing a shared VM on a server, vmware simply exits with error.

This can be solved by:

export VMWARE_USE_SHIPPED_LIBS='yes'

vmware

Looks like Opensuse and vmware should get in contact and fix some issues since the shared lib bug is quite old and still existing.

Harry

Reply
0 Kudos
bill5
Contributor
Contributor

Hendrik,

I had the same failure to compile issue with

openSUSE Leap 42.3 running Kernel 4.4.87-25-default

Using your offered patched modules I successfully compiled

VMware Workstation 12 Pro - Ver 12.5.7, build 5813279

Thank you for your work on this issue,

Bill

Reply
0 Kudos