Open VM Tools FTBS on Maverick 2.6.35

Bug #598542 reported by Noel J. Bergman
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
open-vm-tools (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: open-vm-tools

The current VMware Workstation 7.1 VMware Tools don't fully support 2.6.35, so I thought I'd try the open-vm-tools. Marginally surprised that they, too, fail. Had hoped that they would have already been updated.

  # aptitude install open-vm-dkms open-vm-tools open-vm-toolbox
  # dpkg -l | grep open-vm
  iF open-vm-dkms 2010.04.25-253928-2+ubuntu1 Source for VMware guest systems driver (DKMS
  ii open-vm-source 2010.04.25-253928-2+ubuntu1 Source for VMware guest systems driver
  ii open-vm-toolbox 2010.04.25-253928-2+ubuntu1 tools and components for VMware guest system
  ii open-vm-tools 2010.04.25-253928-2+ubuntu1 tools and components for VMware guest system

  # more /var/lib/dkms/open-vm-tools/2010.04.25/build/make.log
DKMS make.log for open-vm-tools-2010.04.25 for kernel 2.6.35-5-generic (x86_64)
Fri Jun 25 11:15:19 EDT 2010
Using 2.6.x kernel build system.
Building VMCI Sockets with VMCI module symbols.
make: Entering directory `/var/lib/dkms/open-vm-tools/2010.04.25/build/vsock'
cp -f /var/lib/dkms/open-vm-tools/2010.04.25/build/VMwareVMCIModule.symvers ./Module.symvers
make -C /lib/modules/2.6.35-5-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
   MODULEBUILDDIR=/var/lib/dkms/open-vm-tools/2010.04.25/build modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.35-5-generic'
  CC [M] /var/lib/dkms/open-vm-tools/2010.04.25/build/vsock/linux/af_vsock.o
/var/lib/dkms/open-vm-tools/2010.04.25/build/vsock/linux/af_vsock.c: In function ‘VSockVmciStreamConnect’:
/var/lib/dkms/open-vm-tools/2010.04.25/build/vsock/linux/af_vsock.c:3475: error: ‘struct sock’ has no member named ‘sk_sleep’
/var/lib/dkms/open-vm-tools/2010.04.25/build/vsock/linux/af_vsock.c:3498: error: ‘struct sock’ has no member named ‘sk_sleep’
/var/lib/dkms/open-vm-tools/2010.04.25/build/vsock/linux/af_vsock.c:3510: error: ‘struct sock’ has no member named ‘sk_sleep’
/var/lib/dkms/open-vm-tools/2010.04.25/build/vsock/linux/af_vsock.c: In function ‘VSockVmciAccept’:
/var/lib/dkms/open-vm-tools/2010.04.25/build/vsock/linux/af_vsock.c:3570: error: ‘struct sock’ has no member named ‘sk_sleep’
/var/lib/dkms/open-vm-tools/2010.04.25/build/vsock/linux/af_vsock.c:3586: error: ‘struct sock’ has no member named ‘sk_sleep’
/var/lib/dkms/open-vm-tools/2010.04.25/build/vsock/linux/af_vsock.c:3620: error: ‘struct sock’ has no member named ‘sk_sleep’
/var/lib/dkms/open-vm-tools/2010.04.25/build/vsock/linux/af_vsock.c: In function ‘VSockVmciPoll’:
/var/lib/dkms/open-vm-tools/2010.04.25/build/vsock/linux/af_vsock.c:3718: error: ‘struct sock’ has no member named ‘sk_sleep’
/var/lib/dkms/open-vm-tools/2010.04.25/build/vsock/linux/af_vsock.c: In function ‘VSockVmciStreamSendmsg’:
/var/lib/dkms/open-vm-tools/2010.04.25/build/vsock/linux/af_vsock.c:4317: error: ‘struct sock’ has no member named ‘sk_sleep’
/var/lib/dkms/open-vm-tools/2010.04.25/build/vsock/linux/af_vsock.c:4355: error: ‘struct sock’ has no member named ‘sk_sleep’
/var/lib/dkms/open-vm-tools/2010.04.25/build/vsock/linux/af_vsock.c:4407: error: ‘struct sock’ has no member named ‘sk_sleep’
/var/lib/dkms/open-vm-tools/2010.04.25/build/vsock/linux/af_vsock.c: In function ‘VSockVmciStreamRecvmsg’:
/var/lib/dkms/open-vm-tools/2010.04.25/build/vsock/linux/af_vsock.c:4593: error: ‘struct sock’ has no member named ‘sk_sleep’
/var/lib/dkms/open-vm-tools/2010.04.25/build/vsock/linux/af_vsock.c:4633: error: ‘struct sock’ has no member named ‘sk_sleep’
/var/lib/dkms/open-vm-tools/2010.04.25/build/vsock/linux/af_vsock.c:4697: error: ‘struct sock’ has no member named ‘sk_sleep’
make[2]: *** [/var/lib/dkms/open-vm-tools/2010.04.25/build/vsock/linux/af_vsock.o] Error 1
make[1]: *** [_module_/var/lib/dkms/open-vm-tools/2010.04.25/build/vsock] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.35-5-generic'
make: *** [vsock.ko] Error 2
make: Leaving directory `/var/lib/dkms/open-vm-tools/2010.04.25/build/vsock'

This appears to be the same issue that I patched for the host modules (q.v., http://communities.vmware.com/thread/272625).

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: open-vm-dkms 2010.04.25-253928-2+ubuntu1
ProcVersionSignature: Ubuntu 2.6.35-5.6-generic 2.6.35-rc3
Uname: Linux 2.6.35-5-generic x86_64
Architecture: amd64
Date: Fri Jun 25 11:19:23 2010
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Alpha amd64 (20100602.2)
PackageArchitecture: all
ProcEnviron:
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: open-vm-tools

Related branches

Revision history for this message
Noel J. Bergman (noeljb) wrote :
Revision history for this message
Noel J. Bergman (noeljb) wrote :

Patch to allow vmxnet to compile. vmxnet still doesn't appear to *work* (AMD64), but I don't believe that is the fault of this patch. Both vmxnet and vmxnet3 load, but neither provide a usable network connection when restarting the network layer. The same is true of the official vmxnet3 driver provided by VMware Tools (installed for testing in a different VM). And at least this patch keeps vmxnet from blocking the install.

Revision history for this message
Noel J. Bergman (noeljb) wrote :

Second patch to fix vsock. Corrects all references of somevar->sk_compat_sleep to compat_sk_sleep(somevar)

Revision history for this message
Noel J. Bergman (noeljb) wrote :
Revision history for this message
Evan Broder (broder) wrote :

Noel: There was a recent new upstream release of open-vm-tools (open-vm-tools-2010.06.16-268169, available at http://sourceforge.net/projects/open-vm-tools/files/) that Debian (and therefore Ubuntu) hasn't picked up yet. I was hoping to pull a package together for testing, but have you checked to see if that fixes the FTBFS?

Revision history for this message
Noel J. Bergman (noeljb) wrote :

Not, yet, Evan. I was just going to post that there is a new upstream version ( http://sourceforge.net/mailarchive/message.php?msg_name=4C1BE732.1090903%40vmware.com), but haven't pulled and checked it yet. Doing so now.

Revision history for this message
Noel J. Bergman (noeljb) wrote :

The new build still have the same failure in vmxnet:

Using 2.6.x kernel build system.
make[2]: Entering directory `/home/noel/open-vm-tools-2010.06.16-268169/modules/linux/vmxnet'
make -C /lib/modules/2.6.35-5-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
   MODULEBUILDDIR=/home/noel/open-vm-tools-2010.06.16-268169/modules/linux modules
make[3]: Entering directory `/usr/src/linux-headers-2.6.35-5-generic'
  CC [M] /home/noel/open-vm-tools-2010.06.16-268169/modules/linux/vmxnet/vmxnet.o
/home/noel/open-vm-tools-2010.06.16-268169/modules/linux/vmxnet/vmxnet.c: In function ‘vmxnet_load_multicast’:
/home/noel/open-vm-tools-2010.06.16-268169/modules/linux/vmxnet/vmxnet.c:2954: error: ‘struct net_device’ has no member named ‘mc_list’
/home/noel/open-vm-tools-2010.06.16-268169/modules/linux/vmxnet/vmxnet.c:2964: error: ‘struct net_device’ has no member named ‘mc_count’
/home/noel/open-vm-tools-2010.06.16-268169/modules/linux/vmxnet/vmxnet.c:2965: error: dereferencing pointer to incomplete type
/home/noel/open-vm-tools-2010.06.16-268169/modules/linux/vmxnet/vmxnet.c:2966: error: dereferencing pointer to incomplete type

Revision history for this message
Noel J. Bergman (noeljb) wrote :

I do need to correct, as an aside, that vmxnet3 is not coming from open-vm-tools. It is now provided with the kernel (still does not work, though).

Revision history for this message
Noel J. Bergman (noeljb) wrote :

Yes, the new tools appear to build and work, with the vmxnet patch (mind you, neither vmxnet driver is providing a connection, so we use e1000).

vmsync 3992 0
vsock 44947 0
vmhgfs 60011 0
vmci 47215 2 vsock,vmhgfs
vmware_balloon 4799 0

Hopefully debian will pick up the upstream release, since the current one in Maverick is *not* Maverick compatible.

Revision history for this message
Noel J. Bergman (noeljb) wrote :

Ignore the noise regarding vmxnet3: http://sanbarrow.com/vmxnet3.html It is working fine after changing the virtual h/w manually.

Revision history for this message
Noel J. Bergman (noeljb) wrote :

And similarly for vmxnet, you may need to manually change the hardware to test the vmxnet driver. The default is e1000, but after changing that, I can verify that the fixed vmxnet driver is working.

So we can get the latest upstream code, apply my patch for vmxnet (already submitted upstream), and that should allow this bug to be closed.

Revision history for this message
Evan Broder (broder) wrote :

Note that it's not impossible for Ubuntu to pull the newer upstream release of open-vm-tools without Debian doing so first, it's just not how packages typically get maintained. If the upstream version solved the bug, I'd have no qualms pulling it in in advance of Debian.

I'd prefer to wait for the upstream project to comment on the bug before I go applying patches myself, as doing so makes me a bit uncomfortable. In particular, the struct netdev_hw_addr you use appears to have been introduced in 2.6.31 (and it looks like netdev_for_each_mc_addr was introduced later), so this patch would break compatibility with older kernels.

Since open-vm-tools appear to currently work all the way back to 2.6.9, I suspect the upstream project won't want to break compatibility that sharply. You might be able to short-circuit a code review round-trip with upstream by adjusting the patch to conditionalize based on what features are available on the current kernel (which surely open-vm-tools already does, I just don't know how)

If upstream turns out to be slow to respond, I'd consider applying the patch independently. That being said, packages do get backported, and people do run userspaces against older kernels, so I'd be less apprehensive about applying the patch without seeing it incorporated into upstream if it were updated to work on all previously supported kernel versions.

In any case, thanks for your work on this. I'll try to keep an eye on the upstream bug report as well as Debian

Revision history for this message
Noel J. Bergman (noeljb) wrote :

I agree, Evan. Anyone who is running into the problem now can grab my patches, which apply to either the current or newer upstream drops. And I also agree that I've done a quick, version specific, patch without doing the extra #if defined work that should be done in the "real" code.

f there's a real need, I'll put in the extra time, otherwise we'll just wait on upstream, which has some other issues to address as well for Maverick.

Revision history for this message
Nate Muench (Mink) (n-muench) wrote :

I have taken the liberty to rebuild open-vm-tools package available in Maverick, this time I included the patches available in this report. Launchpad's Build was successful and the building of the modules using module assistant was also successful. I've added (or copied, from one of my other PPAs, to be more accurate) packages to my regular PPA. https://launchpad.net/~n-muench/+archive/ppa

Also Debian released their build of the newest upstream open-vm-tools (available via GIT). I did 2 builds with their release, one without the patches and one with the patches. The first one failed. However I did a raw compile (without pbuilder) and I've noticed that the vsock patch doesn't work with the new release. The second build (with the vmxnet patch and using pbuilder), successfully built on my Maverick VM. The install also went successfully with one issue. The following error occurred during install:

Setting up open-vm-tools (2010.06.16-268169-1~ppa1) ...
Installing new version of config file /etc/vmware-tools/poweron-vm-default ...
Installing new version of config file /etc/vmware-tools/poweroff-vm-default ...
Installing new version of config file /etc/vmware-tools/suspend-vm-default ...
Installing new version of config file /etc/vmware-tools/resume-vm-default ...
update-initramfs: deferring update (trigger activated)
 * Loading open-vm-tools modules
FATAL: Error inserting vmhgfs (/lib/modules/2.6.35-6-generic/misc/vmhgfs.ko): Invalid argument
                                                                         [ OK ]
 * Starting open-vm daemon vmtoolsd [ OK ]

tags: added: patch
Revision history for this message
Nate Muench (Mink) (n-muench) wrote :

I've added an updated patch for vsock. Almost everything from the old vsock patch was added in the new release (the June 16th one). The only needed to add "compat_" to section that says "sk_sleep(sk)" The VMXNET patch is still needed.

So Noel, I needed your input on this new vsock patch.

I'm about to do a test build (using pbuilder) on my Maverick virtual machine.

Revision history for this message
Nate Muench (Mink) (n-muench) wrote :

My Build went successfully with some issues.

I manually installed the deb files from the build, but I got errors saying I had better modules installed (or something). I completely uninstalled the modules, rebooted, and manually installed everything again, it went fine.

So because of that error I'm going to create a 5th PPA for myself, and upload the new packaging to that. Doing that will be easier to manage with Terminal.

Revision history for this message
Jasper Frumau (jfrumau) wrote :

Any news on that latest PPA Nate?Or on an Open VM Tools upgrade? Using GRUB_GFXPAYLOAD_LINUX=text in my GRUB Configuration now, which sort of works. Started a thread here http://ubuntuforums.org/showthread.php?t=1531620 .

Revision history for this message
Nate Muench (Mink) (n-muench) wrote :

One thing I've noticed with the new upstream release, it's that even with the config coming from Debian, the existing vmxnet, and my adjusted vsock patch. It appears we lose the vmci/vmhgfs modules which means no shared folders. Which I want to make a note of.

After you install open-vm-tools on Ubuntu, compile the modules, and reboot. There is still a problem that need to be done manually, and that's sharing folders. With the regular VMware Tools (the ones that come with Workstation, Fusion, etc.), this is done automatically. But with open-vm-tools, to share folders, a command (mount) needs to be run (as sudo) every time you boot. I've made a fix, which enters the command to mount at boot up. I think one of the Ubuntu (or Debian) developer(s) should put this script (in some shape or form) into the config.

First, I'll tell you how the script functions. What it does is check to see if the "hgfs" folder exists in the "mnt" folder, if it does, create the directory, then run the mount command. If the directory doesn't exist, then just run the mount command. I've noticed that if you already have a sharing enable before installing open-vm-tools (and compiling the modules), you need to reboot twice (once to make the hgfs directory, and another time to mount the shared folder), this is where my script can be perfected.

Now, here's how to run it. Put the "MountSharedFolders" script on your Desktop, Home folder (it doesn't matter, just do it as a regular user). Next, make it executable by running "chmod +x MountSharedFolders" Now, with sudo, move the script to the "/etc/init.d" folder. And finally, in order to make it run during boot run "update-rc.d MountSharedFolders defaults"

Like I said, the new upstream version, for some strange reason, loses the ability to access shared folders. The script attached should be used on the upstream available on Maverick (the April release). I think it should be added to the Ubuntu/Debian config, since shared folders aren't mount by default.

Revision history for this message
Stefano Rivera (stefanor) wrote :

Nate: Hardcoding this to /mnt/hgfs seems wrong. /mnt is not generally used by packages. However, I have zero knowledge of this package :)

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package open-vm-tools - 2010.04.25-253928-2+ubuntu2

---------------
open-vm-tools (2010.04.25-253928-2+ubuntu2) maverick; urgency=low

  * Add 03-vmxnet.patch and 04-vsock.patch.
    Fixes building on Maverick kernels (LP: #598542)
 -- Nate Muench <email address hidden> Mon, 19 Jul 2010 18:01:17 -0500

Changed in open-vm-tools (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.