最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【记录】继续折腾VMWare Workstation 8下的虚拟机Ubuntu 13.04中的文件夹共享

VMWare crifan 3607浏览 0评论

【背景】

之前已经折腾很长时间的VMWare Workstation 8.0.6下的虚拟机Ubuntu 13.04中的文件夹共享了:

【吐槽】VMWare Workstation中的VMWare Tools还是很不好用啊

【未解决】VMware Workstation的Ubuntu虚拟机中安装VMWare Tools出现提示:Enter the path to the kernel header files for the 3.8.0-27-generic kernel?

但是都还是没有解决问题。

至少对于:

1.Ubuntu 13.04下,安装头文件时,找不到。

2.即使vmware tools安装好之后,也无法实现文件夹共享(可以实现剪贴板共享了)

3.通过安装第三方的open-vm-tools,可以实现文件夹共享了。但是每次重启Ubuntu后,又丢失了;搞得每次都要重装两个,太麻烦了。

所以,打算再花点时间去折腾看看。

【折腾过程】

1.无意间发现一个帖子:

Patching VMware Tools to fix multiple installation errors on Ubuntu 13.04

中提到了,Ubuntu 13.04用的内核是最新的3.8.0,其有些变化,而这些变化是vmware tools中没有支持的。

但是最新的VMware Workstation 9中的vmware tools,支持了,所以此人把一些有用的东西弄出来了。

所以可以去试试关于这个头文件的:

去执行了:

sudo ln -s /usr/src/linux-headers-$(uname -r)/include/generated/uapi/linux/version.h /usr/src/linux-headers-$(uname -r)/include/linux/version.h

后,再去安装vmware tools,看看能否找到头文件。果然可以找到:

appear to be a valid path after ln linux version h file

2.但是接着去编译vcmi-only时果然出错:

build vcmi error

所以,再参考其解决办法,去操作。

且另外也看到别的一些错误,包括编译vmhgfs也出错,怪不得文件共享一直有问题呢。

3.所以,全部按照帖子提示,去修复后,再去重新安装一下vmware tools。

先贴出,之前在安装vmware tools期间,去打了vmhgfs和vmci的patch后的结果:

crifan@ubuntu:Desktop$ cd /home/crifan/develop/vmwaretools/
crifan@ubuntu:vmwaretools$ cd vmware-tools-distrib/
crifan@ubuntu:vmware-tools-distrib$ ls
bin  doc  etc  FILES  INSTALL  installer  lib  vmware-install.pl
crifan@ubuntu:vmware-tools-distrib$ sudo ./vmware-install.pl 
The installer found the following conflicting packages installed on the system and will now remove them:

open-vm-dkms
open-vm-tools

(Reading database ... 190265 files and directories currently installed.)
Removing open-vm-dkms ...

-------- Uninstall Beginning --------
Module:  open-vm-tools
Version: 2012.12.26
Kernel:  3.8.0-27-generic (i686)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

vmblock.ko:
 - Uninstallation
   - Deleting from: /lib/modules/3.8.0-27-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


vmci.ko:
 - Uninstallation
   - Deleting from: /lib/modules/3.8.0-27-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


vmhgfs.ko:
 - Uninstallation
   - Deleting from: /lib/modules/3.8.0-27-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


vmxnet.ko:
 - Uninstallation
   - Deleting from: /lib/modules/3.8.0-27-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


vsock.ko:
 - Uninstallation
   - Deleting from: /lib/modules/3.8.0-27-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

depmod.................

DKMS: uninstall completed.

------------------------------
Deleting module version: 2012.12.26
completely from the DKMS tree.
------------------------------
Done.
Removing open-vm-tools ...
 * Stopping open-vm guest daemon vmtoolsd                                [ OK ] 
 * Removing open-vm-tools modules                                               FATAL: Module vmhgfs not found.
FATAL: Module vmxnet not found.
                                                                         [ OK ]
Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot
Processing triggers for man-db ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
A previous installation of VMware Tools has been detected.

The previous installation was made by the tar installer (version 4).

Keeping the tar4 installer database format.

You have a version of VMware Tools installed.  Continuing this install will 
first uninstall the currently installed version.  Do you wish to continue? 
(yes/no) [yes] 

Uninstalling the tar installation of VMware Tools.

Stopping services for VMware Tools

vmware-tools stop/waiting
File /usr/lib/vmware-tools/lib32/libconf/etc/gtk-2.0/gdk-pixbuf.loaders is 
backed up to 
/usr/lib/vmware-tools/lib32/libconf/etc/gtk-2.0/gdk-pixbuf.loaders.old.10.

File /usr/lib/vmware-tools/lib32/libconf/etc/pango/pangorc is backed up to 
/usr/lib/vmware-tools/lib32/libconf/etc/pango/pangorc.old.10.

This program previously created the file 
/usr/lib/vmware-tools/libconf/etc/pango/pangorc, and was about to remove it.  
Somebody else apparently did it already.

File /etc/vmware-tools/vmware-user.desktop is backed up to 
/etc/vmware-tools/vmware-user.desktop.old.10.

This program previously created the file /sbin/mount.vmhgfs, and was about to 
remove it.  Somebody else apparently did it already.

File /usr/lib/vmware-tools/lib32/libconf/etc/fonts/fonts.conf is backed up to 
/usr/lib/vmware-tools/lib32/libconf/etc/fonts/fonts.conf.old.8.

This program previously created the file /usr/bin/vmware-hgfsclient, and was 
about to remove it.  Somebody else apparently did it already.

This program previously created the file 
/usr/lib/vmware-tools/lib32/libconf/etc/pango/pango.modules, and was about to 
remove it.  Somebody else apparently did it already.

This program previously created the file 
/usr/lib/vmware-tools/libconf/etc/gtk-2.0/gdk-pixbuf.loaders, and was about to 
remove it.  Somebody else apparently did it already.

File /usr/lib/vmware-tools/lib32/libconf/etc/gtk-2.0/gtk.immodules is backed up
to /usr/lib/vmware-tools/lib32/libconf/etc/gtk-2.0/gtk.immodules.old.10.

This program previously created the file 
/usr/lib/vmware-tools/libconf/etc/gtk-2.0/gtk.immodules, and was about to 
remove it.  Somebody else apparently did it already.

This program previously created the file 
/usr/lib/vmware-tools/lib32/libconf/etc/pango/pangox.aliases, and was about to 
remove it.  Somebody else apparently did it already.

This program previously created the file /usr/bin/vmware-toolbox-cmd, and was 
about to remove it.  Somebody else apparently did it already.

This program previously created the file /usr/bin/vmware-xferlogs, and was 
about to remove it.  Somebody else apparently did it already.

update-initramfs: Generating /boot/initrd.img-3.8.0-27-generic
update-initramfs: Generating /boot/initrd.img-3.8.0-19-generic
The removal of VMware Tools 8.8.6 build-1035889 for Linux completed 
successfully.

Installing VMware Tools.

In which directory do you want to install the binary files? 
[/usr/bin] 

What is the directory that contains the init directories (rc0.d/ to rc6.d/)? 
[/etc] 

What is the directory that contains the init scripts? 
[/etc/init.d] 

In which directory do you want to install the daemon files? 
[/usr/sbin] 

In which directory do you want to install the library files? 
[/usr/lib/vmware-tools] 

In which directory do you want to install the documentation files? 
[/usr/share/doc/vmware-tools] 

The path "/usr/share/doc/vmware-tools" does not exist currently. This program 
is going to create it, including needed parent directories. Is this what you 
want? [yes] 

The installation of VMware Tools 8.8.6 build-1035889 for Linux completed 
successfully. You can decide to remove this software from your system at any 
time by invoking the following command: "/usr/bin/vmware-uninstall-tools.pl".

Before running VMware Tools for the first time, you need to configure it by 
invoking the following command: "/usr/bin/vmware-config-tools.pl". Do you want 
this program to invoke the command for you now? [yes] 

Initializing...


Making sure services for VMware Tools are stopped.



[EXPERIMENTAL] The VMware FileSystem Sync Driver (vmsync) is a new feature that
creates backups of virtual machines. Please refer to the VMware Knowledge Base 
for more details on this capability. Do you wish to enable this feature? 
[no] 


Before you can compile modules, you need to have the following installed... 

make
gcc
kernel headers of the running kernel


Searching for GCC...
Detected GCC binary at "/usr/bin/gcc".
The path "/usr/bin/gcc" appears to be a valid path to the gcc binary.
Would you like to change it? [no] 

Searching for a valid kernel header path...
Detected the kernel headers at "/lib/modules/3.8.0-27-generic/build/include".
The path "/lib/modules/3.8.0-27-generic/build/include" appears to be a valid 
path to the 3.8.0-27-generic kernel headers.
Would you like to change it? [no] 

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-root/modules/vmci-only'
make -C /lib/modules/3.8.0-27-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-3.8.0-27-generic'
  CC [M]  /tmp/vmware-root/modules/vmci-only/linux/driver.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/linux/vmciKernelIf.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciContext.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciDatagram.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciDoorbell.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciDriver.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciEvent.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciHashtable.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciQPair.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciQueuePair.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciResource.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciRoute.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/driverLog.o
/tmp/vmware-root/modules/vmci-only/linux/driver.c:127:4: error: implicit declaration of function ‘__devexit_p’ [-Werror=implicit-function-declaration]
/tmp/vmware-root/modules/vmci-only/linux/driver.c:127:4: error: initializer element is not constant
/tmp/vmware-root/modules/vmci-only/linux/driver.c:127:4: error: (near initialization for ‘vmci_driver.remove’)
/tmp/vmware-root/modules/vmci-only/linux/driver.c:1745:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘vmci_probe_device’
/tmp/vmware-root/modules/vmci-only/linux/driver.c:1973:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘vmci_remove_device’
/tmp/vmware-root/modules/vmci-only/linux/driver.c: In function ‘__check_disable_host’:
/tmp/vmware-root/modules/vmci-only/linux/driver.c:2498:1: warning: return from incompatible pointer type [enabled by default]
/tmp/vmware-root/modules/vmci-only/linux/driver.c: In function ‘__check_disable_guest’:
/tmp/vmware-root/modules/vmci-only/linux/driver.c:2501:1: warning: return from incompatible pointer type [enabled by default]
/tmp/vmware-root/modules/vmci-only/linux/driver.c: In function ‘__check_disable_msi’:
/tmp/vmware-root/modules/vmci-only/linux/driver.c:2504:1: warning: return from incompatible pointer type [enabled by default]
/tmp/vmware-root/modules/vmci-only/linux/driver.c: In function ‘__check_disable_msix’:
/tmp/vmware-root/modules/vmci-only/linux/driver.c:2507:1: warning: return from incompatible pointer type [enabled by default]
/tmp/vmware-root/modules/vmci-only/linux/driver.c: At top level:
/tmp/vmware-root/modules/vmci-only/linux/driver.c:119:12: warning: ‘vmci_probe_device’ used but never defined [enabled by default]
/tmp/vmware-root/modules/vmci-only/linux/driver.c:121:13: warning: ‘vmci_remove_device’ used but never defined [enabled by default]
/tmp/vmware-root/modules/vmci-only/linux/driver.c:2054:1: warning: ‘vmci_interrupt’ defined but not used [-Wunused-function]
/tmp/vmware-root/modules/vmci-only/linux/driver.c:2128:1: warning: ‘vmci_interrupt_bm’ defined but not used [-Wunused-function]
/tmp/vmware-root/modules/vmci-only/linux/driver.c:1708:1: warning: ‘vmci_enable_msix’ defined but not used [-Wunused-function]
cc1: some warnings being treated as errors
make[2]: *** [/tmp/vmware-root/modules/vmci-only/linux/driver.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [_module_/tmp/vmware-root/modules/vmci-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.8.0-27-generic'
make: *** [vmci.ko] Error 2
make: Leaving directory `/tmp/vmware-root/modules/vmci-only'

The communication service is used in addition to the standard communication 
between the guest and the host.  The rest of the software provided by VMware 
Tools is designed to work independently of this feature.
If you wish to have the VMCI feature, you can install the driver by running 
vmware-config-tools.pl again after making sure that gcc, binutils, make and the
kernel sources for your running kernel are installed on your machine. These 
packages are available on your distribution's installation CD.
[ Press Enter key to continue ] 

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-root/modules/vmci-only'
make -C /lib/modules/3.8.0-27-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-3.8.0-27-generic'
  CC [M]  /tmp/vmware-root/modules/vmci-only/linux/driver.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/linux/vmciKernelIf.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciDatagram.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciContext.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciDoorbell.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciDriver.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciEvent.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciHashtable.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciQPair.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciQueuePair.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciResource.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciRoute.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/driverLog.o
/tmp/vmware-root/modules/vmci-only/linux/driver.c: In function ‘__check_disable_host’:
/tmp/vmware-root/modules/vmci-only/linux/driver.c:2498:1: warning: return from incompatible pointer type [enabled by default]
/tmp/vmware-root/modules/vmci-only/linux/driver.c: In function ‘__check_disable_guest’:
/tmp/vmware-root/modules/vmci-only/linux/driver.c:2501:1: warning: return from incompatible pointer type [enabled by default]
/tmp/vmware-root/modules/vmci-only/linux/driver.c: In function ‘__check_disable_msi’:
/tmp/vmware-root/modules/vmci-only/linux/driver.c:2504:1: warning: return from incompatible pointer type [enabled by default]
/tmp/vmware-root/modules/vmci-only/linux/driver.c: In function ‘__check_disable_msix’:
/tmp/vmware-root/modules/vmci-only/linux/driver.c:2507:1: warning: return from incompatible pointer type [enabled by default]

  LD [M]  /tmp/vmware-root/modules/vmci-only/vmci.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /tmp/vmware-root/modules/vmci-only/vmci.mod.o
  LD [M]  /tmp/vmware-root/modules/vmci-only/vmci.ko
make[1]: Leaving directory `/usr/src/linux-headers-3.8.0-27-generic'
make -C $PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= postbuild
make[1]: Entering directory `/tmp/vmware-root/modules/vmci-only'
make[1]: `postbuild' is up to date.
make[1]: Leaving directory `/tmp/vmware-root/modules/vmci-only'
cp -f vmci.ko ./../vmci.o
make: Leaving directory `/tmp/vmware-root/modules/vmci-only'
Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-root/modules/vsock-only'
make -C /lib/modules/3.8.0-27-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-3.8.0-27-generic'
  CC [M]  /tmp/vmware-root/modules/vsock-only/linux/af_vsock.o
  CC [M]  /tmp/vmware-root/modules/vsock-only/linux/notify.o
  CC [M]  /tmp/vmware-root/modules/vsock-only/linux/notifyQState.o
  CC [M]  /tmp/vmware-root/modules/vsock-only/linux/stats.o
  CC [M]  /tmp/vmware-root/modules/vsock-only/linux/util.o
  CC [M]  /tmp/vmware-root/modules/vsock-only/linux/vsockAddr.o
  CC [M]  /tmp/vmware-root/modules/vsock-only/driverLog.o
  LD [M]  /tmp/vmware-root/modules/vsock-only/vsock.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /tmp/vmware-root/modules/vsock-only/vsock.mod.o
  LD [M]  /tmp/vmware-root/modules/vsock-only/vsock.ko
make[1]: Leaving directory `/usr/src/linux-headers-3.8.0-27-generic'
make -C $PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= postbuild
make[1]: Entering directory `/tmp/vmware-root/modules/vsock-only'
make[1]: `postbuild' is up to date.
make[1]: Leaving directory `/tmp/vmware-root/modules/vsock-only'
cp -f vsock.ko ./../vsock.o
make: Leaving directory `/tmp/vmware-root/modules/vsock-only'

The module vmxnet3 has already been installed on this system by another 
installer or package and will not be modified by this installer.  Use the flag 
--clobber-kernel-modules=vmxnet3 to override.

The module pvscsi has already been installed on this system by another 
installer or package and will not be modified by this installer.  Use the flag 
--clobber-kernel-modules=pvscsi to override.

The module vmmemctl has already been installed on this system by another 
installer or package and will not be modified by this installer.  Use the flag 
--clobber-kernel-modules=vmmemctl to override.

The VMware Host-Guest Filesystem allows for shared folders between the host OS 
and the guest OS in a Fusion or Workstation virtual environment.  Do you wish 
to enable this feature? [yes] 
Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-root/modules/vmxnet-only'
make -C /lib/modules/3.8.0-27-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-3.8.0-27-generic'
  CC [M]  /tmp/vmware-root/modules/vmxnet-only/vmxnet.o
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:525:4: error: unknown field ‘get_rx_csum’ specified in initializer
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:525:4: warning: initialization from incompatible pointer type [enabled by default]
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:525:4: warning: (near initialization for ‘vmxnet_ethtool_ops.get_eeprom_len’) [enabled by default]
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:526:4: error: unknown field ‘set_rx_csum’ specified in initializer
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:526:4: warning: initialization from incompatible pointer type [enabled by default]
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:526:4: warning: (near initialization for ‘vmxnet_ethtool_ops.get_eeprom’) [enabled by default]
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:527:4: error: unknown field ‘get_tx_csum’ specified in initializer
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:527:4: warning: initialization from incompatible pointer type [enabled by default]
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:527:4: warning: (near initialization for ‘vmxnet_ethtool_ops.set_eeprom’) [enabled by default]
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:528:4: error: unknown field ‘set_tx_csum’ specified in initializer
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:528:4: warning: initialization from incompatible pointer type [enabled by default]
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:528:4: warning: (near initialization for ‘vmxnet_ethtool_ops.get_coalesce’) [enabled by default]
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:529:4: error: unknown field ‘get_sg’ specified in initializer
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:529:27: error: ‘ethtool_op_get_sg’ undeclared here (not in a function)
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:530:4: error: unknown field ‘set_sg’ specified in initializer
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:530:27: error: ‘ethtool_op_set_sg’ undeclared here (not in a function)
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:532:4: error: unknown field ‘get_tso’ specified in initializer
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:532:27: error: ‘ethtool_op_get_tso’ undeclared here (not in a function)
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:533:4: error: unknown field ‘set_tso’ specified in initializer
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:533:4: warning: initialization from incompatible pointer type [enabled by default]
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:533:4: warning: (near initialization for ‘vmxnet_ethtool_ops.get_pauseparam’) [enabled by default]
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:535:4: error: unknown field ‘get_ufo’ specified in initializer
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:535:27: error: ‘ethtool_op_get_ufo’ undeclared here (not in a function)
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c: In function ‘vmxnet_probe_device’:
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:1008:7: error: unknown field ‘ndo_set_multicast_list’ specified in initializer
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:1008:7: warning: initialization from incompatible pointer type [enabled by default]
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:1008:7: warning: (near initialization for ‘vmxnet_netdev_ops.ndo_vlan_rx_add_vid’) [enabled by default]
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c: In function ‘vmxnet_map_pkt’:
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:2085:32: error: incompatible type for argument 2 of ‘pci_map_page’
In file included from /usr/src/linux-headers-3.8.0-27-generic/arch/x86/include/asm/pci.h:148:0,
                 from include/linux/pci.h:1422,
                 from /tmp/vmware-root/modules/vmxnet-only/./shared/compat_pci.h:27,
                 from /tmp/vmware-root/modules/vmxnet-only/vmxnet.c:31:
include/asm-generic/pci-dma-compat.h:43:1: note: expected ‘struct page *’ but argument is of type ‘struct <anonymous>’
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:2104:26: error: incompatible type for argument 2 of ‘pci_map_page’
In file included from /usr/src/linux-headers-3.8.0-27-generic/arch/x86/include/asm/pci.h:148:0,
                 from include/linux/pci.h:1422,
                 from /tmp/vmware-root/modules/vmxnet-only/./shared/compat_pci.h:27,
                 from /tmp/vmware-root/modules/vmxnet-only/vmxnet.c:31:
include/asm-generic/pci-dma-compat.h:43:1: note: expected ‘struct page *’ but argument is of type ‘struct <anonymous>’
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c: In function ‘vmxnet_rx_frags’:
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:2599:48: error: incompatible types when assigning to type ‘struct <anonymous>’ from type ‘struct page *’
make[2]: *** [/tmp/vmware-root/modules/vmxnet-only/vmxnet.o] Error 1
make[1]: *** [_module_/tmp/vmware-root/modules/vmxnet-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.8.0-27-generic'
make: *** [vmxnet.ko] Error 2
make: Leaving directory `/tmp/vmware-root/modules/vmxnet-only'

The fast network device driver (vmxnet module) is used only for our fast 
networking interface. The rest of the software provided by VMware Tools is 
designed to work independently of this feature.
If you wish to have the fast network driver enabled, you can install the driver
by running vmware-config-tools.pl again after making sure that gcc, binutils, 
make and the kernel sources for your running kernel are installed on your 
machine. These packages are available on your distribution's installation CD.
[ Press Enter key to continue ] 

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-root/modules/vmblock-only'
make -C /lib/modules/3.8.0-27-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-3.8.0-27-generic'
  CC [M]  /tmp/vmware-root/modules/vmblock-only/linux/control.o
  CC [M]  /tmp/vmware-root/modules/vmblock-only/linux/block.o
  CC [M]  /tmp/vmware-root/modules/vmblock-only/linux/dbllnklst.o
  CC [M]  /tmp/vmware-root/modules/vmblock-only/linux/dentry.o
  CC [M]  /tmp/vmware-root/modules/vmblock-only/linux/file.o
  CC [M]  /tmp/vmware-root/modules/vmblock-only/linux/filesystem.o
  CC [M]  /tmp/vmware-root/modules/vmblock-only/linux/inode.o
  CC [M]  /tmp/vmware-root/modules/vmblock-only/linux/module.o
  CC [M]  /tmp/vmware-root/modules/vmblock-only/linux/stubs.o
  CC [M]  /tmp/vmware-root/modules/vmblock-only/linux/super.o
/tmp/vmware-root/modules/vmblock-only/linux/control.c: In function ‘ExecuteBlockOp’:/tmp/vmware-root/modules/vmblock-only/linux/dentry.c:38:4: warning: initialization from incompatible pointer type [enabled by default]
/tmp/vmware-root/modules/vmblock-only/linux/control.c:285:9: warning: assignment from incompatible pointer type [enabled by default]
/tmp/vmware-root/modules/vmblock-only/linux/control.c:296:4: warning: passing argument 1 of ‘putname’ from incompatible pointer type [enabled by default]
In file included from include/linux/proc_fs.h:5:0,
                 from /tmp/vmware-root/modules/vmblock-only/linux/control.c:28:
include/linux/fs.h:2052:13: note: expected ‘struct filename *’ but argument is of type ‘char *’

/tmp/vmware-root/modules/vmblock-only/linux/dentry.c:38:4: warning: (near initialization for ‘LinkDentryOps.d_revalidate’) [enabled by default]
/tmp/vmware-root/modules/vmblock-only/linux/dentry.c: In function ‘DentryOpRevalidate’:
/tmp/vmware-root/modules/vmblock-only/linux/dentry.c:104:7: warning: passing argument 2 of ‘actualDentry->d_op->d_revalidate’ makes integer from pointer without a cast [enabled by default]
/tmp/vmware-root/modules/vmblock-only/linux/dentry.c:104:7: note: expected ‘unsigned int’ but argument is of type ‘struct nameidata *’
/tmp/vmware-root/modules/vmblock-only/linux/inode.c:49:4: warning: initialization from incompatible pointer type [enabled by default]
/tmp/vmware-root/modules/vmblock-only/linux/inode.c:49:4: warning: (near initialization for ‘RootInodeOps.lookup’) [enabled by default]
  LD [M]  /tmp/vmware-root/modules/vmblock-only/vmblock.o
  Building modules, stage 2.
  MODPOST 1 modules
WARNING: "putname" [/tmp/vmware-root/modules/vmblock-only/vmblock.ko] undefined!
  CC      /tmp/vmware-root/modules/vmblock-only/vmblock.mod.o
  LD [M]  /tmp/vmware-root/modules/vmblock-only/vmblock.ko
make[1]: Leaving directory `/usr/src/linux-headers-3.8.0-27-generic'
make -C $PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= postbuild
make[1]: Entering directory `/tmp/vmware-root/modules/vmblock-only'
make[1]: `postbuild' is up to date.
make[1]: Leaving directory `/tmp/vmware-root/modules/vmblock-only'
cp -f vmblock.ko ./../vmblock.o
make: Leaving directory `/tmp/vmware-root/modules/vmblock-only'

!!! [EXPERIMENTAL] !!!
VMware automatic kernel modules enables automatic building and installation of
VMware kernel modules at boot they are not already present.  By selecting yes,
you will be enabling this experimental feature.  You can always disable this
feature by re-running vmware-config-tools.pl.

Would you like to enable VMware automatic kernel modules?
[no] 


Disabling timer-based audio scheduling in pulseaudio.



Detected X server version 1.13.3



Distribution provided drivers for Xorg X server are used.

Skipping X configuration because X drivers are not included.

Creating a new initrd boot image for the kernel.
update-initramfs: Generating /boot/initrd.img-3.8.0-27-generic
initctl: Job failed to start
Unable to start services for VMware Tools

Execution aborted.

crifan@ubuntu:vmware-tools-distrib$ 

做ln和打patch的过程:

crifan@ubuntu:Desktop$ sudo ln -s /usr/src/linux-headers-$(uname -r)/include/generated/uapi/linux/version.h /usr/src/linux-headers-$(uname -r)/include/linux/version.h
crifan@ubuntu:Desktop$ ls /usr/src/linux-headers-3.8.0-
linux-headers-3.8.0-19/         linux-headers-3.8.0-19-generic/ linux-headers-3.8.0-27/         linux-headers-3.8.0-27-generic/
crifan@ubuntu:Desktop$ ls /usr/src/linux-headers-3.8.0-27-generic/include/linux/ver -lha
vermagic.h  version.h   
crifan@ubuntu:Desktop$ ls /usr/src/linux-headers-3.8.0-27-generic/include/linux/version.h -lha
lrwxrwxrwx 1 root root 78 Aug 14 19:23 /usr/src/linux-headers-3.8.0-27-generic/include/linux/version.h -> /usr/src/linux-headers-3.8.0-27-generic/include/generated/uapi/linux/version.h
crifan@ubuntu:Desktop$ pwd
/home/crifan/Desktop
crifan@ubuntu:Desktop$ cd /home/crifan/develop/vmwaretools/
crifan@ubuntu:vmwaretools$ ls
VMwareTools-8.8.2-590212.tar.gz  VMwareTools-8.8.6-1035889.tar.gz  vmware-tools-distrib
crifan@ubuntu:vmwaretools$ mkdir patches
crifan@ubuntu:vmwaretools$ cd patches/
crifan@ubuntu:patches$ ls
crifan@ubuntu:patches$ wget http://cdn.philbayfield.com/downloads/vmware-vmhgfs.patch
--2013-08-14 19:34:43--  http://cdn.philbayfield.com/downloads/vmware-vmhgfs.patch
Resolving cdn.philbayfield.com (cdn.philbayfield.com)... 50.31.249.51
Connecting to cdn.philbayfield.com (cdn.philbayfield.com)|50.31.249.51|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1435 (1.4K) [application/octet-stream]
Saving to: ‘vmware-vmhgfs.patch’

100%[=================================================================================================>] 1,435       --.-K/s   in 0s      

2013-08-14 19:34:49 (99.3 MB/s) - ‘vmware-vmhgfs.patch’ saved [1435/1435]

crifan@ubuntu:patches$ wget http://cdn.philbayfield.com/downloads/vmware-vmci.patch
--2013-08-14 19:34:59--  http://cdn.philbayfield.com/downloads/vmware-vmci.patch
Resolving cdn.philbayfield.com (cdn.philbayfield.com)... 50.31.249.51
Connecting to cdn.philbayfield.com (cdn.philbayfield.com)|50.31.249.51|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 918 [application/octet-stream]
Saving to: ‘vmware-vmci.patch’

100%[=================================================================================================>] 918         --.-K/s   in 0s      

2013-08-14 19:34:59 (87.1 MB/s) - ‘vmware-vmci.patch’ saved [918/918]

crifan@ubuntu:patches$ ll -lha
total 16K
drwxrwxr-x 2 crifan crifan 4.0K Aug 14 19:34 ./
drwxrwxr-x 4 crifan crifan 4.0K Aug 14 19:34 ../
-rw-rw-r-- 1 crifan crifan  918 May 20 22:46 vmware-vmci.patch
-rw-rw-r-- 1 crifan crifan 1.5K May 20 22:46 vmware-vmhgfs.patch
crifan@ubuntu:patches$ cd ../
crifan@ubuntu:vmwaretools$ ls
patches  VMwareTools-8.8.2-590212.tar.gz  VMwareTools-8.8.6-1035889.tar.gz  vmware-tools-distrib
crifan@ubuntu:vmwaretools$ cd vmware-tools-distrib/
crifan@ubuntu:vmware-tools-distrib$ ls
bin  doc  etc  FILES  INSTALL  installer  lib  vmware-install.pl
crifan@ubuntu:vmware-tools-distrib$ cd /usr/lib/vmware-tools/modules/source/
crifan@ubuntu:source$ ls
legacy      vmblock.tar  vmhgfs.tar    vmsync.tar  vmxnet3_npa.tar  vmxnet.tar
pvscsi.tar  vmci.tar     vmmemctl.tar  vmwgfx.tar  vmxnet3.tar      vsock.tar
crifan@ubuntu:source$ sudo tar xf vmhgfs.tar 
crifan@ubuntu:source$ cd vmhgfs-only/shared/
crifan@ubuntu:shared$ sudo patch -p1 < ../
backdoor.c        cpName.h          file.c            hgfsEscape.c      inode.h           page.c            tcp.c
backdoorGcc32.c   cpNameInt.h       filesystem.c      hgfsEscape.h      link.c            request.c         transport.c
backdoorGcc64.c   cpNameLinux.c     filesystem.h      hgfs.h            Makefile          request.h         transport.h
backdoor.h        cpNameLite.c      fsutil.c          hgfsProto.h       Makefile.kernel   rpcout.c          vmci.c
backdoorInt.h     cpNameLite.h      fsutil.h          hgfsTransport.h   message.c         rpcout.h          vmci_sockets.h
bdhandler.c       dentry.c          hgfsBd.c          hgfsUtil.c        message.h         shared/           vmhgfs_version.h
COPYING           dir.c             hgfsBd.h          hgfsUtil.h        module.c          stubs.c           
cpName.c          escBitvector.h    hgfsDevLinux.h    inode.c           module.h          super.c           
crifan@ubuntu:shared$ sudo patch -p1 < ../../../
binary/      modules.xml  source/      
crifan@ubuntu:shared$ sudo patch -p1 < /home/crifan/develop/vmwaretools/patches/vmware-vmhgfs.patch 
patching file compat_mm.h
crifan@ubuntu:shared$ cd ../..
crifan@ubuntu:source$ sudo tar cf vmhgfs.tar vmhgfs-only/
crifan@ubuntu:source$ sudo tar xf vmci.tar 
crifan@ubuntu:source$ cd vmci-only/
crifan@ubuntu:vmci-only$ sudo path -p1 < /home/crifan/develop/vmwaretools/patches/vmware-vmci.patch 
sudo: path: command not found
crifan@ubuntu:vmci-only$ sudo patch -p1 < /home/crifan/develop/vmwaretools/patches/vmware-vmci.patch 
patching file linux/driver.c
Hunk #2 succeeded at 1741 (offset -9 lines).
Hunk #3 succeeded at 1969 (offset -9 lines).
crifan@ubuntu:vmci-only$ cd ..
crifan@ubuntu:source$ sudo tar cf vmci.tar vmci-only/
crifan@ubuntu:source$ 

 

4.再去重新安装一遍vmware tool,看看vmhgfs是否可以正常编译:

crifan@ubuntu:vmware-tools-distrib$ sudo ./vmware-install.pl 
The installer found the following conflicting packages installed on the system and will now remove them:

open-vm-tools

dpkg: warning: ignoring request to remove open-vm-tools, only the config
 files of which are on the system; use --purge to remove them too
A previous installation of VMware Tools has been detected.

The previous installation was made by the tar installer (version 4).

Keeping the tar4 installer database format.

You have a version of VMware Tools installed.  Continuing this install will 
first uninstall the currently installed version.  Do you wish to continue? 
(yes/no) [yes] 

Uninstalling the tar installation of VMware Tools.

Stopping services for VMware Tools

initctl: Unknown instance: 
File /usr/lib/vmware-tools/lib32/libconf/etc/gtk-2.0/gdk-pixbuf.loaders is 
backed up to 
/usr/lib/vmware-tools/lib32/libconf/etc/gtk-2.0/gdk-pixbuf.loaders.old.11.

File /usr/lib/vmware-tools/lib32/libconf/etc/pango/pangorc is backed up to 
/usr/lib/vmware-tools/lib32/libconf/etc/pango/pangorc.old.11.

This program previously created the file 
/usr/lib/vmware-tools/libconf/etc/pango/pangorc, and was about to remove it.  
Somebody else apparently did it already.

File /etc/vmware-tools/vmware-user.desktop is backed up to 
/etc/vmware-tools/vmware-user.desktop.old.11.

File /usr/lib/vmware-tools/lib32/libconf/etc/fonts/fonts.conf is backed up to 
/usr/lib/vmware-tools/lib32/libconf/etc/fonts/fonts.conf.old.9.

File /usr/lib/vmware-tools/modules/source/vmhgfs.tar is backed up to 
/usr/lib/vmware-tools/modules/source/vmhgfs.tar.old.0.

This program previously created the file 
/usr/lib/vmware-tools/lib32/libconf/etc/pango/pango.modules, and was about to 
remove it.  Somebody else apparently did it already.

This program previously created the file 
/usr/lib/vmware-tools/libconf/etc/gtk-2.0/gdk-pixbuf.loaders, and was about to 
remove it.  Somebody else apparently did it already.

File /usr/lib/vmware-tools/lib32/libconf/etc/gtk-2.0/gtk.immodules is backed up
to /usr/lib/vmware-tools/lib32/libconf/etc/gtk-2.0/gtk.immodules.old.11.

This program previously created the file 
/usr/lib/vmware-tools/libconf/etc/gtk-2.0/gtk.immodules, and was about to 
remove it.  Somebody else apparently did it already.

This program previously created the file 
/usr/lib/vmware-tools/lib32/libconf/etc/pango/pangox.aliases, and was about to 
remove it.  Somebody else apparently did it already.

File /usr/lib/vmware-tools/modules/source/vmci.tar is backed up to 
/usr/lib/vmware-tools/modules/source/vmci.tar.old.0.

This program previously created the directory 
/usr/lib/vmware-tools/modules/source, and was about to remove it. Since there 
are files in that directory that this program did not create, it will not be 
removed.

This program previously created the directory /usr/lib/vmware-tools/modules, 
and was about to remove it. Since there are files in that directory that this 
program did not create, it will not be removed.

update-initramfs: Generating /boot/initrd.img-3.8.0-27-generic
update-initramfs: Generating /boot/initrd.img-3.8.0-19-generic
The removal of VMware Tools 8.8.6 build-1035889 for Linux completed 
successfully.

Installing VMware Tools.

In which directory do you want to install the binary files? 
[/usr/bin] 

What is the directory that contains the init directories (rc0.d/ to rc6.d/)? 
[/etc] 

What is the directory that contains the init scripts? 
[/etc/init.d] 

In which directory do you want to install the daemon files? 
[/usr/sbin] 

In which directory do you want to install the library files? 
[/usr/lib/vmware-tools] 

In which directory do you want to install the documentation files? 
[/usr/share/doc/vmware-tools] 

The path "/usr/share/doc/vmware-tools" does not exist currently. This program 
is going to create it, including needed parent directories. Is this what you 
want? [yes] 

The installation of VMware Tools 8.8.6 build-1035889 for Linux completed 
successfully. You can decide to remove this software from your system at any 
time by invoking the following command: "/usr/bin/vmware-uninstall-tools.pl".

Before running VMware Tools for the first time, you need to configure it by 
invoking the following command: "/usr/bin/vmware-config-tools.pl". Do you want 
this program to invoke the command for you now? [yes] 

Initializing...


Making sure services for VMware Tools are stopped.



[EXPERIMENTAL] The VMware FileSystem Sync Driver (vmsync) is a new feature that
creates backups of virtual machines. Please refer to the VMware Knowledge Base 
for more details on this capability. Do you wish to enable this feature? 
[no] 


Before you can compile modules, you need to have the following installed... 

make
gcc
kernel headers of the running kernel


Searching for GCC...
Detected GCC binary at "/usr/bin/gcc".
The path "/usr/bin/gcc" appears to be a valid path to the gcc binary.
Would you like to change it? [no] 

Searching for a valid kernel header path...
Detected the kernel headers at "/lib/modules/3.8.0-27-generic/build/include".
The path "/lib/modules/3.8.0-27-generic/build/include" appears to be a valid 
path to the 3.8.0-27-generic kernel headers.
Would you like to change it? [no] 

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-root/modules/vmci-only'
make -C /lib/modules/3.8.0-27-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-3.8.0-27-generic'
  CC [M]  /tmp/vmware-root/modules/vmci-only/linux/driver.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/linux/vmciKernelIf.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciContext.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciDatagram.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciDoorbell.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciDriver.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciEvent.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciHashtable.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciQPair.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciQueuePair.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciResource.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciRoute.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/driverLog.o
/tmp/vmware-root/modules/vmci-only/linux/driver.c:127:4: error: implicit declaration of function ‘__devexit_p’ [-Werror=implicit-function-declaration]
/tmp/vmware-root/modules/vmci-only/linux/driver.c:127:4: error: initializer element is not constant
/tmp/vmware-root/modules/vmci-only/linux/driver.c:127:4: error: (near initialization for ‘vmci_driver.remove’)
/tmp/vmware-root/modules/vmci-only/linux/driver.c:1745:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘vmci_probe_device’
/tmp/vmware-root/modules/vmci-only/linux/driver.c:1973:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘vmci_remove_device’
/tmp/vmware-root/modules/vmci-only/linux/driver.c: In function ‘__check_disable_host’:
/tmp/vmware-root/modules/vmci-only/linux/driver.c:2498:1: warning: return from incompatible pointer type [enabled by default]
/tmp/vmware-root/modules/vmci-only/linux/driver.c: In function ‘__check_disable_guest’:
/tmp/vmware-root/modules/vmci-only/linux/driver.c:2501:1: warning: return from incompatible pointer type [enabled by default]
/tmp/vmware-root/modules/vmci-only/linux/driver.c: In function ‘__check_disable_msi’:
/tmp/vmware-root/modules/vmci-only/linux/driver.c:2504:1: warning: return from incompatible pointer type [enabled by default]
/tmp/vmware-root/modules/vmci-only/linux/driver.c: In function ‘__check_disable_msix’:
/tmp/vmware-root/modules/vmci-only/linux/driver.c:2507:1: warning: return from incompatible pointer type [enabled by default]
/tmp/vmware-root/modules/vmci-only/linux/driver.c: At top level:
/tmp/vmware-root/modules/vmci-only/linux/driver.c:119:12: warning: ‘vmci_probe_device’ used but never defined [enabled by default]
/tmp/vmware-root/modules/vmci-only/linux/driver.c:121:13: warning: ‘vmci_remove_device’ used but never defined [enabled by default]
/tmp/vmware-root/modules/vmci-only/linux/driver.c:2054:1: warning: ‘vmci_interrupt’ defined but not used [-Wunused-function]
/tmp/vmware-root/modules/vmci-only/linux/driver.c:2128:1: warning: ‘vmci_interrupt_bm’ defined but not used [-Wunused-function]
/tmp/vmware-root/modules/vmci-only/linux/driver.c:1708:1: warning: ‘vmci_enable_msix’ defined but not used [-Wunused-function]
cc1: some warnings being treated as errors
make[2]: *** [/tmp/vmware-root/modules/vmci-only/linux/driver.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [_module_/tmp/vmware-root/modules/vmci-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.8.0-27-generic'
make: *** [vmci.ko] Error 2
make: Leaving directory `/tmp/vmware-root/modules/vmci-only'

The communication service is used in addition to the standard communication 
between the guest and the host.  The rest of the software provided by VMware 
Tools is designed to work independently of this feature.
If you wish to have the VMCI feature, you can install the driver by running 
vmware-config-tools.pl again after making sure that gcc, binutils, make and the
kernel sources for your running kernel are installed on your machine. These 
packages are available on your distribution's installation CD.
[ Press Enter key to continue ] 

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-root/modules/vmci-only'
make -C /lib/modules/3.8.0-27-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-3.8.0-27-generic'
  CC [M]  /tmp/vmware-root/modules/vmci-only/linux/driver.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/linux/vmciKernelIf.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciContext.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciDatagram.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciDoorbell.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciDriver.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciEvent.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciHashtable.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciQPair.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciQueuePair.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciResource.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciRoute.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/driverLog.o
/tmp/vmware-root/modules/vmci-only/linux/driver.c:127:4: error: implicit declaration of function ‘__devexit_p’ [-Werror=implicit-function-declaration]
/tmp/vmware-root/modules/vmci-only/linux/driver.c:127:4: error: initializer element is not constant
/tmp/vmware-root/modules/vmci-only/linux/driver.c:127:4: error: (near initialization for ‘vmci_driver.remove’)
/tmp/vmware-root/modules/vmci-only/linux/driver.c:1745:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘vmci_probe_device’
/tmp/vmware-root/modules/vmci-only/linux/driver.c:1973:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘vmci_remove_device’
/tmp/vmware-root/modules/vmci-only/linux/driver.c: In function ‘__check_disable_host’:
/tmp/vmware-root/modules/vmci-only/linux/driver.c:2498:1: warning: return from incompatible pointer type [enabled by default]
/tmp/vmware-root/modules/vmci-only/linux/driver.c: In function ‘__check_disable_guest’:
/tmp/vmware-root/modules/vmci-only/linux/driver.c:2501:1: warning: return from incompatible pointer type [enabled by default]
/tmp/vmware-root/modules/vmci-only/linux/driver.c: In function ‘__check_disable_msi’:
/tmp/vmware-root/modules/vmci-only/linux/driver.c:2504:1: warning: return from incompatible pointer type [enabled by default]
/tmp/vmware-root/modules/vmci-only/linux/driver.c: In function ‘__check_disable_msix’:
/tmp/vmware-root/modules/vmci-only/linux/driver.c:2507:1: warning: return from incompatible pointer type [enabled by default]
/tmp/vmware-root/modules/vmci-only/linux/driver.c: At top level:
/tmp/vmware-root/modules/vmci-only/linux/driver.c:119:12: warning: ‘vmci_probe_device’ used but never defined [enabled by default]
/tmp/vmware-root/modules/vmci-only/linux/driver.c:121:13: warning: ‘vmci_remove_device’ used but never defined [enabled by default]
/tmp/vmware-root/modules/vmci-only/linux/driver.c:2054:1: warning: ‘vmci_interrupt’ defined but not used [-Wunused-function]
/tmp/vmware-root/modules/vmci-only/linux/driver.c:2128:1: warning: ‘vmci_interrupt_bm’ defined but not used [-Wunused-function]
/tmp/vmware-root/modules/vmci-only/linux/driver.c:1708:1: warning: ‘vmci_enable_msix’ defined but not used [-Wunused-function]
cc1: some warnings being treated as errors
make[2]: *** [/tmp/vmware-root/modules/vmci-only/linux/driver.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [_module_/tmp/vmware-root/modules/vmci-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.8.0-27-generic'
make: *** [vmci.ko] Error 2
make: Leaving directory `/tmp/vmware-root/modules/vmci-only'

The VM communication interface socket family is used in conjunction with the VM
communication interface to provide a new communication path among guests and 
host.  The rest of this software provided by VMware Tools is designed to work 
independently of this feature.  If you wish to have the VSOCK feature  you can 
install the driver by running vmware-config-tools.pl again after making sure 
that gcc, binutils, make and the kernel sources for your running kernel are 
installed on your machine. These packages are available on your distribution's 
installation CD.
[ Press the Enter key to continue.] 

The module vmxnet3 has already been installed on this system by another 
installer or package and will not be modified by this installer.  Use the flag 
--clobber-kernel-modules=vmxnet3 to override.

The module pvscsi has already been installed on this system by another 
installer or package and will not be modified by this installer.  Use the flag 
--clobber-kernel-modules=pvscsi to override.

The module vmmemctl has already been installed on this system by another 
installer or package and will not be modified by this installer.  Use the flag 
--clobber-kernel-modules=vmmemctl to override.

The VMware Host-Guest Filesystem allows for shared folders between the host OS 
and the guest OS in a Fusion or Workstation virtual environment.  Do you wish 
to enable this feature? [yes] 

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-root/modules/vmxnet-only'
make -C /lib/modules/3.8.0-27-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-3.8.0-27-generic'
  CC [M]  /tmp/vmware-root/modules/vmxnet-only/vmxnet.o
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:525:4: error: unknown field ‘get_rx_csum’ specified in initializer
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:525:4: warning: initialization from incompatible pointer type [enabled by default]
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:525:4: warning: (near initialization for ‘vmxnet_ethtool_ops.get_eeprom_len’) [enabled by default]
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:526:4: error: unknown field ‘set_rx_csum’ specified in initializer
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:526:4: warning: initialization from incompatible pointer type [enabled by default]
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:526:4: warning: (near initialization for ‘vmxnet_ethtool_ops.get_eeprom’) [enabled by default]
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:527:4: error: unknown field ‘get_tx_csum’ specified in initializer
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:527:4: warning: initialization from incompatible pointer type [enabled by default]
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:527:4: warning: (near initialization for ‘vmxnet_ethtool_ops.set_eeprom’) [enabled by default]
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:528:4: error: unknown field ‘set_tx_csum’ specified in initializer
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:528:4: warning: initialization from incompatible pointer type [enabled by default]
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:528:4: warning: (near initialization for ‘vmxnet_ethtool_ops.get_coalesce’) [enabled by default]
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:529:4: error: unknown field ‘get_sg’ specified in initializer
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:529:27: error: ‘ethtool_op_get_sg’ undeclared here (not in a function)
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:530:4: error: unknown field ‘set_sg’ specified in initializer
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:530:27: error: ‘ethtool_op_set_sg’ undeclared here (not in a function)
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:532:4: error: unknown field ‘get_tso’ specified in initializer
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:532:27: error: ‘ethtool_op_get_tso’ undeclared here (not in a function)
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:533:4: error: unknown field ‘set_tso’ specified in initializer
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:533:4: warning: initialization from incompatible pointer type [enabled by default]
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:533:4: warning: (near initialization for ‘vmxnet_ethtool_ops.get_pauseparam’) [enabled by default]
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:535:4: error: unknown field ‘get_ufo’ specified in initializer
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:535:27: error: ‘ethtool_op_get_ufo’ undeclared here (not in a function)
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c: In function ‘vmxnet_probe_device’:
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:1008:7: error: unknown field ‘ndo_set_multicast_list’ specified in initializer
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:1008:7: warning: initialization from incompatible pointer type [enabled by default]
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:1008:7: warning: (near initialization for ‘vmxnet_netdev_ops.ndo_vlan_rx_add_vid’) [enabled by default]
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c: In function ‘vmxnet_map_pkt’:
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:2085:32: error: incompatible type for argument 2 of ‘pci_map_page’
In file included from /usr/src/linux-headers-3.8.0-27-generic/arch/x86/include/asm/pci.h:148:0,
                 from include/linux/pci.h:1422,
                 from /tmp/vmware-root/modules/vmxnet-only/./shared/compat_pci.h:27,
                 from /tmp/vmware-root/modules/vmxnet-only/vmxnet.c:31:
include/asm-generic/pci-dma-compat.h:43:1: note: expected ‘struct page *’ but argument is of type ‘struct <anonymous>’
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:2104:26: error: incompatible type for argument 2 of ‘pci_map_page’
In file included from /usr/src/linux-headers-3.8.0-27-generic/arch/x86/include/asm/pci.h:148:0,
                 from include/linux/pci.h:1422,
                 from /tmp/vmware-root/modules/vmxnet-only/./shared/compat_pci.h:27,
                 from /tmp/vmware-root/modules/vmxnet-only/vmxnet.c:31:
include/asm-generic/pci-dma-compat.h:43:1: note: expected ‘struct page *’ but argument is of type ‘struct <anonymous>’
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c: In function ‘vmxnet_rx_frags’:
/tmp/vmware-root/modules/vmxnet-only/vmxnet.c:2599:48: error: incompatible types when assigning to type ‘struct <anonymous>’ from type ‘struct page *’
make[2]: *** [/tmp/vmware-root/modules/vmxnet-only/vmxnet.o] Error 1
make[1]: *** [_module_/tmp/vmware-root/modules/vmxnet-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.8.0-27-generic'
make: *** [vmxnet.ko] Error 2
make: Leaving directory `/tmp/vmware-root/modules/vmxnet-only'

The fast network device driver (vmxnet module) is used only for our fast 
networking interface. The rest of the software provided by VMware Tools is 
designed to work independently of this feature.
If you wish to have the fast network driver enabled, you can install the driver
by running vmware-config-tools.pl again after making sure that gcc, binutils, 
make and the kernel sources for your running kernel are installed on your 
machine. These packages are available on your distribution's installation CD.
[ Press Enter key to continue ] 

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-root/modules/vmblock-only'
make -C /lib/modules/3.8.0-27-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-3.8.0-27-generic'
  CC [M]  /tmp/vmware-root/modules/vmblock-only/linux/block.o
  CC [M]  /tmp/vmware-root/modules/vmblock-only/linux/control.o
  CC [M]  /tmp/vmware-root/modules/vmblock-only/linux/dbllnklst.o
  CC [M]  /tmp/vmware-root/modules/vmblock-only/linux/dentry.o
  CC [M]  /tmp/vmware-root/modules/vmblock-only/linux/file.o
  CC [M]  /tmp/vmware-root/modules/vmblock-only/linux/filesystem.o
  CC [M]  /tmp/vmware-root/modules/vmblock-only/linux/inode.o
  CC [M]  /tmp/vmware-root/modules/vmblock-only/linux/module.o
  CC [M]  /tmp/vmware-root/modules/vmblock-only/linux/stubs.o
  CC [M]  /tmp/vmware-root/modules/vmblock-only/linux/super.o
/tmp/vmware-root/modules/vmblock-only/linux/control.c: In function ‘ExecuteBlockOp’:
/tmp/vmware-root/modules/vmblock-only/linux/control.c:285:9: warning: assignment from incompatible pointer type [enabled by default]
/tmp/vmware-root/modules/vmblock-only/linux/control.c:296:4: warning: passing argument 1 of ‘putname’ from incompatible pointer type [enabled by default]
In file included from include/linux/proc_fs.h:5:0,
                 from /tmp/vmware-root/modules/vmblock-only/linux/control.c:28:
include/linux/fs.h:2052:13: note: expected ‘struct filename *’ but argument is of type ‘char *’
/tmp/vmware-root/modules/vmblock-only/linux/inode.c:49:4: warning: initialization from incompatible pointer type [enabled by default]
/tmp/vmware-root/modules/vmblock-only/linux/inode.c:49:4: warning: (near initialization for ‘RootInodeOps.lookup’) [enabled by default]
/tmp/vmware-root/modules/vmblock-only/linux/dentry.c:38:4: warning: initialization from incompatible pointer type [enabled by default]
/tmp/vmware-root/modules/vmblock-only/linux/dentry.c:38:4: warning: (near initialization for ‘LinkDentryOps.d_revalidate’) [enabled by default]
/tmp/vmware-root/modules/vmblock-only/linux/dentry.c: In function ‘DentryOpRevalidate’:
/tmp/vmware-root/modules/vmblock-only/linux/dentry.c:104:7: warning: passing argument 2 of ‘actualDentry->d_op->d_revalidate’ makes integer from pointer without a cast [enabled by default]
/tmp/vmware-root/modules/vmblock-only/linux/dentry.c:104:7: note: expected ‘unsigned int’ but argument is of type ‘struct nameidata *’
  LD [M]  /tmp/vmware-root/modules/vmblock-only/vmblock.o
  Building modules, stage 2.
  MODPOST 1 modules
WARNING: "putname" [/tmp/vmware-root/modules/vmblock-only/vmblock.ko] undefined!
  CC      /tmp/vmware-root/modules/vmblock-only/vmblock.mod.o
  LD [M]  /tmp/vmware-root/modules/vmblock-only/vmblock.ko
make[1]: Leaving directory `/usr/src/linux-headers-3.8.0-27-generic'
make -C $PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= postbuild
make[1]: Entering directory `/tmp/vmware-root/modules/vmblock-only'
make[1]: `postbuild' is up to date.
make[1]: Leaving directory `/tmp/vmware-root/modules/vmblock-only'
cp -f vmblock.ko ./../vmblock.o
make: Leaving directory `/tmp/vmware-root/modules/vmblock-only'

!!! [EXPERIMENTAL] !!!
VMware automatic kernel modules enables automatic building and installation of
VMware kernel modules at boot they are not already present.  By selecting yes,
you will be enabling this experimental feature.  You can always disable this
feature by re-running vmware-config-tools.pl.

Would you like to enable VMware automatic kernel modules?
[no] 


Disabling timer-based audio scheduling in pulseaudio.



Detected X server version 1.13.3



Distribution provided drivers for Xorg X server are used.

Skipping X configuration because X drivers are not included.

Creating a new initrd boot image for the kernel.
update-initramfs: Generating /boot/initrd.img-3.8.0-27-generic
vmware-tools start/running
The configuration of VMware Tools 8.8.6 build-1035889 for Linux for this 
running kernel completed successfully.

You must restart your X session before any mouse or graphics changes take 
effect.

You can now run VMware Tools by invoking "/usr/bin/vmware-toolbox-cmd" from the
command line or by invoking "/usr/bin/vmware-toolbox" from the command line 
during an X server session.

To enable advanced X features (e.g., guest resolution fit, drag and drop, and 
file and text copy/paste), you will need to do one (or more) of the following:
1. Manually start /usr/bin/vmware-user
2. Log out and log back into your desktop session; and,
3. Restart your X session.

Enjoy,

--the VMware team

crifan@ubuntu:vmware-tools-distrib$ 

结果很坑爹的发现:

根本就没去编译vmhgfs。。。

所以后续再去mount,根本没用:

crifan@ubuntu:vmware-tools-distrib$ ls /mnt/hgfs/
crifan@ubuntu:vmware-tools-distrib$ sudo mount -t vmhgfs .host:/ /mnt/hgfs
Error: cannot mount filesystem: No such device
crifan@ubuntu:vmware-tools-distrib$ 

5.然后去看了看安装脚本,其中是有vmhgfs的,然后发现,其是依赖于vmci:

#
# All the known modules that the config.pl script needs to
# know about.  Modules in this list are searched for when
# we check for non-vmware modules on the system.
#
my @cKernelModules = ('vmblock', 'vmhgfs', 'vmmemctl',
                      'vmxnet', 'vmci', 'vsock',
                      'vmsync', 'pvscsi', 'vmxnet3',
		      'vmwgfx');

#
# This list simply defined what modules need to be included
# in the system ramdisk when we rebuild it.
#
my %cRamdiskKernelModules = (vmxnet3 => 'yes',
			     pvscsi  => 'yes',
			     vmxnet  => 'yes');
#
# This defines module dependencies.  It is a temporary solution
# until we eventually move over to using the modules.xml file
# to get our dependency information.
#
my %cKernelModuleDeps = (vsock => ('vmci'),
			 vmhgfs => ('vmci'));

所以,没有去编译vmhgfs的原因应该是:

vmhgfs所依赖的vmci没有正常编译,所以也就不会去编译vmhgfs了。

6.所以还是要想办法,解决我此处的,为何vmci还是无法正常编译的问题:

【已解决】VMware Workstation 8下Ubuntu 13.04中安装VMware Tools出错:/tmp/vmware-root/modules/vmci-only/linux/driver.c:127:4: error: implicit declaration of function ‘__devexit_p’ [-Werror=implicit-function-declaration]

 

【总结】

最终,通过:

【已解决】VMware Workstation 8下Ubuntu 13.04中安装VMware Tools出错:/tmp/vmware-root/modules/vmci-only/linux/driver.c:127:4: error: implicit declaration of function ‘__devexit_p’ [-Werror=implicit-function-declaration]

而解决了问题。

实现了,直接安装vmware 本身自带的tools,经过一定的处理(对于version.h做个软连接,vmci.tar和vmhgfs.tar去打补丁),然后最后安装成功,使得:

剪贴板共享和文件夹共享都可用了。

转载请注明:在路上 » 【记录】继续折腾VMWare Workstation 8下的虚拟机Ubuntu 13.04中的文件夹共享

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
84 queries in 0.171 seconds, using 22.78MB memory