06 June 2008

VMWare 6 & Hardy Heron

If you're like me, and you use Ubuntu at the office, you may have run into issues with VMWare Workstation not working on Hardy Heron. One coworker suggested the any-any patch, which is supposed to let VMWare work on newer kernels. It doesn't help. The actual fix for it is quite simple (but also quite WTF). Edit /usr/src/linux-headers-`uname -r`/include/asm/bitops_32.h (yeah, this is for 32bit Ubuntu—let me know if 64bit works to begin with and if editing _64 the same way fixes it if not). Open it up with gksu gedit /usr/src/linux-headers-`uname -r`/include/asm/bitops_32.h or kdesu kate /usr/src/linux-headers-`uname -r`/include/asm/bitops_32.h or sudo vim /usr/src/linux-headers-`uname -r`/include/asm/bitops_32.h. Change this line (line 9):

#error only can be included directly
to this:
//#error only can be included directly

OK, before anyone freaks out about commenting out chunks of the kernel, it's really more of a warning than an error, and the error is one for the VMWare developers to worry about, not you. It's saying that, stylistically, they should be looking at the architecture-independent bitops.h. VMWare devs decided to go with the architecture-dependent one. Maybe they had a good reason; I don't know. Either way, it's their problem that they've now made your problem in a code tree which you can't edit to work, so the changes have to be made kernel-side. And yes, every time you get a kernel update, you have to do this again before the VMWare kernel modules will compile.

NOTE: I didn't find this. Steve Hall found it when he decided he wasn't leaving the office until he figured out why Ubuntu and VMWare wouldn't play nice and then made them play nice anyway.


8 comments:

Krunoslav Husak said...

Actually, the better way is to modify vmware's module header, vcpuset.h located in vmware-distrib/lib/modules/source/vmmon.tar

There is 1 line that needs to be modified in that file:
#include "asm/bitops.h"
to
#include "linux/bitops.h"

Or, use small patch I wrote for doing this: http://h00s.net/vmware-workst-6-patch.tar.gz

Patch should be run from vmware-distrib directory

That's it :)

Eric said...

I installed VMWare Workstation 6.0.4 on 8.04 LTS and it works. 6.0.4 was released on 5/29/2008.

cquilliam said...

Yesterday I attempted to install the latest version of VMware in Kubuntu 8.04 64-bit, and the first time install worked, but, whenever I went to run the VM, it failed due to 'Operation not permitted' with vmcpu0. I didn't have kvm, or any other virtual machine drivers loaded, and I tried it as user and root. I then noticed that there were kernel updates (-18 i believe), and after installing that, and re-installing VMware, everything worked fine.

So yes, it does work in 64bit without messing with kernel stuff other than getting updates.

John said...

I have found the any-any patch does work, but you have to make sure workstation is completely uninstalled before running it. the "runme.pl" has to be the only thing that has executed the "vmware-config.pl".

Robert said...

ummm so Linux is the VMWARE HOST ?

thanks for not being specific

Mackenzie said...

I thought saying "not working on Hardy Heron" rather than "Hardy Heron not working in VMWare" along with the fact that I'm talking about how to install VMWare made that fairly obvious.

But technically, I have Linux hosts and guests. What other OS would I use?

test said...

Hardware: 64bit AMD laptop

OS: Ubuntu Hardy 2.6.24-19-generic #1 SMP Fri Jul 11 21:01:46 UTC 2008 x86_64 GNU/Linux

VMWare WS pkg: VMware-workstation-6.0.4-93057.x86_64

Works right outta' the box for me. The only hitch seems to be that when the install script asks for you to configure the network, say "no" or you will never get the console to come up after install. Weird, huh?

Mackenzie said...

Yeah, I was recently told that 6.0.4 has it fixed.