6 Replies Latest reply on May 28, 2011 9:12 PM by bloommax

    Request: Add DKMS support to Linux VMware products and vmware tools

    jragle Novice

      Hello again VMware and Community,

       

      I would like to start an official thread to request that VMware add support for DKMS to its Linux products. (Please sign/post if you agree with me here.)

       

      If you know what I'm talking about here, good for you. Kudos even!  If not and you deal with Linux as much as I do, please read on.

       

       

      Educational Section on DKMS:[/u]

      "[i]DKMS (Dynamic Kernel Module Support) is a framework where device driver source can reside outside the kernel source tree so that it is very easy to rebuild modules as you upgrade kernels. This allows Linux vendors to provide driver drops without having to wait for new kernel releases (as a stopgap before the code can make it back into the kernel), while also taking out the guesswork for customers attempting to recompile modules for new kernels. For veteran Linux users it also provides some advantages since a separate framework for driver drops will remove kernel releases as a blocking mechanism for distributing code.[/i]"

      (Source: http://linux.dell.com/projects.shtml)

       

      A simplified explanation:[/u]

      Effectively, think of this as a parallel to maintaining your drivers along the lines on how video card drivers are maintained on Windows systems. It is completely separate from the OS updates, for the most part. Mostly regarding the fact, you don't have to re-install your video drivers between Windows updates, right? (Using DKMS to manage your Nvidia drivers works like a dream under linux btw.)

       

      Specifically this request is targetting the vmware kernel modules that get loaded both on VMs/Guests via VMware Tools(vmware-config-tools.pl[/i]) and on systems running Workstation (via vmware-config.pl[/i]).

       

      The major benefit:[/u]

       

      System Administrators/Users would no longer need to reconfigure VMware (either vmware-config.pl or vmware-config-tools.pl) by hand between kernel updates as long as you have the kernel source and compilers pre-installed. Everything would be automatic.

       

      Thanks for your time.

       

      It would be great if a VMware representative could respond on the technical or business limitations of this request if it is deemed unreasonable or improbable.

       

      -Jamin Ragle

      VCP, System Administrator

        • 1. Re: Request: Add DKMS support to Linux VMware products and vmware tools
          bertdb Master

          This request becomes more interesting now that the VMware tools are largely open source.

          http://open-vm-tools.sourceforge.net/

           

          dkms support would greatly enhance the VMware virtualisation experience of Linux users.

          • 2. Re: Request: Add DKMS support to Linux VMware products and vmware tools
            c_g-hills Enthusiast

            I would like to voice my support for this also. It would make updating kernels a lot simpler on guests.

            • 3. Re: Request: Add DKMS support to Linux VMware products and vmware tools
              nerijusb Novice

              It's for vmware as server modules (not for vmware modules in guest machines):

              Install dkms (for example, yum install dkms).

              Copy /usr/lib/vmware/modules/source/vmmon.tar and vmnet.tar to /usr/src/vmware-1

              Create a file /usr/src/vmware-1/dkms.conf:

               

              PACKAGE_VERSION="1"

               

              PACKAGE_NAME="vmware-modules"

              MAKE[0]="make -C vmmon-only .PHONY && make -C vmnet-only .PHONY"

              CLEAN="make -C vmmon-only clean && make -C vmnet-only clean"

               

              BUILT_MODULE_NAME[0]="vmmon"

              BUILT_MODULE_LOCATION[0]="vmmon-only"

              BUILT_MODULE_NAME[1]="vmnet"

              BUILT_MODULE_LOCATION[1]="vmnet-only"

              DEST_MODULE_LOCATION[0]="/extra/"

              DEST_MODULE_LOCATION[1]="/extra/"

               

              AUTOINSTALL="yes"

               

              Run "dkms add -m vmware -v 1", then "service dkms_autoinstaller start"

              It will install vmmon.ko and vmnet.ko to /lib/modules/<kernel-version>/extra

              Because dkms can only install into kernel, updates or extra, we need to patch /etc/rc.d/init.d/vmware.

              Apply the following diff:

              --- vmware.orig 2007-12-28 15:18:30.000000000 +0200

              +++ vmware      2008-01-09 01:32:25.000000000 +0200

              @@ -575,7 +575,7 @@

              }

               

              vmware_load_module() {

              -   /sbin/insmod -s -f "/lib/modules/`uname -r`/misc/$1.o" || exit 1

              +   /sbin/insmod -s -f "/lib/modules/`uname -r`/extra/$1.ko" || exit 1

                  exit 0

              }

               

              I tested this with vmware-workstation 5.5, will test with server soon.

              • 4. Re: Request: Add DKMS support to Linux VMware products and vmware tools
                nerijusb Novice

                Copy /usr/lib/vmware/modules/source/vmmon.tar and vmnet.tar to /usr/src/vmware-1

                A correction - not copy, but extract, so that you have vmmon-only and vmnet-only directories in /usr/src/vmware-1

                (for vmware server there are 2 additional directories - vmci-only and vsock-only).

                 

                Also please make sure dkms_autoinstaller service starts earlier than vmware.

                 

                This setup works with VMware-server 2 beta. /usr/src/vmware-1/dkms.conf for it:

                 

                PACKAGE_VERSION="1"

                 

                PACKAGE_NAME="vmware-modules"

                MAKE[0]="make -C vmci-only .PHONY && make -C vmmon-only .PHONY && make -C vmnet-only .PHONY && make -C vsock-only .PHONY"

                CLEAN="make -C vmci-only clean && make -C vmmon-only clean && make -C vmnet-only clean && make -C vsock-only clean"

                 

                BUILT_MODULE_NAME[0]="vmci"

                BUILT_MODULE_LOCATION[0]="vmci-only"

                BUILT_MODULE_NAME[1]="vmmon"

                BUILT_MODULE_LOCATION[1]="vmmon-only"

                BUILT_MODULE_NAME[2]="vmnet"

                BUILT_MODULE_LOCATION[2]="vmnet-only"

                BUILT_MODULE_NAME[3]="vsock"

                BUILT_MODULE_LOCATION[3]="vsock-only"

                DEST_MODULE_LOCATION[0]="/extra/"

                DEST_MODULE_LOCATION[1]="/extra/"

                DEST_MODULE_LOCATION[2]="/extra/"

                DEST_MODULE_LOCATION[3]="/extra/"

                 

                AUTOINSTALL="yes"

                • 5. Re: Request: Add DKMS support to Linux VMware products and vmware tools
                  nerijusb Novice

                  It should work for vmware modules in guest machines too, with modifications to dkms.conf of course.

                  • 6. Re: Request: Add DKMS support to Linux VMware products and vmware tools
                    bloommax Lurker

                    Below is a working dkms.conf for host kernel module installation of VMware Workstation 7.1.4. Module.symvers support was added for building vsock. An installation package with post-install/remove patch for vmware init script was attached.

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

                    # /usr/src/vmware-7.1.4/dkms.conf

                     

                    PACKAGE_NAME="vmware-modules"
                    PACKAGE_VERSION="7.1.4"
                    MAKE[0]="make -C vmmon-only .PHONY && make -C vmnet-only .PHONY && make -C vmblock-only .PHONY && make -C vmci-only .PHONY && cp vmci-only/Module.symvers vsock-only && make -C vsock-only .PHONY"
                    CLEAN="make -C vmmon-only clean && make -C vmnet-only clean && make -C vmblock-only clean && make -C vmci-only clean && make -C vsock-only clean"
                    BUILT_MODULE_NAME[0]="vmmon"
                    BUILT_MODULE_LOCATION[0]="vmmon-only"
                    BUILT_MODULE_NAME[1]="vmnet"
                    BUILT_MODULE_LOCATION[1]="vmnet-only"
                    BUILT_MODULE_NAME[2]="vmblock"
                    BUILT_MODULE_LOCATION[2]="vmblock-only"
                    BUILT_MODULE_NAME[3]="vmci"
                    BUILT_MODULE_LOCATION[3]="vmci-only"
                    BUILT_MODULE_NAME[4]="vsock"
                    BUILT_MODULE_LOCATION[4]="vsock-only"
                    DEST_MODULE_LOCATION[0]="/extra"
                    DEST_MODULE_LOCATION[1]="/extra"
                    DEST_MODULE_LOCATION[2]="/extra"
                    DEST_MODULE_LOCATION[3]="/extra"
                    DEST_MODULE_LOCATION[4]="/extra"
                    POST_INSTALL="patch_vmware.sh"
                    POST_REMOVE="patch_vmware.sh -R"
                    AUTOINSTALL="yes"