kensmithkensmit
Contributor
Contributor

VMware Workstation 8.0.2 build-591240 on Fedora 16, 64-bit

I couldn't get VMware Workstation to run because it couldn't install its modules. I am running Fedora 16 with uname -a as

Linux zinfandel 3.2.5-3.fc16.x86_64 #1 SMP Thu Feb 9 01:24:38 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

The compiler is GCC 4.6.2. The issues pertained to the vmnet module. I don't remember the actual error messages but here are instructions and a patch that gets this all to build and run. Go in to /usr/lib/vmware/modules/source and do these things. You may have to give your user permissions to the directory or be root.

mkdir untar

cd untar

tar xvf ../vmnet.tar

patch -p 1 < ~/vmware.patch

tar cvf vmnet.tar vmnet-only

cd ..

mv vmnet.tar vmnet.tar.orig

ln -s untar/vmnet.tar .

Here are the contents of vmware.patch, everything excluding this line and up to but not including the EOF.

diff -uNr orig/vmnet-only/filter.c untar/vmnet-only/filter.c
--- orig/vmnet-only/filter.c    2012-01-18 14:22:02.000000000 -0800
+++ untar/vmnet-only/filter.c   2012-02-13 08:59:55.609777000 -0800
@@ -26,6 +26,7 @@
#include "compat_skbuff.h"
#include <linux/mutex.h>
#include <linux/netdevice.h>
+#include <linux/module.h>
/*
  * All this makes sense only if NETFILTER support is configured in our kernel.
  */
diff -uNr orig/vmnet-only/netif.c untar/vmnet-only/netif.c
--- orig/vmnet-only/netif.c     2012-01-18 14:22:02.000000000 -0800
+++ untar/vmnet-only/netif.c    2012-02-10 17:52:11.041543511 -0800
@@ -131,7 +131,9 @@
       .ndo_stop = VNetNetifClose,
       .ndo_get_stats = VNetNetifGetStats,
       .ndo_set_mac_address = VNetNetifSetMAC,
+#if 0
       .ndo_set_multicast_list = VNetNetifSetMulticast,
+#endif
       /*
        * We cannot stuck... If someone will report problems under
        * low memory conditions or some such, we should enable it.
diff -uNr orig/vmnet-only/userif.c untar/vmnet-only/userif.c
--- orig/vmnet-only/userif.c    2012-01-18 14:22:02.000000000 -0800
+++ untar/vmnet-only/userif.c   2012-02-13 08:59:09.263104556 -0800
@@ -36,6 +36,7 @@
#include <linux/slab.h>
#include <linux/version.h>
#include <linux/wait.h>
+#include <linux/module.h>

#include <net/checksum.h>
#include <net/sock.h>
@@ -517,10 +518,10 @@
         unsigned int tmpCsum;
         const void *vaddr;

-        vaddr = kmap(frag->page);
+        vaddr = kmap((struct page *)&(frag->page));
         tmpCsum = csum_and_copy_to_user(vaddr + frag->page_offset,
                                         curr, frag->size, 0, &err);
-        kunmap(frag->page);
+        kunmap((struct page *)&(frag->page));
         if (err) {
            return err;
         }

EOF

VMware Workstation is running for me but of course the usual caveats apply.

   Kindly,

   Ken

0 Kudos
5 Replies
kensmithkensmit
Contributor
Contributor

Maybe I spoke too soon. I can run Workstation but once I installed Windows 7 x64, it shows the ethernet cable as unplugged. Any thoughts on why? Running ifconfig on the localhost shows a vmnet interface.

vmnet1    Link encap:Ethernet  HWaddr 00:50:56:C0:00:01 
          inet addr:192.168.124.1  Bcast:192.168.124.255  Mask:255.255.255.0
          inet6 addr: fe80::250:56ff:fec0:1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:25 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

   ks

0 Kudos
kensmithkensmit
Contributor
Contributor

More info from the log file, vmware.log.

2012-02-13T10:16:36.164-08:00| vmx| I120: VNET: ethernet0 enable link state propagation, lsp.state = 5
2012-02-13T10:16:36.164-08:00| vmx| I120: VNET: MACVNetPortOpenDevice: Ethernet0: can't open vmnet device (No such file or directory)
2012-02-13T10:16:36.164-08:00| vmx| I120: VNET: MACVNetPort_Connect: Ethernet0: can't open data fd
2012-02-13T10:16:36.164-08:00| vmx| I120: TOOLS received request in VMX to set option 'synctime' -> '0'
2012-02-13T10:16:36.218-08:00| vmx| I120: Msg_Post: Error
2012-02-13T10:16:36.218-08:00| vmx| I120: [msg.vnet.connectvnet] Could not connect Ethernet0 to virtual network "/dev/vmnet8". More information can be found in the vmware.log file.
2012-02-13T10:16:36.218-08:00| vmx| I120: [msg.device.badconnect] Failed to connect virtual device Ethernet0.

0 Kudos
kensmithkensmit
Contributor
Contributor

Changed to bridged networking from NAT and I'm good to go. Problem solved but would love to hear why I might have had difficulty with NAT.

0 Kudos
RDPetruska
Leadership
Leadership

Can't answer exactly why, but you didn't have a VMnet8 virtual adapter, which is the one used for NAT networking.

0 Kudos
pzi123
Contributor
Contributor

for 8.0.3 the patch needs adjustment. I applied original patch by hand and created new patch. Here is the process to apply it. After that restart vmware client and the new vmnet module will be built:

cd /usr/lib/vmware/modules/source
mkdir vmnet
cd vmnet
tar xvf ../vmnet.tar

cat <<'EOF' > vmnet.patch
diff -rcN orig/vmnet-only/filter.c vmnet/vmnet-only/filter.c
*** orig/vmnet-only/filter.c    Mon Apr 30 21:27:16 2012
--- vmnet/vmnet-only/filter.c   Sat May  5 18:11:01 2012
***************
*** 26,31 ****
--- 26,32 ----
  #include "compat_skbuff.h"
  #include <linux/mutex.h>
  #include <linux/netdevice.h>
+ #include <linux/module.h>
  /*
   * All this makes sense only if NETFILTER support is configured in our kernel.
   */
diff -rcN orig/vmnet-only/netif.c vmnet/vmnet-only/netif.c
*** orig/vmnet-only/netif.c     Mon Apr 30 21:27:16 2012
--- vmnet/vmnet-only/netif.c    Sat May  5 19:51:53 2012
***************
*** 131,142 ****
        .ndo_stop = VNetNetifClose,
        .ndo_get_stats = VNetNetifGetStats,
        .ndo_set_mac_address = VNetNetifSetMAC,
        .ndo_set_multicast_list = VNetNetifSetMulticast,
        /*
         * We cannot stuck... If someone will report problems under
         * low memory conditions or some such, we should enable it.
         */
- #if 0
        .ndo_tx_timeout = VNetNetifTxTimeout,
  #endif
     };
--- 131,142 ----
        .ndo_stop = VNetNetifClose,
        .ndo_get_stats = VNetNetifGetStats,
        .ndo_set_mac_address = VNetNetifSetMAC,
+ #if 0
        .ndo_set_multicast_list = VNetNetifSetMulticast,
        /*
         * We cannot stuck... If someone will report problems under
         * low memory conditions or some such, we should enable it.
         */
        .ndo_tx_timeout = VNetNetifTxTimeout,
  #endif
     };
diff -rcN orig/vmnet-only/userif.c vmnet/vmnet-only/userif.c
*** orig/vmnet-only/userif.c    Mon Apr 30 21:27:16 2012
--- vmnet/vmnet-only/userif.c   Sat May  5 18:14:14 2012
***************
*** 36,41 ****
--- 36,42 ----
  #include <linux/slab.h>
  #include <linux/version.h>
  #include <linux/wait.h>
+ #include <linux/module.h>

  #include <net/checksum.h>
  #include <net/sock.h>
***************
*** 517,526 ****
         unsigned int tmpCsum;
         const void *vaddr;

!        vaddr = kmap(frag->page);
         tmpCsum = csum_and_copy_to_user(vaddr + frag->page_offset,
                                         curr, frag->size, 0, &err);
!        kunmap(frag->page);
         if (err) {
            return err;
         }
--- 518,527 ----
         unsigned int tmpCsum;
         const void *vaddr;

!        vaddr = kmap((struct page *)&(frag->page));
         tmpCsum = csum_and_copy_to_user(vaddr + frag->page_offset,
                                         curr, frag->size, 0, &err);
!        kunmap((struct page *)&(frag->page));
         if (err) {
            return err;
         }
EOF



patch -p 1 < vmnet.patch

tar cvf vmnet.tar vmnet-only
cd ..
mv vmnet.tar vmnet.tar.orig
mv vmnet/vmnet.tar .

0 Kudos