VMware Communities
pagcal
Contributor
Contributor

mount -t vmhgfs .host:/share /mnt/hgfs/share fails with 'no such device' on RedHat

mount -t vmhgfs .host:/share /mnt/hgfs/share fails with 'no such device' on RedHat

I've shared c:/share from vmware on XP, but then after I boot RedHat, I can't mount the share device. The mount command reports 'no such device'.

I'm running the latest vmware workstation from your site.

Any ideas? How would I troubleshoot this?

Thanks in advance

Tags (1)
Reply
0 Kudos
11 Replies
AWo
Immortal
Immortal

Are the VMware Tools installed within your guest? Without them, there are no Shared Folders available (in detail you need the vmhgfs module).

AWo

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
Reply
0 Kudos
pagcal
Contributor
Contributor

vmware tools were installed.

If I run 'vmware-hgfsclient', it prints out 'share' on the next line then exits. So it can see the share.

Reply
0 Kudos
pagcal
Contributor
Contributor

Original command line: "/sbin/mount.vmhgfs -v -o rw .host:/buildshare /mnt/hgfs/buildshare"

Host component of share name is ".host"

Directory component of share name is "/buildshare"

Parsing option string: rw

Setting mount read-write

Error: cannot mount filesystem: No such device

Reply
0 Kudos
AWo
Immortal
Immortal

If I unload the vmhgfs module and enter "vmware-hgfsclient" it shows me my share, too. Nevertheless I can't mount it (no such dev).

Check if "vmhgfs" is loaded (lsmod | grep "vm.")

AWo

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
Reply
0 Kudos
pagcal
Contributor
Contributor

no load, build failed,

# make

Using 2.6.x kernel build system.

make -C /lib/modules/2.6.24.3-12.fc8/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules

make[1]: Entering directory `/usr/src/kernels/2.6.24.3-12.fc8-i686'

CC /usr/lib/vmware-tools/modules/source/vmhgfs-only/backdoor.o

CC /usr/lib/vmware-tools/modules/source/vmhgfs-only/backdoorGcc32.o

CC /usr/lib/vmware-tools/modules/source/vmhgfs-only/bdhandler.o

CC /usr/lib/vmware-tools/modules/source/vmhgfs-only/cpName.o

In file included from include/linux/string.h:12,

from /usr/lib/vmware-tools/modules/source/vmhgfs-only/cpName.h:19,

from /usr/lib/vmware-tools/modules/source/vmhgfs-only/cpName.c:19:

include/linux/types.h:40: error: conflicting types for ‘uintptr_t’

/usr/lib/vmware-tools/modules/source/vmhgfs-only/vm_basic_types.h:170: error: previous declaration of ‘uintptr_t’ was here

make[2]: *** Error 1

make[1]: *** Error 2

make[1]: Leaving directory `/usr/src/kernels/2.6.24.3-12.fc8-i686'

make: *** http://vmhgfs.ko Error 2

#

Reply
0 Kudos
pagcal
Contributor
Contributor

I finally got it to compile.

Basically, change uintptr_t to a type of unsigned long, then in types.h and in vm_basic_types.h, use the HACKAROO as follows:

#if !defined(BIG_HACKAROO)

#define BIG_HACKAROO 1

typedef unsigned long uintptr_t;

#endif

I also had to add the hack to +260 or so in vm_basic_types.h

yuck, yuck, yuck - I ought to be shot.

Reply
0 Kudos
pagcal
Contributor
Contributor

Then, setup the resultant ko file as follows and you are good to go

/lib/modules/2.6.24.3-12.fc8/misc

# ls -l

total 2168

lrwxrwxrwx 1 root root 43 2008-04-24 09:49 vmblock.ko -> /lib/modules/2.6.24.3-12.fc8/misc/vmblock.o

-rw-rr 1 root root 729932 2008-04-24 09:49 vmblock.o

lrwxrwxrwx 1 root root 42 2008-04-24 12:08 vmhgfs.ko -> /lib/modules/2.6.24.3-12.fc8/misc/vmhgfs.o

-rw-rr 1 root root 1140481 2008-04-24 12:07 vmhgfs.o

lrwxrwxrwx 1 root root 44 2008-04-24 09:48 vmmemctl.ko -> /lib/modules/2.6.24.3-12.fc8/misc/vmmemctl.o

-rw-rr 1 root root 130199 2008-04-24 09:48 vmmemctl.o

lrwxrwxrwx 1 root root 42 2008-04-24 09:49 vmxnet.ko -> /lib/modules/2.6.24.3-12.fc8/misc/vmxnet.o

-rw-rr 1 root root 192775 2008-04-24 09:49 vmxnet.o

#

Reply
0 Kudos
pagcal
Contributor
Contributor

Kit as provided by vmware has problems with uintptr_t definition. A work around is provided.

Reply
0 Kudos
AWo
Immortal
Immortal

Of course not "unloaded", but still "not loaded" because "not compiled". That would have been the next thing to look if it was compiled at all. But you figured out yourself.

AWo

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
Reply
0 Kudos
pagcal
Contributor
Contributor

I've attached the loadable module I ended up building. It seems to work fine for RedHat 8.

Reply
0 Kudos
AWo
Immortal
Immortal

There are several hints what to edit in the source for different Distro's and versions.

Just google for it...

AWo

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
Reply
0 Kudos