VMware VMCIDatagram_CreateHnd undefined

Today I tried to install VMware Server 2.0.1 on my Ubuntu 9.04 (64bit) box. It some kind of worked but I was constantly presented with the following error when compiling the vsock kernel module:

WARNING: "VMCIDatagram_CreateHnd" [/tmp/vmware-config11/vsock-only/vsock.ko] undefined!
WARNING: "VMCIDatagram_DestroyHnd" [/tmp/vmware-config11/vsock-only/vsock.ko] undefined!
WARNING: "VMCI_GetContextID" [/tmp/vmware-config11/vsock-only/vsock.ko] undefined!
WARNING: "VMCIDatagram_Send" [/tmp/vmware-config11/vsock-only/vsock.ko] undefined! 

Unsurprisingly, the module wouldn’t load into the kernel which in turn resulted in sluggish response from the server console. After a bit of research (Google to the rescue ;)) I found that this fix still did the trick. If you don’t want to register with Ubuntuforums, here’s the patch:

{openx:6}

--- /usr/bin/vmware-config.pl.orig      2008-11-28 12:06:35.641054086 +0100
+++ /usr/bin/vmware-config.pl   2008-11-28 12:30:38.593304082 +0100
@@ -4121,6 +4121,11 @@
     return 'no';
   }
 
+  if ($name eq 'vsock') {
+    print wrap("VMWare config patch VSOCK!\n");
+    system(shell_string($gHelper{'mv'}) . ' -vi ' . shell_string($build_dir . '/../Module.symvers') . ' ' . shell_string($build_dir . '/vsock-only/' ));
+  }
+
   print wrap('Building the ' . $name . ' module.' . "\n\n", 0);
   if (system(shell_string($gHelper{'make'}) . ' -C '
              . shell_string($build_dir . '/' . $name . '-only')
@@ -4143,6 +4148,10 @@
     if (try_module($name, $build_dir . '/' . $name . '.o', 0, 1)) {
       print wrap('The ' . $name . ' module loads perfectly into the running kernel.'
                  . "\n\n", 0);
+      if ($name eq 'vmci') {
+       print wrap("VMWare config patch VMCI!\n");
+       system(shell_string($gHelper{'cp'}) . ' -vi ' . shell_string($build_dir.'/vmci-only/Module.symvers') . ' ' . shell_string($build_dir . '/../'));
+      } 
       remove_tmp_dir($build_dir);
       return 'yes';
     }

Copy and paste into a new file called vmware-server.patch. Next change to /usr/bin and apply with

patch -p0 < /path/to/vmware-server.patch

. If all went well, you should now run

/usr/bin/vmware-tools.pl

to reinstall VMware Server.

I’m really surprised that a fix as old as this didn’t make it into the later releases of VMware Server.