VMware Communities
dch53
Contributor
Contributor
Jump to solution

How to mount a Windows share in a Linux guest permanently?

Hi. I set up an openSUSE_Leap15.2 VM setup on a Windows 10 host with the intention of learning about Linux.

Mounting Shared Folders in a Linux Guest describes how to mount a host share in a Linux guest. I have Shared Folder enabled and a host folder shared with name "foo". In my guest I have created the folder "Share" in my Home directory.

I'm sure I got mount -t vmhgfs .host:/foo /Home/Share/foo

to work yesterday. Today, the folder "Share" is there but is empty. Attempts to rerun this command result in

Error: cannot canonicalize mount point: No such file or directory

which sadly means nothing to me.

What is the correct syntax please and how to I get the mounted share to still be mounted after restarting the VM?

Thanks.

Reply
0 Kudos
1 Solution
9 Replies
ajgringo619
Hot Shot
Hot Shot
Jump to solution

I think the mountpoint should have a lower-case /home; everything else looks correct.

Does /home/share/foo exist?

Reply
0 Kudos
dch53
Contributor
Contributor
Jump to solution

Thanks for the reply. I've just checked and I'm working with a kernel later than 4.0. So, the command I should be using is

/usr/bin/vmhgfs-fuse .host:/foo /tmp/foo -o subtype=vmhgfs-fuse,allow_other

which I have as:

/usr/bin/vmhgfs-fuse .host:/foo /Home/foo -o subtype=vmhgfs-fuse,allow_other

Now I get

fuse: bad mount point `/Home/foo': No such file or directory

It doesn't make a difference whether I capitalise the H on Home or not. The directory "foo" exists.

I should have made careful note of what I did yesterday that worked!

 

 

Reply
0 Kudos
ajgringo619
Hot Shot
Hot Shot
Jump to solution

OK, here's what I did to get a VMware-shared directory mounted on EnvdeavourOS:

$ sudo vmhgfs-fuse .host:/shared /mnt -o allow_other -o uid=1000

Reply
0 Kudos
dch53
Contributor
Contributor
Jump to solution

Thanks. I ran that and there were no errors. Where does that command mount the share too?

Reply
0 Kudos
ajgringo619
Hot Shot
Hot Shot
Jump to solution

/mnt. I used it because I knew it would exist. I had switched to NFS awhile back, so I'd removed the /etc/fstab entry I had created for this.

Hmmm... did you copy my command verbatim? You need to change shared to whatever your VMware shared folder is called, and replace /mnt with where you want it mounted.

Reply
0 Kudos
dch53
Contributor
Contributor
Jump to solution

OK. I was able to get this to work as su:

/usr/bin/vmhgfs-fuse .host:/foo /home/opensuse/Share -o subtype=vmhgfs-fuse,allow_other

Folder foo was created in folder Share.

Reply
0 Kudos
dch53
Contributor
Contributor
Jump to solution

However, when I reboot, I have to run the command again. Is there any way of getting the mount to persist between reboots?

Reply
0 Kudos
dch53
Contributor
Contributor
Jump to solution

Thanks very much. I had to search on how to modify /etc/fstab with elevated privileges so I could save it but once I found that it worked perfectly.

Reply
0 Kudos