MXLinux 18.2 (sysvinit): open-vm-tools does not retain shared folder access from to Windows 10 guest system
Hello, I am somewhat new to open-vm-tools and MXLinux and thought I would report an issue I've encountered using open-vm-tools with MX Linux 18.2.
Problem Statement: After successfully establishing access from the guest OS to a 'sharedFolder' (residing on the host OS), I am not able to re-establish the connection to the 'sharedFolder' following rebooting the MX Linux 18.2 guest OS in the virtual machine (VMWare Workstation 15 Pro).
-
VMTools w/ sysvinit on boot: works
-
VMTools w/ systemd on boot: works
-
open-vm-tools w/ systemd on boot: works
-
open-vm-tools w/sysvinit on boot: does not work
Steps to reproduce the problem:
- Created a VM instance in VMWare - 4GB RAM / 2 cores
- Install MXLinux 18.2 (April 7, 2019 Version) in the VM - I used 20GB
- Reboot
- Installed "open-vm-tools" and "open-vm-tools-desktop" from the "Stable Repo"
- Set a shared folder, 'sharedFolder', in VMWare
- Check /mnt/hgfs/sharedFolder and confirmed that it's there. It initially appears to work and I can see the files in the folder. So, it works the first time.
- Reboot
- Check /mnt/hgfs/sharedFolder and it is no longer present. I can see /mnt/hgfs only. It does not work following the reboot and I cannot access the sharedFolder.
(Note: I have also tried the latest 10.3.10 version from the Backports repository and observe the same behavior as with 10.1.5 from the Stable repository - see Step 4 above).
I've also added the following line to etc/fstab, but I can't see that it's doing anything. .host:/sharedFolder /media/sharedFolder fuse.vmhgfs-fuse allow_other nofail 0 0
Important note: MX Linux, by default, runs sysvinit. Based on a recommendation of a mxlinux.org forum participant, I launched MX Linux with systemd. This worked as expected (as it does on Linux Mint and Manjaro - two other distributions I have tried this with). So, the problem seems to be specific to open-vm-tools combined with sysvinit.
Interestingly, if I install VMTools from VMware's installation disk, then I can get the shared folder to work properly with MX Linux with sysvinit or with systemd.
So, it is possible that I'm missing something specific with open-vm-tools and sysvinit, or that this is an actual issue. I'm happy to investigate further and try different things.
I discuss it briefly here: https://forum.mxlinux.org/viewtopic.php?f=104&t=49838
I found this earlier issue, but I'm not sure how this is related or if it is addressed in 10.3.10: https://patchwork.openembedded.org/patch/147155/
Important note: MX Linux, by default, runs sysvinit.
Thanks for sharing this really important point, because it seems odd to use sysvinit when most of the Linux distros are moving to systemd.
Check /mnt/hgfs/sharedFolder and it is no longer present. I can see /mnt/hgfs only. It does not work following the reboot and I cannot access the sharedFolder.
Could you please run following command inside the guest and collect its exit code? "/usr/bin/vmhgfs-fuse --enabled; echo $?"
Also, please ensure that vmtoolsd process is running in the guest after reboot.
I just installed a MX Linux VM. It looks like the SysV init script for open-vm-tools in MX Linux does not handle vmhgfs at all. I ran the command /usr/bin/vmhgfs-fuse -o subtype=vmhgfs-fuse,allow_other /mnt/hgfs/ as root, and all share folders were mounted. This command needs to be started in the init script.
This is not an open-vm-tools bug. I suggest you file a bug at MX Linux to implement this missing part.
Thank you both. I’ll open a request with the MX Linux team and refer them to this post. I appreciate your looking into this and your quick response!
Based on your reply, I’ll go ahead and mark this as closed.
Best, Steve
I'm one of the lead devs for MX. we actually do not package open-vm-tools, but rather depend on the debian package. Looking at their source, its possible they have left something out of the init scripts on the sysVinit side of things.
before I go any further modifying an init script, does the vgauth service play into this at all. because I'm looking at the systemd service file for vmtoolsd provided by debian, and its running the same service as the sysVinit script. However, there is an additional vgauth.service that doesn't look to be provided with a sysVinit script. I'm not well versed enough in VMware (at all really) to know what's what here.
I'm presuming the command you provided StevenBBryant above would be run AFTER vmtoolsd is running.
The issue (should) also exist in debian buster, so it would be good to get it fixed for debian as well.
Reopening issue so that the above question from DolphineOracle can be answered.
This is still not an open-vm-tools issue. If Debian supports SysV, you need to file a bug at Debian.
I don't see vgauth in the init script either, so that is a bug too. But it's not related to the vmhgfs issue. Also, vmhgfs-fuse does not depend on vmtoolsd.
EDITED: Understood. I recognize this is not an open-vm-tools issues. I only reopened it because I didn’t want Dolphin Oracle’s question to go unanswered. I don’t have the level of expertise required to answer their questions and was hoping someone here might be able to help out.
Based on the above responses, I’m going to once again closes this issue.
P.S. It sounds like reopening the issue was the wrong approach to answering the question. Please let me know what I should do going forward.
Closing as this is not an open-vm-tools issue and the follow-up questions have been answered.
Thank you all!
No problem, we are happy to answer questions :-).
vmhgfs is independent of vmtoolsd, it does not mater if it starts before or after vmtoolsd.
vgauth is not necessary for VMs running under Workstation or Fusion, but should be used on ESXi. It's recommended that it starts before vmtoolsd, because it provides authentication.
I revisited this problem.
It confused me that it supposedly works if MX Linux runs with systemd. I could not reproduce this - it did not work for me with systemd either. The solution is here: https://github.com/vmware/open-vm-tools/issues/248#issuecomment-387556007 - create an entry in /etc/fstab like this:
vmhgfs-fuse /mnt/hgfs fuse defaults,allow_other 0 0
This way it works with both systemd and sysvinit.
OliverKurth - you are correct. I was able to get it working under systemd by added a service in the /etc/systemd/system folder. See section 6.1.2 of this link for what I did previously: https://wiki.archlinux.org/index.php/VMware/Installing_Arch_as_a_guest#Host.2FGuest_interaction
Your solution to edit the fstab file is 1) easier and 2) works regardless of using systemd or sysvinit. I've tried both and can confirm that change works in both.
Thank you for the clarifications guys! I appreciate it.
The issue can be fixed by following the steps mentioned by @oliverkurth It was verified by @StevenBBryant . Closing this issue.