Hi,
I am using Workstation 16 Pro(Version 16.2.1 build-18811642) and on my Kali Linux VM, I can't mount a folder from my host OS which is Windows. This has worked for other virtual machines but not sure why this has stopped working.
This is how it looks in the VM settings(same as it looks for other VMs where it works to mount a folder from my host OS)
But nothing shows up here:
It does show up in /media/ folder but the folder is empty(it's not empty on the host OS):
Anyone have any ideas how I can solve this?
Hi,
There's a known issue with VMware Tools, perhaps the following snippet helps.
https://docs.vmware.com/en/VMware-Tools/11.3/rn/VMware-Tools-1130-Release-Notes.html
Excerpt:
VMware Tools Issues in VMware Workstation or Fusion
Shared Folders mount is unavailable on Linux VM. If the Shared Folders feature is enabled on a Linux VM while it is powered off, the shared folders mount is not available on restart.
Note: This issue is applicable to VMware Tools running on Workstation and Fusion.
Workaround:
If the VM is powered on, disable and enable the Shared Folders feature from the interface. For resolving the issue permanently, edit /etc/fstab and add an entry to mount the Shared Folders automatically on boot.
For example, add the line:
vmhgfs-fuse /mnt/hgfs fuse defaults,allow_other 0 0
also see:
https://kb.vmware.com/s/article/74650
--
Wil
Thanks for your answer. I added /etc/fstab with my mount folder and that line, but now I can't start the VM so that was not so good. See this error: https://imgur.com/bzdZIG7
Luckily, I got a backup of this VM and can restore it, and then try the instructions here https://kb.vmware.com/s/article/74650
Hi,
Not sure why you are getting that error.
Never seen that one before after editing /etc/fstab
I take it that you have installed vmware tools already?
You could try and customize the power-on script yourself, but I would have to look up where is located.
--
Wil
I followed this one https://kb.vmware.com/s/article/74650 , and after doing steps 1-5, it mounted the folder and I could view the contents of it. But then I rebooted the machine and wanted to see if it automatically mounted after reboot, but it did not. Then I got the following messages:
sudo systemctl start mnt-hgfs.mount
Failed to start mnt-hgfs.mount: Unit mnt-hgfs.mount has a bad unit file setting.
See system logs and 'systemctl status mnt-hgfs.mount' for details.
systemctl status mnt-hgfs.mount
● mnt-hgfs.mount - VMware mount for SharedFolder
Loaded: bad-setting (Reason: Unit mnt-hgfs.mount has a bad unit file setting.)
Active: inactive (dead)
Where: /mnt/sf_SharedFolder
What: vmhgfs-fuse
Do you have any ideas about why it gives this error now but worked before a reboot? Once I fix this, it's gonna work after reboot and then everything is solved so we are soon there.
Hi,
No sorry I don't know.
I do not use systemd for this myself, I only provided it because VMware recommends that article.
If I do not really have to use systemd I steer clear from it.
In my linux VM's the /etc/fstab solution works well.
--
Wil
Hi,
I'm still wondering what went wrong in the first place..
Did you create the folder to mount hgfs at before hand?
eg. can you try this:
sudo mkdir -p /mnt/hgfs/
sudo /usr/bin/vmhgfs-fuse .host:/ /mnt/hgfs/ -o subtype=vmhgfs-fuse,allow_other
Does that create the shared folder so you can at least use it?
--
Wil
Yeah that works and then I can use it and see the files if I run those commands. But I can't see the files after a reboot. But that's fine for now I guess, I'll just save and run those commands every time I boot the VM or when I need to use a shared folder.
Thanks a lot for your help, appreciate it!
Hi,
I have to look at this later on myself as I note that I commented out the /etc/fstab line in my debian.
Sigh.. perhaps I did have the same thing like you, but just forgot about it as I don't use that VM often nowadays.
FWIW, the default poweron script it complains about can be found under /etc/vmware-tools
--
Wil
Which default poweron script do you mean? Should I change anything in that folder?
Normally the default should be OK.
Just pointing to the location where it probably goes wrong when looking at the screenshot you provided earlier on.
Too much other stuff going on for me now to chase it down myself.
-
Wil