VMware Player on Debian

For various reasons, having vmware running on my desktop would be kind of useful.  VMware provide a Free (as in beer) version of their software called VMware Player. I downloaded the file VMware-Player-4.0.2-591240.x86_64.bundle off their website and tried to build it.

It failed to build. Given my previous lack of success with VMware server, I wasn’t too surprised.  What was surprising was it wasn’t too hard to fix it.  The problem was that the vmnet module would not compile and that was due to three things:

  • net device ops no longer has set_multicast_list (in netif.c)
  • the linux module header needs to be included to define THIS_MODULE
  • skb_frag_t has been redefined and needs an adjustment

The patch is only a few lines and means I can compile vmware on my Debian sid computer running kernel 3.2.0-1

vmnet.patch

To use it, you will need to find where the modules are built, for me it is /usr/lib/vmware/modules/source

  1. mv vmnet.tar vmnet2.tar
  2. tar xf vmnet2.tar
  3. patch -p0 < vmnet.patch
  4. tar cf vmnet.tar vmnet-only

With that you can run the player which will try to build the modules and you’re done!

 

 

Enhanced by Zemanta

Comments

12 responses to “VMware Player on Debian”

  1. Ben Hutchings Avatar
    Ben Hutchings

    Your patch breaks multicast and promiscuous mode.
    You need to s/ndo_set_multicast_list/ndo_set_rx_mode/.

    1. Craig Avatar
      Craig

      ndo_set_multicast_list is assigned to VmNetifSetMulticast() is an empty function. So I think for this specific case, we’re safe. I’ve seen other examples of similiar code and they removed the function like what I did too.

      But perhaps we (those that have done it that way) are all collectively doing the wrong thing too!

  2. Kai Hendry Avatar

    As a long time VMware user who has recently switched to Virtualbox, I suggest you do the same. 🙂

    1. Craig Avatar
      Craig

      Ooh, care to explain why? I’m not challenging your suggestion just curious about the reasons behind that; besides not having to do evil patches like my blog entry describes.

  3. Scott Busby Avatar
    Scott Busby

    Worked perfect on my Debian Testing system!
    Linux kernel 3.2.0-1-686-pae

    Thanks for the patch.

    Scott

  4. re7erse Avatar
    re7erse

    did not work for me:

    /usr/lib/vmware/modules/source# patch -p1 < vmnet.patch
    can’t find file to patch at input line 4
    Perhaps you used the wrong -p or –strip option?

    The text leading up to this was:

    |diff -u vmnet-only.orig/filter.c vmnet-only/filter.c
    |— vmnet-only.orig/filter.c 2012-01-19 09:22:02.000000000 +1100

    |+++ vmnet-only/filter.c 2012-02-16 21:03:24.000000000 +1100

    File to patch:

    1. Craig Avatar
      Craig

      As the error message says, you used (and I told everyone) the wrong -p option.
      The correct command is patch -p0 < vmnet.patch so just change the “1” for “0” and you should be right to go.

  5. mr_me Avatar

    works perfect! thanks 🙂

  6. brett h Avatar
    brett h

    these are the reasons i quit VMWare for VirtualBox a few years ago…. only problem is it’s very difficult to get a laptop to share USB devices with the vm, particularly a wireless Alfa card running on a Mac. ill send you a driver once i figure out how to build it!

  7. Agustin Vazquez Avatar
    Agustin Vazquez

    Tanks a lot i had the same problem and i’ven fixed all becaouse of you.

    1. Craig Avatar
      Craig

      Glad that it worked out for you! I got a little of the way forward by reading other blogs so figured it might help others; or me when I need to do it again and forget what I did.

Leave a Reply

Your email address will not be published. Required fields are marked *