VMware Communities
psue
Contributor
Contributor

Anyone able to get Shared Folders working? (Guest: Fedora 21 ; Host: Windows 7 Pro; Workstation 11)

As the title says, I get an error when I try to add a shared folder.  If I try to manually mount, I get:

Error: cannot mount filesystem: No such device

VMWare Tools built OK; DnD work OK; copy-and-paste work OK.

Shared folders work OK on my Ubuntu 14.10 guest.

Thanks,

Paul

18 Replies
bonnie201110141
VMware Employee
VMware Employee

Please paste the tools version of Fedora 21 by executing "vmtoolsd -v" in guest. It might be caused that you did not have vmware-tools installed. Instead, you are running open-vm-tools in guest which don't have shared folder installed.

If you don't have vmware-tools installed, you should manually install it in either of two ways:

1) Uninstall open-vm-tools, and install vmware-tools

2) Install vmware-tools in compability mode (i.e. without uninstall open-vm-tools).

To install vmware-tools, you need to have GCC and kernel headers installed.

Reply
0 Kudos
watcher1
Enthusiast
Enthusiast

I have the same problem with a Fedora 21 guest. I've uninstalled open-vm-tools. Shared folders still error out on the vmware-tools compile. I've tried this on both a Windows and a Linux host, same problem!

Reply
0 Kudos
bonnie201110141
VMware Employee
VMware Employee

Can you paste the console message when you install vmware-tools? Have you installed GCC, kernel headers in guest?

Reply
0 Kudos
watcher1
Enthusiast
Enthusiast

Searching for GCC...

Detected GCC binary at "/bin/gcc".

The path "/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.17.8-300.fc21.x86_64/build/include".

The path "/lib/modules/3.17.8-300.fc21.x86_64/build/include" appears to be a

valid path to the 3.17.8-300.fc21.x86_64 kernel headers.

Would you like to change it? [no]

make: Entering directory '/tmp/modconfig-UbojCM/vmhgfs-only'

Using kernel build system.

/bin/make -C /lib/modules/3.17.8-300.fc21.x86_64/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \

  MODULEBUILDDIR= modules

make[1]: Entering directory '/usr/src/kernels/3.17.8-300.fc21.x86_64'

  CC [M]  /tmp/modconfig-UbojCM/vmhgfs-only/backdoorGcc64.o

  CC [M]  /tmp/modconfig-UbojCM/vmhgfs-only/message.o

  CC [M]  /tmp/modconfig-UbojCM/vmhgfs-only/dir.o

  CC [M]  /tmp/modconfig-UbojCM/vmhgfs-only/request.o

  CC [M]  /tmp/modconfig-UbojCM/vmhgfs-only/hgfsUtil.o

  CC [M]  /tmp/modconfig-UbojCM/vmhgfs-only/cpName.o

  CC [M]  /tmp/modconfig-UbojCM/vmhgfs-only/link.o

  CC [M]  /tmp/modconfig-UbojCM/vmhgfs-only/rpcout.o

  CC [M]  /tmp/modconfig-UbojCM/vmhgfs-only/module.o

  CC [M]  /tmp/modconfig-UbojCM/vmhgfs-only/stubs.o

  CC [M]  /tmp/modconfig-UbojCM/vmhgfs-only/file.o

  CC [M]  /tmp/modconfig-UbojCM/vmhgfs-only/transport.o

  CC [M]  /tmp/modconfig-UbojCM/vmhgfs-only/super.o

  CC [M]  /tmp/modconfig-UbojCM/vmhgfs-only/bdhandler.o

  CC [M]  /tmp/modconfig-UbojCM/vmhgfs-only/fsutil.o

  CC [M]  /tmp/modconfig-UbojCM/vmhgfs-only/cpNameLinux.o

  CC [M]  /tmp/modconfig-UbojCM/vmhgfs-only/hgfsBd.o

  CC [M]  /tmp/modconfig-UbojCM/vmhgfs-only/filesystem.o

  CC [M]  /tmp/modconfig-UbojCM/vmhgfs-only/page.o

  CC [M]  /tmp/modconfig-UbojCM/vmhgfs-only/backdoor.o

  CC [M]  /tmp/modconfig-UbojCM/vmhgfs-only/hgfsEscape.o

  CC [M]  /tmp/modconfig-UbojCM/vmhgfs-only/inode.o

  CC [M]  /tmp/modconfig-UbojCM/vmhgfs-only/dentry.o

  CC [M]  /tmp/modconfig-UbojCM/vmhgfs-only/cpNameLite.o

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-UbojCM/vmhgfs-only/inode.c:29:

/tmp/modconfig-UbojCM/vmhgfs-only/inode.c: In function ‘HgfsPermission’:

include/linux/kernel.h:830: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 ‘hlist_entry’

     ____ptr ? hlist_entry(____ptr, type, member) : NULL; \

               ^

include/linux/list.h:708:13: note: in expansion of macro ‘hlist_entry_safe’

  for (pos = hlist_entry_safe((head)->first, typeof(*(pos)), member);\

             ^

/tmp/modconfig-UbojCM/vmhgfs-only/inode.c:1920:7: note: in expansion of macro ‘hlist_for_each_entry’

       hlist_for_each_entry(dentry,

       ^

include/linux/kernel.h:830:48: warning: initialization from incompatible pointer type

  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 ‘hlist_entry’

     ____ptr ? hlist_entry(____ptr, type, member) : NULL; \

               ^

include/linux/list.h:708:13: note: in expansion of macro ‘hlist_entry_safe’

  for (pos = hlist_entry_safe((head)->first, typeof(*(pos)), member);\

             ^

/tmp/modconfig-UbojCM/vmhgfs-only/inode.c:1920:7: note: in expansion of macro ‘hlist_for_each_entry’

       hlist_for_each_entry(dentry,

       ^

In file included from include/linux/compiler-gcc.h:106:0,

                 from include/linux/compiler.h:54,

                 from include/uapi/linux/stddef.h:1,

                 from include/linux/stddef.h:4,

                 from ./include/uapi/linux/posix_types.h:4,

                 from include/uapi/linux/types.h:13,

                 from include/linux/types.h:5,

                 from /tmp/modconfig-UbojCM/vmhgfs-only/./shared/driver-config.h:71,

                 from /tmp/modconfig-UbojCM/vmhgfs-only/inode.c:26:

include/linux/compiler-gcc4.h:14:34: error: ‘struct dentry’ has no member named ‘d_alias’

#define __compiler_offsetof(a,b) __builtin_offsetof(a,b)

                                  ^

include/linux/stddef.h:17:31: note: in expansion of macro ‘__compiler_offsetof’

#define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER)

                               ^

include/linux/kernel.h:831:29: note: in expansion of macro ‘offsetof’

  (type *)( (char *)__mptr - offsetof(type,member) );})

                             ^

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 ‘hlist_entry’

     ____ptr ? hlist_entry(____ptr, type, member) : NULL; \

               ^

include/linux/list.h:708:13: note: in expansion of macro ‘hlist_entry_safe’

  for (pos = hlist_entry_safe((head)->first, typeof(*(pos)), member);\

             ^

/tmp/modconfig-UbojCM/vmhgfs-only/inode.c:1920:7: note: in expansion of macro ‘hlist_for_each_entry’

       hlist_for_each_entry(dentry,

       ^

In file included from include/linux/preempt.h:10:0,

                 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-UbojCM/vmhgfs-only/inode.c:29:

include/linux/list.h:710:35: error: ‘struct dentry’ has no member named ‘d_alias’

       pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))

                                   ^

include/linux/list.h:697:12: note: in definition of macro ‘hlist_entry_safe’

  ({ typeof(ptr) ____ptr = (ptr); \

            ^

/tmp/modconfig-UbojCM/vmhgfs-only/inode.c:1920:7: note: in expansion of macro ‘hlist_for_each_entry’

       hlist_for_each_entry(dentry,

       ^

include/linux/list.h:710:35: error: ‘struct dentry’ has no member named ‘d_alias’

       pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))

                                   ^

include/linux/list.h:697:28: note: in definition of macro ‘hlist_entry_safe’

  ({ typeof(ptr) ____ptr = (ptr); \

                            ^

/tmp/modconfig-UbojCM/vmhgfs-only/inode.c:1920:7: note: in expansion of macro ‘hlist_for_each_entry’

       hlist_for_each_entry(dentry,

       ^

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-UbojCM/vmhgfs-only/inode.c:29:

include/linux/kernel.h:830: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 ‘hlist_entry’

     ____ptr ? hlist_entry(____ptr, type, member) : NULL; \

               ^

include/linux/list.h:710:13: note: in expansion of macro ‘hlist_entry_safe’

       pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))

             ^

/tmp/modconfig-UbojCM/vmhgfs-only/inode.c:1920:7: note: in expansion of macro ‘hlist_for_each_entry’

       hlist_for_each_entry(dentry,

       ^

include/linux/kernel.h:830:48: warning: initialization makes pointer from integer without a cast

  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 ‘hlist_entry’

     ____ptr ? hlist_entry(____ptr, type, member) : NULL; \

               ^

include/linux/list.h:710:13: note: in expansion of macro ‘hlist_entry_safe’

       pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))

             ^

/tmp/modconfig-UbojCM/vmhgfs-only/inode.c:1920:7: note: in expansion of macro ‘hlist_for_each_entry’

       hlist_for_each_entry(dentry,

       ^

In file included from include/linux/compiler-gcc.h:106:0,

                 from include/linux/compiler.h:54,

                 from include/uapi/linux/stddef.h:1,

                 from include/linux/stddef.h:4,

                 from ./include/uapi/linux/posix_types.h:4,

                 from include/uapi/linux/types.h:13,

                 from include/linux/types.h:5,

                 from /tmp/modconfig-UbojCM/vmhgfs-only/./shared/driver-config.h:71,

                 from /tmp/modconfig-UbojCM/vmhgfs-only/inode.c:26:

include/linux/compiler-gcc4.h:14:34: error: ‘struct dentry’ has no member named ‘d_alias’

#define __compiler_offsetof(a,b) __builtin_offsetof(a,b)

                                  ^

include/linux/stddef.h:17:31: note: in expansion of macro ‘__compiler_offsetof’

#define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER)

                               ^

include/linux/kernel.h:831:29: note: in expansion of macro ‘offsetof’

  (type *)( (char *)__mptr - offsetof(type,member) );})

                             ^

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 ‘hlist_entry’

     ____ptr ? hlist_entry(____ptr, type, member) : NULL; \

               ^

include/linux/list.h:710:13: note: in expansion of macro ‘hlist_entry_safe’

       pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))

             ^

/tmp/modconfig-UbojCM/vmhgfs-only/inode.c:1920:7: note: in expansion of macro ‘hlist_for_each_entry’

       hlist_for_each_entry(dentry,

       ^

scripts/Makefile.build:257: recipe for target '/tmp/modconfig-UbojCM/vmhgfs-only/inode.o' failed

make[2]: *** [/tmp/modconfig-UbojCM/vmhgfs-only/inode.o] Error 1

make[2]: *** Waiting for unfinished jobs....

Makefile:1377: recipe for target '_module_/tmp/modconfig-UbojCM/vmhgfs-only' failed

make[1]: *** [_module_/tmp/modconfig-UbojCM/vmhgfs-only] Error 2

make[1]: Leaving directory '/usr/src/kernels/3.17.8-300.fc21.x86_64'

Makefile:120: recipe for target 'vmhgfs.ko' failed

make: *** [vmhgfs.ko] Error 2

make: Leaving directory '/tmp/modconfig-UbojCM/vmhgfs-only'

The filesystem driver (vmhgfs module) is used only for the shared folder

feature. The rest of the software provided by VMware Tools is designed to work

independently of this feature.

If you wish to have the shared folders 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 ]

Reply
0 Kudos
bonnie201110141
VMware Employee
VMware Employee

Thank you for your post! I think there might be some bug here. I will report the issue internally.

Reply
0 Kudos
bonnie201110141
VMware Employee
VMware Employee

I found that Fedora 21 GA build (3.17.4-301.fc21) works well with HGFS. You kernel 3.17.8-300 is newer. You might have to go back to 3.17.4 for HGFS to work.

Reply
0 Kudos
watcher1
Enthusiast
Enthusiast

I found the fix for Workstation 11:

Moved fix to other patch · 3a392a5 · rasa/vmware-tools-patches · GitHub

.../vmware-tools-distrib/lib/modules/source/vmhgfs.tar

                                                                      |

                                                               vmhgfs-only

                                                                      |

                                                               inode.c

                                                                      |

                                                               Line # 1925

Change:    d_alias) {

to:            d_u.d_alias) {

tar it back up and run the installer!

arborrhythms
Contributor
Contributor

I have verified watcher1's solution using VMWare Fusion.

Host: Mac Yosemite

Guest: Ubuntu 14.04 (linux kernel 3.13+)

Reply
0 Kudos
MostTornBrain
Contributor
Contributor

Also line 1978 needs a similar renaming change.

chadwillman
Contributor
Contributor

Same failure when I installed VMware Tools 9.9.2 build-2496486 in my Ubuntu 14.04 LTS under Fusion.

Reply
0 Kudos
sdevilcry
Contributor
Contributor

Ok so I succeed with hgfs installation.

I uncompressed the "vmware-tools-distrib/lib/modules/source/vmhgfs.tar" with "tar cvf" command
then I used this command in my vim editor : ":%s/d_alias/d_u.d_alias/g" to replace any d_alias with his own new structure.
And finally just compress back the folder with : "tar cvf vmhgfs.tar vmhgfs-only" command

I restart the installer from the vmware-tools-distrib folder and now I can access to my shared folder.

Don't worry if, just after the compilation the HGFS service display as failed, it's (normally) because you didn't add any share to your vmware settings. Add it and it will show up in your /mnt/hgfs/ folder

The VMwareTools version is : VMwareTools-9.9.2-2496486.tar.gz

Hope It could help some of you Smiley Happy

Reply
0 Kudos
DingoTaz
Enthusiast
Enthusiast

Thank you for looking into this but this is not an answer. Other people have hacked things to make it work, VMware is too slow to respond to customer needs. VMware tools has a number of issues under fedora 21 and we need updates for the tools faster than waiting 3 months or so for workstation updates to come through.

Reply
0 Kudos
watcher1
Enthusiast
Enthusiast

No longer works with update to kernel 3.18.7-200.fc21.x86_64.

VMware, a little support please!

Reply
0 Kudos
coleman007
Contributor
Contributor

Using kernel-3.17.4-301.fc21.x86_64, shared folders worked like a champ and the kernel is still available via yum. No compile issues.

Reply
0 Kudos
coleman007
Contributor
Contributor

Try out the site:rasa/vmware-tools-patches · GitHub

I tried it with the new kernel and no problem.

Reply
0 Kudos
sdevilcry
Contributor
Contributor

Guys, look to my fix I wrote before.

Here is another link where I gave a solution :

Ubuntu 14.04.02 vmhgfs compile failure (VMwareTools-9.9.2-2496486) · Issue #29 · rasa/vmware-tools-p...

Regards

Reply
0 Kudos
davehodg
Contributor
Contributor

Same here. Thanks for this.

Reply
0 Kudos
arborrhythms
Contributor
Contributor

Oh, and after you mount them, they will probably mount as the wrong user (unless your MAC UID and GID are the same as your Linux UID and GID).

So do these commands to fix VMWare's mounting script (which I found on another web site):

  1. sudo vim /etc/vmware-tools/services.sh
  2. locate the vmware_mount_vmhgfs function
  3. Set the appropriate uid and gid.  We'll use 1000, as Ubuntu assigns these to the first user / group:
    -o uid=1000,gid=1000 to the mount command:

    vmware_exec_selinux "mount -t vmhgfs .host:/ $vmhgfs_mnt -o uid=1000,gid=1000"

  4. Save the file and reboot your VM
Reply
0 Kudos