# HELP - vmware needs kernel headers - SOLVED

## Moriah

I have been running vmware workstation (purchased version) 7.x under gentoo amd64 2.6.37-gentoo-r4, but today I updated the kernel to 3.7.10-gentoo, and now vmware will not start.  It complains that it needs to compile several modules and load them into the running kernel, but it cannot find the kernel headers for 3.7.10-gentoo.  Where should I tell it that they are located?

----------

## krinn

there  :Smile: 

sys-kernel/linux-headers

go get the 3.7 ones

----------

## NeddySeagoon

Moriah,

vmware should build its kernel modules against the kernel headers in the kernel tree.

They have to load into that exact kernel.

There have been problems with out of kernel modules building against kernel 3.7.0 and newer as there has been some moving/renaming of files in the tree.

The solution in to use updated vmware modules.

For an example, have a look at the nvidia-drivers threads

----------

## Moriah

I have the 3.7 kernel headers, but vmware does not recognize them.

Can I go back to an earlier kernel to avoid those problems?  Stupid vmware no longer supports gentoo as a host platform.  They will just tell me to run vmware on a supported version of linux,    :Evil or Very Mad: 

What is the newest kernel version that does not have this compatibility problem?  I upgraded my kernel to be compatible with the udev changes.  I was running 2.6.37-gentoo-r4 before the upgrade to 3.7.10-gentoo.

I have become dependent upon vmware workstation to support various development environments, and for disposable operating system environments for testing and such.  Is there a viable alternative that has the snapshotting and cloning capability of vmware workstation?  I would like to use an open source alternative if it is stable enough.

----------

## krinn

I would say, latest support kernel could be find by checking supported OS versions and kernel version they use.

----------

## aCOSwt

 *Moriah wrote:*   

> What is the newest kernel version that does not have this compatibility problem?

 

I think it's 3.6

But, as you do not appear to upgrade frequently, I would recommend to prefer the LTS 3.4 branch.

----------

## Moriah

I do not upgrade my kernel very frequently, but I keep everything else updated on a weekly basis.  I upgrade the kernel when necessary because of security or compatibility reasons.

What is the LTS 3.4 branch?

----------

## Anon-E-moose

 *Moriah wrote:*   

> What is the LTS 3.4 branch?

 

LTS = Long Term Stable  :Smile: 

----------

## aCOSwt

 *Moriah wrote:*   

> What is the LTS 3.4 branch?

 

At the time of this post... and assuming you want to stay with the gentoo-sources :

```
emerge --noreplace =gentoo-sources-3.4.39
```

----------

## krinn

 *Anon-E-moose wrote:*   

>  *Moriah wrote:*   What is the LTS 3.4 branch? 
> 
> LTS = Long Term Stable 

 

LTS = Long Term Support

 :Very Happy: 

----------

## pluppets

First post!   :Wink: 

Given that Gentoo has contributed so many lines to linux at large, and taught me so much.....I just couldn't sit on my hands.

Anyway,  hope this helps ...posted from my phone, so forgive any borkery. :3

```
ln -s /usr/src/3.7.10-gentoo/include/generated/uapi/linux/version.h \

/usr/src/3.7.10-gentoo/include/linux/version.h
```

----------

## Moriah

```

gehazi ~ # ls -l /usr/src/3.7.10-gentoo/include/linux/version.h

ls: cannot access /usr/src/3.7.10-gentoo/include/linux/version.h: No such file or directory

gehazi ~ # ls -l /usr/src/3.7.10-gentoo/include/generated/uapi/linux/version.h

ls: cannot access /usr/src/3.7.10-gentoo/include/generated/uapi/linux/version.h: No such file or directory

gehazi ~ # 

```

So what's the point?

----------

## Moriah

Switching to the gentoo-sources-3.4.39 kernel did not solve my problem.  

I have been running vmware installed from VMware-Workstation-Full-7.1.4-385536.x86_64.bundle for a couple of years now.  I tried to upgrade to VMware-Workstation-Full-8.0.4-744019.x86_64.bundle last summer, but it refused to install.  When I contacted vmware for help, as I paid for installation support, they tried and failed too, so they upgraded me again to VMware-Workstation-Full-9.0.0-812388.x86_64.bundle, but that did not install either, so they just said I would have to switch to a supported distribution if I wanted further support.  So I ended up paying for an upgrade with support that I could not use.    :Evil or Very Mad: 

I dropped back to VMware-Workstation-Full-7.1.4-385536.x86_64.bundle with the 2.6.37-gentoo-r4 kernel, and have been running that until last week, when I upgraded my kernel to 3.7.10-gentoo to be compatible with the udev upgrade.

Now I'm stuck in a bad situation.    :Evil or Very Mad: 

I either have to drop back to the 2.6.37-gentoo-r4 kernel and run vmware-Workstation-Full-7.1.4, and give up support for the udev upgrade, which sounds like it would quickly become a major gentoo nightmare, or run with 3.4.39-gentoo and modern udev, but give up vmware support.

YIKES!!!   :Surprised: 

Which would you prefer, to have your arms cut off, or your legs?    :Mad: 

Is there any gentoo supported open sourced virtual machine capability I can switch to instead of running vmware?    :Question: 

----------

## pluppets

The point?  Mine works.

I figured you could find the file yourself.

I was only trying to help.   :Evil or Very Mad: 

```

$ locate version.h

$ sudo ln -s /usr/src/linux-3.7.10-gentoo/include/generated/uapi/linux/version.h /usr/src/linux-3.7.10-gentoo/include/linux/version.h

```

----------

## aCOSwt

 *pluppets wrote:*   

> The point?  Mine works.

 

Maybe it would, but when building portage's vmware modules only.

The OP is running a purchased version.

Well then, Moriah, if you not longer get supported, and before choosing what to cut, what about keeping your 3.4 but opting for an install of latest vmware-* from portage ?

----------

## NeddySeagoon

Moriah,

Kernel Virtual Machines (KVMs) work and VirtualBox (VBox) works.

I have heard horror stories about Windows in KVM, with regards the install time but I've never done it.

I do run Gentoo Hardened in several KVMs running on Gentoo hardened.

I run assorted other stuff in VBox. I do know it won't install Red Hat 6.1, which is what I started with and I still need to try Windows 3.1, just for old times sake.

I gave up on VMware when vmware-server-2 was left behind by the kernel.

----------

## Moriah

I am looking into KVM, but one major need is to run various windoze operating systems to support clients.    :Sad: 

I guess I could also try the portage version of vmware.  If I am lucky, my present collection of vm's will load into it and run.    :Twisted Evil: 

I would prefer to go open source, so kvm will be the first attempt.  

I still have a bootable disk with my old configuration on it, so I can still do what I used to do if I need to.  Nice thing about my Lenovo W500 is that I can swap the boot disk in less than a minute with no tools except my bare hands.    :Cool: 

----------

## pluppets

 *aCOSwt wrote:*   

>  *pluppets wrote:*   The point?  Mine works. 
> 
> Maybe it would, but when building portage's vmware modules only.
> 
> The OP is running a purchased version.
> ...

 

It worked for me with VMware Workstation 9 x64 bundle installer.

I'm still having issues, but it launches and I can debug it at least. :3

----------

## Moriah

pluppets:  Sory if I sounded like I had an attitude; I just did not see either of the filenames/paths you provided in your first post, so I was not sure what you were getting at, hence the "What's the point?" question.  I see now what the problem was: you listed "3.7.10-gentoo" as a term in your path, while the actual path I have is "linux-3.7.10-gentoo".  Chalk it up to the fact that you were using your phone instead of a real keyboard.    :Wink: 

Its too late to try anything new or dangeruos tonight, but I will try that tomorrow.

I was up late tonight (2:30 AM where I live) barbequeing a pork loin -- first bbq this year.  The weather was 70-something even that late.

Ah, spring is finally here!    :Smile: 

----------

## pluppets

Haha, no problem man.  Speaking of no sleep, my original message was posted @ like...5 am?

True story-- I had VMware working on 3.7.10, but...after a reinstall of the binary....

it crashes on startup with worthless logs.    :Rolling Eyes: 

Send me some BBQ?

~~~

 Update:   VMWare Workstation 9.0.1 working with symlink fix.  See my post on page 2 for more details.

----------

## krinn

I feel love in that thread, wonder how a chicken and a cat babies will look like...

Yes, spring seems really there...

I don't have search, but pluppets fix looks like the same fix for nvidia binaries drivers and kernel 3.7 issue.

----------

## pluppets

ANYONE having issues with VMWare on 3.7.10(+) that needs it fast should:

1) grab the newest VMWare Player .bundle from the website (currently 5.0.2)

2) ???

3) PROFIT.

 Update:   VMWare Workstation 9.0.1 working with symlink fix.  See my post on page 2 for more details.

----------

## Moriah

Well I *ALMOST* got vmware workstation working last night.  I did get it to install, thanks to the pluppets fix.  I even put in my paid-for key and registered it, but it puked on missing modules when I tried to run it.  I really think its time to go with either zen or kvm.  The use of qemu to emulate embedded cpu targets would be a great help to me in my profession, as most of my income comes from embedded development and test work.

So what's the consensus: zen or kvm?    :Question: 

Most of my vmware workstation work is to run either some variant of windows or some *nix os on x86/x86_64 cpu's, and I need to still be able to do that, including multiple vm's running on a virtual network all inside a single physical machine.

----------

## NeddySeagoon

Moriah,

I don't think you can have kvm and qemu as they have file namespace collisions.

This was true a few years ago - maybe its fixed now ?

----------

## Moriah

I thought that was kvm and xen.  What I have read so far says that you need qemu for either of those to simulate devices.

I would have to have 2 different boot drives to choose between kvm and xen, which is not hard for me to do, but a hassle since I always want everything accessible at the same time.  Although you can run kvm under kvm as a nested vm, you would still have the name collisions trying to run xen under kvm.    :Confused: 

It looks like for my purposes that kvm is probably the better choice, but I wanted to hear some other opinions too.

----------

## NeddySeagoon

Moriah,

kvm uses kvm-qemu for all of its processors.

Last time I tried it only supports Intel/AMD CPUs 

qemu supports all of your CPU emulation too but could not be installed beside kvm-qemu last time I tried.

----------

## Moriah

Aha!  So since my main need is a replacement for vmware workstation, then kvm looks like the answer.    :Idea: 

In order to perform development on non-x86(_64) type cpu's, I would need to boot from a different disk.  OK, I can live with that.  I guess I will be installing kvm in the very near future -- as soon as I finish making extensive backups, both filesystem, and drive image.    :Smile: 

Maybe I could even boot a different gentoo system under kvm, and then run qemu under that vm, so I could have my cake and eat it to, so to speak.    :Twisted Evil: 

----------

## Anon-E-moose

qemu and kvm have merged. 

Qemu is the emulation software, Kvm gives hardware virtualization to the x86* world

Qemu with kvm on x86* style hardware gives near native performance.

Qemu emulating say sparc (no kvm), is done in emulation mode and thus slower (depending on hardware might be faster than a native sparc processor)

You can run multiple virtual machines at the same time (given enough memory, cpu, etc) without much system degradation.

Using qemu/kvm I can run  XP near as fast in virtual mode as on the hardware itself. YMMV

----------

## Moriah

I gave up on the ebuild version of vmware workstation; in fact I think I'm giving up on vmware workstation altogether.

I got kvm "sort of" running under 3.7.10-gentoo and need some help working the kinks out.    :Neutral: 

I got it to boot and run the win-xp-pro install cd image to install win-xp.  

But there are some problems.  

First, the System section of the Control Panel shows that I only have 128 MB of ram in the virtual machine;  I will be needing up to 2 gb to run real stuff in it.  How do I specify the amount of ram for a vm?

Second, whenever I change screen resolution, the vm crashes with:

```

rj@gehazi ~ $ qemu-kvm -hda gentoo-i386.img -cdrom vmware/guests/xp-pro/xp-pro-sp3.iso 

VNC server running on `127.0.0.1:5900'

qemu: qemu_mutex_lock: Invalid argument

Aborted

```

Third, it will only allow me up to 1280x1024 pixels, and that only in 16-bit color.  I need 1920x1200 with 32-bit color to run real stuff in the vm.  How do I up the frame buffer size of the vm?

Third, and this one is driving me crazy, the mouse pointer generated by win-xp does not follow vncviewer's little mouse dot.  There seems to be a multiplier factor problem, as the xp cursor moves in the correct direction, but only about 2/3 as far as the vncviewer dot.  I must have something configured wrong.  I am using tightvnc to view the framebuffer served by the vm.

If I can get these issues worked out, I will move on to setting up the networking.  Since this is on a laptop that sometimes roves to unsecured networks, I want the vm's to be NATted behind the host machine.  My vmware setup used dhcp, but static addresses would be better, and probably easier to set up as well.

If all that works, then the only remaining item I can think of would be specifying more than one core to run in a vm, but since the laptop is only a core2duo, that is not a big issue.  When I set kvm up on my AMD 8-core server with 16 GB ram, that will become an issue.    :Cool: 

----------

## Moriah

Fiddled around with the qemu-kvm --help command and got my ram set at 1 gb.    :Smile: 

I specified -vga vmware and got my 1920x1200 pixel resolution at 24 bits/pixel.    :Smile: 

Also got the crashing to quit, but I'm not sure how.    :Confused: 

But the mouse is still not behaving properly.  It now looks to be related to acceleration, as if I jerk the mouse really quickly, I can get the xp pointer cursor to get ahead of the vnc dot cursor.  With the 1920x1200 resolution I use full screen mode, so I do not fall off the edge of the vnc window, but its still annoying and disorienting.     :Sad: 

Anybody know how to fix the mouse?    :Question: 

----------

## Moriah

Victory!  By turning of the "enhance pointer precision" option in the mouse section of the windows xp control panel, I got the mouse to behave in a rational manner.    :Mr. Green: 

Now to set up networking -- tomorrow.  It's bedtime in Kentucky.    :Rolling Eyes: 

----------

## Moriah

Networking is confusing because the gentoo wiki for kvm is pretty old and kvm seems to have changed a lot since the wiki was written.  Is there any up to date information on kvm besides kvm --help?  Its useful, but so terse that you need to know the answer to understand it, with the --help only serving as a reminder of the details.  It helped me solve some things, but networking is more complex, and I would really like to see current documentation elaborating on the --help stuff.

----------

## NeddySeagoon

Moriah,

Cheat - use virt-manager.

Its a GUI kvm manager.

----------

## Moriah

Thanks Neddy!  That will help initially, but I really want to script everything eventually, as I plan to use kvm not only on my development laptop, but also for isolation on my main internet facing server, which operates unattended much of the time, and must be remotely administered, so I will still need good documentation.

----------

## NeddySeagoon

Moriah,

I ssh into my VMs, unless I really mess up then virt-manager provides a fake console.

They may as well be 1000's of miles away because the closest you can get to them is the real hardware and doesn't help.  I can't get to a VM console there.

----------

## Moriah

I have been running vmware workstation for years, but it is having trouble with the 3-series kernels, so it is finally pushing me to go open source and run kvm instead.  The folks at vmware will no longer support vmware workstation on gentoo, as it is not listed as a supported distro.  I have been meaning to look into open source virtualization tools for some time now, but it took this to shove me into it.    :Confused: 

I like to run a vnc server on my vm's so there is persistence on the running windows.  That way I can disconnect and reconnect and everything is still being displayed in its own window as before.  I run an ssh tunnel to protect the rfb protocol, and iptables to prevent the 59xx ports from going out over the ethernet directly.  qemu-kvm has a build-in vnc server capability, and it has the alt-ctl-1,2,etc mode switches to get at a qemu console from there, and of course I could still just ssh into it as well.

What I really want is good timely up to date docs on qemu-kvm.    :Exclamation: 

----------

## Moriah

I installed virt-manager; it pulls in a ton of other stuff!

When I run it (after starting libvirtd) I get:

```

Unable to connect to libvirt.

no connection driver available for No connection for URI qemu:///system

Libvirt URI is: qemu:///system

Traceback (most recent call last):

  File "/usr/share/virt-manager/virtManager/connection.py", line 1027, in _open_thread

    self.vmm = self._try_open()

  File "/usr/share/virt-manager/virtManager/connection.py", line 1009, in _try_open

    flags)

  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 102, in openAuth

    if ret is None:raise libvirtError('virConnectOpenAuth() failed')

libvirtError: no connection driver available for No connection for URI qemu:///system

```

in a pop-up error box.

What did I neglect to do?    :Question: 

----------

## NeddySeagoon

Moriah,

You can run virt-manager without starting libvirtd an it should open an empty window for you to set up some connections.

Do you run it as root or your nomal user ?

You need to be in the kvm group to run it as a normal user.

Once you get virt-manager to run, the host that you want to connect to to manage KVMs needs to be running libvirtd

I get

```
 Unable to connect to libvirt.

Verify that the 'libvirtd' daemon is running.
```

on startup as I don't normally run libvirtd on my local PV.

----------

## pluppets

Just popping in to report success with:

-Kernel 3.7.10

-VMWare 9.0.1 (or most recent)

-symlink gimmick I posted on the first page

```
sudo ln -s /usr/src/linux-3.7.10-gentoo/include/generated/uapi/linux/version.h /usr/src/linux-3.7.10-gentoo/include/linux/version.h 
```

The only (unrelated) issue:

If you re-build your kernel after the VMWare modules are compiled, 'make modules_install' will fault on them, causing everything alphabetically after /misc to fail as well.  To fix, just remove the vm*.ko and vsock*.ko files.  VMWare can re-install them on startup.

Excuse the lazy asterisk-ing, it's how I roll.    :Very Happy: 

----------

## Moriah

I have had some success with qemu-kvm, so I plan to continue along that route.  Vmware can pound sand!    :Twisted Evil: 

I have a win-xp-pro system running under kvm now, although I haven't tried audio or usb yet, or snapshots but networking is easier for me, since I know how to do that in gentoo anyway.  I can't wait to try migration, but that will have to wait until I have set up some kind of SAN or NAS for networked disk to be visible to multiple hosts.

I am building a gentoo 64-bit system as I type this.

I consider the vmware problem solved: use kvm instead.  Open source and no license fees really makes my day!    :Very Happy: 

----------

## Moriah

I am unable to get virt-manager to connect to anything.  Likewise, I cannot find much in the way of docs for it eaither.  Can you help me get started with it, Neddy?

----------

## midway

this works just fine:

http://www.powelltechconsulting.com/install-vmware-tools-on-gentoo/

my set-up:

Linux i686 3.10.7-gentoo on ESX 4.1U3a

----------

## Moriah

I no longer need it.  I switched over to qemu with kvm and I'm not looking back!    :Mr. Green: 

----------

