Vmtools problem solving for folder sharing between development host and Linux virtual machine after installation

Source: Internet
Author: User

Previously used ubuntu12.04 has been no problem. Recent WHIM update the version to the latest after discovering that the shared folder is not available. So just reinstall the Vmtools. But in compiling the Vmhgfs times wrong. The error is as follows:

  

In file included from./arch/x86/include/asm/percpu.h:44:0, from./arch/x86/include/asm/preempt.h:5, From Include/linux/preempt.h:18, from Include/linux/spinlock.h:50, from include                 /linux/mmzone.h:7, from Include/linux/gfp.h:5, from Include/linux/mm.h:9, From Include/linux/pagemap.h:7, FROM/TMP/MODCONFIG-P8BMWH/VMHGFS-ONLY/INODE.C:29:/TMP/MODCONFIG-P8BMWH/VM hgfs-only/inode.c:in function ' hgfspermission ': include/linux/kernel.h:834:27:error: ' struct dentry ' has no member                            Named ' D_alias ' Const typeof (((type *) 0)->member) *__mptr = (PTR); ^include/linux/list.h:687:40:note:in expansion of macro ' container_of ' #define hlist_entry (PTR, type, member) container _of (Ptr,type,member) ^include/linux/list.h:698:15:note:in expansion of macro ' HLI St_entry ' ____ptr? Hlist_entry (____ptr, type, MEmber): NULL;  

According to the printed information you can know that the struct dentry has no member D_alias in the Hgfspermission function. That's strange. Surfing the internet for the next reason is that VMware's Vmhgfs module has a bug in the latest release version of Unbutu. The installation needs to be patched or manually modified. The following explains how to change the manual modification.

1. Go to the location of the source code in VM tools

CD Vmware-tools-distrib/lib/modules/source  

2. Unzip the Vmhgfs.tar

sudo tar xf Vmhgfs.tar

3. Modify the file inode.c

Check the kernel version first. I'm here, 3.16.0.

uname  -alinux ubuntu 3.16.0-38-generic #52-ubuntu SMP Thu May 7 10:51:21 UTC x86_64 x86_64 x86_64 gnu/linux

Modify Vmhggs.tar extracted file inode.c. Go to the Vmhgfs-only folder. Modify with Vim or gedit

Line 1925th

#if Linux_version_code < Kernel_version (3, 0)                           d_alias) {#else                           d_u.d_alias) {#endif

Line 1983th

#if Linux_version_code < Kernel_version (3, 0)         struct dentry *dentry = list_entry (pos, struct dentry, d_alias); else         struct Dentry *dentry = list_entry (pos, struct dentry, d_u.d_alias); #endif

3. Back up the original Vmhgfs.tar after the file has been modified

MV Vmhgfs.tar Vmhgfs.tar.orig

4. RePack, create new Vmhgfs.tar with modified source code

Tar CF Vmhgfs.tar Vmhgfs-only

5. Follow the previous steps to reinstall.

Vmtools problem solving for folder sharing between development host and Linux virtual machine after installation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.