12 Replies Latest reply on Oct 13, 2017 7:44 AM by rpatel

    Linux Host:  Kernel 4.13-rc1 Breaks vmnet..

    rgadsdon Novice

      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

        • 1. Re: Linux Host:  Kernel 4.13-rc1 Breaks vmnet..
          dariusd Virtuoso
          VMware EmployeesUser Moderators

          Thanks for reporting this.  Please try with the attached patch.

           

          Cheers,

          --

          Darius

          3 people found this helpful
          • 2. Re: Linux Host:  Kernel 4.13-rc1 Breaks vmnet..
            rgadsdon Novice

            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.

            • 3. Re: Linux Host:  Kernel 4.13-rc1 Breaks vmnet..
              moon_yon Lurker

              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

               

              • 4. Re: Linux Host:  Kernel 4.13-rc1 Breaks vmnet..
                RogerLeigh Novice

                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.

                • 5. Re: Linux Host:  Kernel 4.13-rc1 Breaks vmnet..
                  leo_olympian Lurker

                  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.

                  • 7. Re: Linux Host:  Kernel 4.13-rc1 Breaks vmnet..
                    viktormadarasz Novice

                    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

                    • 8. Re: Linux Host:  Kernel 4.13-rc1 Breaks vmnet..
                      viktormadarasz Novice

                      Hi

                       

                      Would there be a patch for VMware-Workstation-Full-14.0.0-6661328.x86_64.bundle

                       

                      Regards

                       

                      Viktor

                      • 9. Re: Linux Host:  Kernel 4.13-rc1 Breaks vmnet..
                        IndyGeek Novice

                        When I try this patch, I get Hunk #1 FAILED at 636.

                         

                        Im using VMware-Workstation-Full-12.5.7-5813279.x86_64.bundle

                        • 10. Re: Linux Host:  Kernel 4.13-rc1 Breaks vmnet..
                          rpatel Lurker

                          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.

                          • 11. Re: Linux Host:  Kernel 4.13-rc1 Breaks vmnet..
                            vmjohann Novice

                            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

                            1 person found this helpful
                            • 12. Re: Linux Host:  Kernel 4.13-rc1 Breaks vmnet..
                              rpatel Lurker

                              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

                               

                              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