Tested VMware 12.5.7 with Kernel 4.13-rc1 (Fedora 26, GCC 7.1.1) and vmmon compiles OK, but vmnet fails:
/home/rgadsdon/kernel/vmnet-only/bridge.c: In function ‘VNetBridgeReceiveFromVNet’:
/home/rgadsdon/kernel/vmnet-only/bridge.c:639:14: error: passing argument 1 of ‘atomic_inc’ from incompatible pointer type [-Werror=incompatible-pointer-types]
atomic_inc(&clone->users);
^
In file included from ./include/linux/atomic.h:4:0,
from ./include/linux/rcupdate.h:38,
from ./include/linux/rculist.h:10,
from ./include/linux/pid.h:4,
from ./include/linux/sched.h:13,
from /home/rgadsdon/kernel/vmnet-only/bridge.c:25:
./arch/x86/include/asm/atomic.h:89:29: note: expected ‘atomic_t * {aka struct <anonymous> *}’ but argument is of type ‘refcount_t * {aka struct refcount_struct *}’
static __always_inline void atomic_inc(atomic_t *v)
^~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:303: /home/rgadsdon/kernel/vmnet-only/bridge.o] Error 1
make[1]: *** [Makefile:1511: _module_/home/rgadsdon/kernel/vmnet-only] Error 2
make[1]: Leaving directory '/usr/src/linux-4.13-rc1'
make: *** [Makefile:120: vmnet.ko] Error 2
Robert Gadsdon.
rglinuxtech.com
Thanks for the fast response!
I have applied the patch, and can confirm that it fixes the problem, and VMware Workstation 12.5.7 now loads/runs OK, with Kernel 4.13-rc1.
Best regards,
Robert.
I get the patch file you provided but failed when i patch to installation file.
I did :papatch VMware-Workstation-Full-12.5.7-5813279.x86_64.bundle VMware-Workstation-12.5.7-kernel4.13-atomic-inc.patch
tch
output:
patching file VMware-Workstation-Full-12.5.7-5813279.x86_64.bundle
Hunk #1 FAILED at 636.
1 out of 1 hunk FAILED -- saving rejects to file VMware-Workstation-Full-12.5.7-5813279.x86_64.bundle.rej
Thanks for the patch Darius!
This is also required for Ubuntu 17.10 along with the need to manually build the modules (GCC 7.2.0 is unrecognised), plus the need to manually link libz to the system version [these could all do with addressing in a point release].
Edit: However, there's a problem. After I restarted the host and vmware workstation, I started a Windows VM which came up and I logged in. A few minutes later it froze with the following in the log:
2017-09-29T11:17:01.508+01:00| vcpu-0| I125: Balloon: Reset (n 1 pages 98704)
2017-09-29T11:17:01.513+01:00| vcpu-0| I125: Balloon: Reset: nUnlocked 98704 size 98704
2017-09-29T11:18:02.508+01:00| vcpu-0| I125: Balloon: Reset (n 2 pages 150496)
2017-09-29T11:18:02.513+01:00| vcpu-0| I125: Balloon: Reset: nUnlocked 150496 size 150496
2017-09-29T11:19:04.509+01:00| vcpu-0| I125: Balloon: Reset (n 3 pages 147456)
2017-09-29T11:19:04.515+01:00| vcpu-0| I125: Balloon: Reset: nUnlocked 147456 size 147456
2017-09-29T11:20:05.509+01:00| vcpu-0| I125: Balloon: Reset (n 4 pages 81920)
2017-09-29T11:20:05.515+01:00| vcpu-0| I125: Balloon: Reset: nUnlocked 81920 size 81920
2017-09-29T11:21:06.509+01:00| vcpu-0| I125: Balloon: Reset (n 5 pages 65536)
2017-09-29T11:21:06.514+01:00| vcpu-0| I125: Balloon: Reset: nUnlocked 65536 size 65536
2017-09-29T11:21:10.011+01:00| vmx| I125: DISKLIB-LIB : numIOs = 250000 numMergedIOs = 0 numSplitIOs = 0
2017-09-29T11:22:07.509+01:00| vcpu-0| I125: Balloon: Reset (n 6 pages 114688)
2017-09-29T11:22:07.518+01:00| vcpu-0| I125: Balloon: Reset: nUnlocked 114688 size 114688
2017-09-29T11:23:08.510+01:00| vcpu-0| I125: Balloon: Reset (n 7 pages 152576)
2017-09-29T11:23:08.519+01:00| vcpu-0| I125: Balloon: Reset: nUnlocked 152576 size 152576
2017-09-29T11:24:10.510+01:00| vcpu-0| I125: Balloon: Reset (n 8 pages 161280)
2017-09-29T11:24:10.521+01:00| vcpu-0| I125: Balloon: Reset: nUnlocked 161280 size 161280
2017-09-29T11:25:12.510+01:00| vcpu-0| I125: Balloon: Reset (n 9 pages 212480)
2017-09-29T11:25:12.522+01:00| vcpu-0| I125: Balloon: Reset: nUnlocked 212480 size 212480
2017-09-29T11:26:09.385+01:00| vmx| I125: GuestRpcSendTimedOut: message to toolbox-dnd timed out.
2017-09-29T11:26:09.385+01:00| vmx| I125: GuestRpcSendTimedOut: message to toolbox timed out.
2017-09-29T11:26:24.385+01:00| vmx| I125: GuestRpcSendTimedOut: message to toolbox-dnd timed out.
2017-09-29T11:26:24.385+01:00| vmx| I125: GuestRpc: app toolbox-dnd's second ping timeout; assuming app is down
2017-09-29T11:26:24.385+01:00| vmx| I125: GuestRpcSendTimedOut: message to toolbox timed out.
2017-09-29T11:26:24.385+01:00| vmx| I125: GuestRpc: app toolbox's second ping timeout; assuming app is down
2017-09-29T11:26:24.392+01:00| vmx| I125: GuestRpc: Reinitializing Channel 1(toolbox-dnd)
2017-09-29T11:26:24.392+01:00| vmx| I125: GuestMsg: Channel 1, Cannot unpost because the previous post is already completed
2017-09-29T11:26:24.392+01:00| vmx| I125: GuestRpc: Reinitializing Channel 0(toolbox)
2017-09-29T11:26:24.392+01:00| vmx| I125: GuestMsg: Channel 0, Cannot unpost because the previous post is already completed
2017-09-29T11:29:24.396+01:00| vmx| I125: GuestRpcSendTimedOut: message to toolbox timed out.
2017-09-29T11:29:24.396+01:00| vmx| I125: Vix: [4712 guestCommands.c:1937]: Error VIX_E_TOOLS_NOT_RUNNING in VMAutomationTranslateGuestRpcError(): VMwa
re Tools are not running in the guest
2017-09-29T11:29:47.553+01:00| vcpu-2| I125: Msg_Question:
2017-09-29T11:29:47.553+01:00| vcpu-2| I125: [msg.monitorInit.mem.lockFailed] The virtual machine is unable to reserve memory. If selecting _Retry does
not work, try closing programs on the host machine to free memory first.
2017-09-29T11:29:47.553+01:00| vcpu-2| I125+ For more information about this error, see "http://vmware.com/info?id=19".
2017-09-29T11:29:47.553+01:00| vcpu-2| I125: ----------------------------------------
The host system had over 5GiB memory (out of 16) free at the time.
I also have the same issue as pointed by RogerLeigh
After applying the patch, actually I did not apply the provided patch, rather I manually edited bridge.c
Since then I am getting "The virtual machine is unable to reserve memory." error.
Replacing vmmon-only/linux/hostif.c with the one from the above link fixed the memory issue.
Hi
On Fedora 26 kernel 4.13.4-200 I think I correctly replaced both bridge.c and hostif.c files for
I think I correctly replaced both bridge.c and hostif.c files for vmmon-only and vmnet-only folders where requireddid
did the sudo make then copied the 2 .ko files over to /lib/modules/4.13.40200.fc26.x86_64/misc/ folder and did
then copied the 2 .ko files over to /lib/modules/4.13.40200.fc26.x86_64/misc/ folder and did
and did sudo depmod -asudo
sudo modprobe vmmonsudo
sudo modprobe vmnet * i even rebooted *
but i am still getting the memory error when launching VM ( i have more than 20 some GB free memory on the system and reserve is set to 15 GB
Regards
Viktor
Edit: I use Vmware Professional 14
Hi
Would there be a patch for VMware-Workstation-Full-14.0.0-6661328.x86_64.bundle
Regards
Viktor
When I try this patch, I get Hunk #1 FAILED at 636.
Im using VMware-Workstation-Full-12.5.7-5813279.x86_64.bundle
This patch allows me to compile. Has been working well since Monday 09 Oct, but my Fedora kernel updated to "4.13.5-200.fc26.x86_64", and like others reporting, after a few mins of running, I get the error :
The virtual machine is unable to reserve memory. If selecting Retry does not work, try closing programs on the host machine to free memory first.
For more information about this error, see "http://vmware.com/info?id=19".
I was running Workstation 12 when got the error first, and upgraded to 14 hoping that would fix it but no ball
I tried replacing "hostif.c " with the version mentioned, but I'm still getting the error.
Hi,
I also applied the bridge.c patch (from the beginning of this post) and then copied the fixed hostif.c into my vmmon-only directory - and it did not fix the memory allocation issue.
Then I noticed that I got a compile error regarding an implicitly defined expression "global_zone_page_state"
Then I looked again into hostif.c and found that lines 102-104 should correctly read:
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
#define global_zone_page_state global_page_state
#endif
without any space between "#" and "define" in order to make it a correct C expression.
Now my vmware workstation 12.5.7 build-5813279 works again with kernel 4.13.5.
Hence the commit: vmmon: fix page accounting · mkubecek/vmware-host-modules@b50848c · GitHub
contained a small formal mistake that still needs to be corrected.
Hope this is helpful to you.
Regards
J
Thanks vmjohann - took me ages for some reason to get Workstation12 'working' again after upgrading to 14, but finally managed and it seems stable now with your fix... been up for at least an hour without crashing :smileygrin:
So, this is my new 'recompile' script. Lines in bold would need updating to your local files:
cat buildVMWareKernelModules.sh
#!/bin/bash
sudo mkdir /lib/modules/`uname -r`/misc
sudo rm -rf /usr/lib/vmware/modules/source/vmmon-only/
sudo rm -rf /usr/lib/vmware/modules/source/vmnet-only/
sudo tar -xvf /usr/lib/vmware/modules/source/vmmon.tar --directory /usr/lib/vmware/modules/source
sudo tar -xvf /usr/lib/vmware/modules/source/vmnet.tar --directory /usr/lib/vmware/modules/source
cd /usr/lib/vmware/modules/source/vmnet-only/
sudo patch < /home/rkpatel/vmwareScripts/VMware-Workstation-12.5.7-kernel4.13-atomic-inc.patch
sudo make
sudo cp -p vmnet.ko /lib/modules/`uname -r`/misc
cd /usr/lib/vmware/modules/source/vmmon-only/
#replace the hostif.c file with extra space with fixed version
sudo cp -p /home/rkpatel/vmwareScripts/hostif.c /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c
sudo make
sudo cp -p vmmon.ko /lib/modules/`uname -r`/misc
sudo depmod -a
Thanks a lot, It works perfectly well on Fedora 25 Kernel 4.13.16-100.fc25.x86_64
I can confirm this is still an issue. When I just updated my Ubuntu 16.04 instance it got vmlinuz-4.13.0-26-generic which has the above error running vmware workstation 12.5.9 build-7535481. I was able to fix using the change in the patch:
cd /usr/lib/vmware/modules/source
sudo tar xf vmnet.tar
sudo vim vmnet-only/bridge.c #Make the edit described in the patch given above. @darlusd
sudo mv vmnet.tar vmnet.tar.bak #backups are good...
sudo tar cf vmnet.tar vmnet-only/
#at this point I restarted vmware and let it rebuild the vmnet drivers, which worked with the above change in place.
sudo rm vmnet-only/ -fr
On my Ubuntu 16.04 (4.13.0-26) with Workstation 12.5.9 I had to patch both the bridge.c and the hostif.c files, because though patching bridge.c only was enough to compile and start VMware, but I also had the memory allocation error -> guests could not start.
So, the augmented complete list is:
cd /usr/lib/vmware/modules/source
sudo tar xf vmnet.tar
sudo vim vmnet-only/bridge.c #Make the edit described in the patch given above. @darlusd
sudo mv vmnet.tar vmnet.tar.bak #backups are good...
sudo tar cf vmnet.tar vmnet-only/
sudo rm vmnet-only/ -frsudo tar xf vmmon.tar
sudo cp /tmp/patched/hostif.c vmmon-only/linux/ #Download the above mentioned patched file
sudo mv vmmon.tar vmmon.tar.orig
sudo tar cf vmmon.tar vmmon-only/
#Start vmware, or if you have compiled the modules earlier, use:
sudo vmware-modconfig --console --install-all
#to recompile the modules
I too am getting the "failed to build vmnet" error.
Running Ubuntu 16.04
VMWare Workstation Pro 12 .5.9-7535481.
Forgive be but can somebody "for dummies" the fix?
Tried to run the patch but also got the "Hunk #1 FAILED at 636." error.
Trying to get VMWare Player to install on Linux Mint 18.3 using kernel 4.13.0-26 with no success. I've run through all of the steps above in zsoltm's "augmented complete list", including patching bridge.c and hostif.c as well as compiling from vmware-modconfig. I'm getting "unable to install all modules" at the end of the compile. Vmmon and vmnet# are missing from /dev so while the Player interface loads and shows the VM list, the VMs will not start and I get a "could not open /dev/vmmon..." error message. Any ideas? Grateful for any assistance...
How do you apply the path?
Thanks for the help!
I actually never resolved the issue with VMPlayer 12.5.x. I gave up and uninstalled it, downloaded version 14.1.1 and installed that. Other than a few minor initial hickups it works without issue.