mkubecek / vmware-host-modules

Patches needed to build VMware (Player and Workstation) host modules against recent kernels
GNU General Public License v2.0
2.31k stars 374 forks source link

Support for kernel 5.8.0? #70

Closed dbonner closed 4 years ago

dbonner commented 4 years ago

Hi, Thanks so much for this project. I've used it successfully a number of times with kernel updates. However, I was not able to successfully run VMware Workstation 15.5.6 using the kernel modules created by this package after updating to Ubuntu mainline kernel 5.8.0. I am on Ubuntu 18.04. Do you plan to support kernel 5.8.0? Many thanks, Daniel

mkubecek commented 4 years ago

I certainly do but the problem with 5.8 kernel is deeper and it's not even sure if it can be resolved within the host modules. Definitely not all of it as the segfaulting applications are closed source so that only VMware can fix them. The kernel crash happening when vmware-modconfig is bypassed might be possible to handle but it's really hard to investigate.

dbonner commented 4 years ago

No worries, Thanks for trying. Dan

On Tue, 4 Aug 2020 at 18:32, Michal Kubeček notifications@github.com wrote:

I certainly do but the problem with 5.8 kernel is deeper and it's not even sure if it can be resolved within the host modules. Definitely not all of it as the segfaulting applications are closed source so that only VMware can fix them. The kernel crash happening when vmware-modconfig is bypassed might be possible to handle but it's really hard to investigate.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mkubecek/vmware-host-modules/issues/70#issuecomment-668461257, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB26QRXJOSYF5H3ZEHMX6DR67BQBANCNFSM4PTZL6JQ .

mkubecek commented 4 years ago

For the sake of completeness, there is a discussion in VMware forum on this topic (no good news, I'm afraid, except that VMware is working on the problem).

mdlam92 commented 4 years ago

anyone have a workaround for this yet?

tommyjcarpenter commented 4 years ago

..the workaround is to downgrade the kernel until this is fixed in Vmware, from my reading everywhere on this issue. On Arch I've downgraded to linux 5.7 and pinned it there, until this issue is confirmed fixed. They seem to ACK that at some point in vmware 16, the next release, it will be fixed. Bleeding edge kernels are great until.. they're not =)

baryonix commented 4 years ago

I just added pull request #72 which seems to fix the issue at least for my systems. Hope this helps.

The pull request addresses the kernel issue. Regarding the vmware-modconfig crash, I don't see how to fix this without some advanced binary patching, but you can just symlink vmware-modconfig to /bin/true and build the modules manually.

dbonner commented 4 years ago

Thanks baryonix, I used your pull request branch and was able to install the vmware kernel modules (it worked on Ubuntu 18.04 with mainline kernels 5.8.6 and 5.8.7). I then did the following: mv /usr/bin/vmware-modconfig /usr/bin/vmware-modconfig_backup ln -s /bin/true /usr/bin/vmware-modconfig and I was able to run virtual machines. All the best, Dan

TahomaSoft commented 4 years ago

Michal (mkubecek), thanks very much for your ongoing work on the vmmon and vmnet patches! I have found them very useful for a long time.

~Erik

EpicVoyage commented 4 years ago

I did not have the latest version of vmware player installed and have updated. In addition to the instructions above, I had to load the kernel modules manually after creating a symlink in place of vmware-modconfig:

modprobe vmmon modprobe vmnet

And run the network configuration app:

vmware-netcfg

After that, everything seems to be up and running. Thanks, guys. Your work is really appreciated over here.

justinclift commented 4 years ago

Ahhh. I tend to run this, which I think (without checking) restarts those dependent services:

$ sudo /etc/init.d/vmware restart
avs333 commented 4 years ago

Thank you, the patch works just as nice for me with 5.8.8 and vmware-modconfig blocked!

Ulceration commented 4 years ago

The patch works in 5.8.6-1 on Manjaro.

Thanks for the contribution.

stefantalpalaru commented 4 years ago

Workstation 16.0 has been released: https://my.vmware.com/en/web/vmware/downloads/details?downloadGroup=WKST-1600-LX&productId=1038&rPId=51975#product_downloads

mkubecek commented 4 years ago

Thanks for the heads up. I updated the tmp/workstation-16 branch with preliminary patchset but I'll need 2-3 more hours before I can test it. It fails to build against vanilla 5.7 kernel but this rather seems to be a problem of objtool in v5.7. Builds against 5.8 and current mainline are fine.

jberanek commented 4 years ago

They've released Player 16.0 too, I'm going to try it on Fedora 32 with 5.8.7 kernel https://www.vmware.com/go/getplayer-linux

jberanek commented 4 years ago

So 16.0 Player doesn't work "out of the box" on 5.8.7 - it doesn't even attempt to build the kernel modules, which is a new one on me...

However, running vmware-modconfig by hand worked fine.

eku commented 4 years ago

When I start a VM under VMware Workstation 12.5.9 build-7535481 with the patches for kernel 5.8, my computer switches off. No error message, nothing. With kernel <5.8 the problem does not occur.

mkubecek commented 4 years ago

The fix for 5.8+ kernel is only in workstation-15.5.6 branch. i can try to backport it to 14.1.7 and 12.5.9 too but I don't have those installed anywhere so I cannot test them.

eku commented 4 years ago

@mkubecek I would appreciate it very much if you backport the changes and offer me for testing.

stefantalpalaru commented 4 years ago

The fix for 5.8+ kernel is only in workstation-15.5.6 branch.

Is it stable enough for a "w15.5.6-k5.8" tag?

mkubecek commented 4 years ago

Good point, tag w15.5.6-k5.8 created.

mkubecek commented 4 years ago

Branches workstation-14.1.7 and workstation-12.5.9 are updated now. Anyone able and willing to test them against 5.8 or 5.9-rc5 kernel is welcome.

eku commented 4 years ago

Starts and runs so far without any problems with Workstation 12.5.9. Looks promising.

What can happen in the worst case? Can data be corrupted unnoticed?

mkubecek commented 4 years ago

Thank you for testing. You can never be 100% sure but due to nature of the problems with 5.8 kernel, a more visible, I would expect much more visible effect (host crashing quickly, most likely).

pepe386 commented 4 years ago

workstation-14.1.7 on 5.8.11-200.fc32.x86_64 is not working for me:

/usr/bin/vmware: line 105: 169123 Segmentation fault      (core dumped) "$BINDIR"/vmware-modconfig --appname="VMware Workstation" --icon="vmware-workstation"
justinclift commented 4 years ago

@pepe386 That's the other half of the problem, easily solved by @dbonner's approach above:

$ sudo mv /usr/bin/vmware-modconfig /usr/bin/vmware-modconfig_backup
$ sudo ln -s /bin/true /usr/bin/vmware-modconfig
pepe386 commented 4 years ago

@justinclift thanks! got it working now.

anandkulkarnisg commented 4 years ago

I certainly do but the problem with 5.8 kernel is deeper and it's not even sure if it can be resolved within the host modules. Definitely not all of it as the segfaulting applications are closed source so that only VMware can fix them. The kernel crash happening when vmware-modconfig is bypassed might be possible to handle but it's really hard to investigate.

I have tested the fixes mentioned above with recompiled modules of vmmon.tar and vmnet.tar from above and also symlinked vmware-modconfig to /bin/true. the workstation starts and when VM machine is started the physical host is hung [ does not recover ] or violently crashes and reboots the OS. So this is definitely not working. My machine details are below.

[anand@ldnpsr2937 ~]$neofetch /:-------------:\ anand@fc31.intranet.barcapint.com :-------------------:: --------------------------------------- :-----------/shhOHbmp---:\ OS: Fedora release 31 (Thirty One) x86_64 /-----------omMMMNNNMMD ---: Host: 80Q7 Lenovo ideapad 300-15ISK :-----------sMMMMNMNMP. ---: Kernel: 5.8.13-100.fc31.x86_64 :-----------:MMMdP------- ---\ Uptime: 1 day, 1 hour, 43 mins ,------------:MMMd-------- ---: Packages: 3836 (rpm) :------------:MMMd------- .---: Shell: bash 5.0.17 :---- oNMMMMMMMMMNho .----: Resolution: 1920x1080 :-- .+shhhMMMmhhy++ .------/ DE: GNOME 3.34.5 :- -------:MMMd--------------: WM: Mutter :- --------/MMMd-------------; WM Theme: Adwaita :- ------/hMMMy------------: Theme: Adwaita [GTK2/3] :-- :dMNdhhdNMMNo------------; Icons: Adwaita [GTK2/3] :---:sdNMMMMNds:------------: Terminal: gnome-terminal :------:://:-------------:: CPU: Intel i7-6500U (4) @ 3.100GHz :---------------------:// GPU: Intel Skylake GT2 [HD Graphics 520] GPU: AMD ATI Radeon HD 8670A/8670M/8690M / R5 M330 / M430 / Radeon 520 Mobile Memory: 2241MiB / 15866MiB

justinclift commented 4 years ago

@anandkulkarnisg Which version of VMware Workstation is that with?

anandkulkarnisg commented 4 years ago

15.5.6

justinclift commented 4 years ago

Ouch. That should work... though it's obviously not for you. :frowning:

anandkulkarnisg commented 4 years ago

@justinclift I can only think that the testing you guys did was on 5.8.6 and 5.8.7 but not on 5.8.13 and who knows that might all be the difference. I really am not stuck luckily , can go back to win10 to run VM when i need it. Most likely will consider migrating to workstation 16.x but not this year...let it stabilize from being cutting edge ;)

justinclift commented 4 years ago

I tried it quickly on my desktop - OpenSUSE Leap 15.2 (with kernel 5.8.14-2) - just after you wrote your initial comment. With it, a Win 7 x64 VM started and ran fine, though I only ran it for about a minute as I didn't actually need it for anything at the time. :wink:

mkubecek commented 4 years ago

if you provide almost no information about what exactly you did and what exactly happened, there is not much anyone can do to help you.

mkubecek commented 4 years ago

...and this should have been closed long ago.

anandkulkarnisg commented 4 years ago

if you provide almost no information about what exactly you did and what exactly happened, there is not much anyone can do to help you.

Apologies @mkubecek , Is that for me ? I gave you the information right ? i changed the source of vmmon and vmnet.tar given by your 15.5.6 branch and compiled it on kernel 5.8.13 as stated above. segfaults during the vmware-modconfig run to recompile. But then i tried linking that to /bin/true and then atleast workstation starts but then all vm machines crash and take the host kernel along with it :) hahaha...so every time i try something my linux reboots. hard one to crack :)

justinclift commented 4 years ago

@anandkulkarnisg Generally the process for making this work is:

$ git clone https://github.com/mkubecek/vmware-host-modules
$ cd vmware-host-modules/
$ git checkout workstation-15.5.6
$ make
$ sudo make install
$ sudo /etc/init.d/vmware restart

Try doing just that, and only that, instead of manually mucking around with vmmon and vmnet. Hopefully that works. (If it does, that just means there was some other step involved in the make or make install. Nothing to worry about. :wink:)

mkubecek commented 4 years ago

I gave you the information right?

Not really. Without exact step-by-step description of what you did, I cannot be sure missing some step did not result in running with an unpatched module (or one missing some of the patches). And without any details about the host kernel crash (like a stack trace), I can hardly analyze what went wrong.

mkubecek commented 4 years ago

Actually, it may be quite simple: if you went the "patched tarballs" way and replaced vmware-modconfig by a link to /bin/true, how exactly did you recompile the modules? Running vmware-modconfig would obviously not compile anything when it's a link to /bin/true.

anandkulkarnisg commented 4 years ago

Actually, it may be quite simple: if you went the "patched tarballs" way and replaced vmware-modconfig by a link to /bin/true, how exactly did you recompile the modules? Running vmware-modconfig would obviously not compile anything when it's a link to /bin/true.

@mkubecek , @justinclift Thx a lot for steps. I found out and the mess was due to git not pulling the latest fixes in 15.5.6 branch due to fact that i had some local changes there and git was aborting and asking to stash away. I did some over engineering with my scripts and automated the whole stuff so was silently blowing up mid way on compilation :+1:

The steps worked perfectly when run manually and now i am able to run the VM without issues. Hurahhhh!! :)

justinclift commented 4 years ago

Awesome. :smile: