vmware / open-vm-tools

Official repository of VMware open-vm-tools project
http://sourceforge.net/projects/open-vm-tools/
2.26k stars 427 forks source link

Drag-and-drop NOT working. #169

Open stephennspencer opened 7 years ago

stephennspencer commented 7 years ago

tl;dr: Drag and drop is inconsistent, Macintosh host, CentOS7 guest.

I'm building a VM for our users. Using VMware Workstation Pro 12.0 on a Windows 10 box to build the guest VM, and using CentOS 7 as the guest OS. I've installed "open-vm-tools" and "open-vm-tools-devel" and "open-vm-tools-desktop" in the guest OS.

When I bring up the VM in VMware Fusion 8.5.7 on the Macintosh, the drag and drop functionality is inconsistent. The first file dragged from host to guest works, but the second fails, with "Error getting information for file..." message. (See attached screencap.)

Dragging files from guest to host consistently works.

Copy and paste works, in both directions, consistently.

/usr/lib/systemd/system/vmtoolsd.service has "PrivateTmp=true" in it.

I've tried copying that "vmtoolsd.service" file to /etc/systemd/system/vmtoolsd.service and (a) changing it to "PrivateTmp=false" and (b) commenting out that line, and restarting the guest and/or reloading the daemon (so that "systemctl status -l vmtoolsd" shows that this other configuration file is in play) - no change in the behavior.

Is there logfile information somewhere on the guest that might help me determine what's failing, and why?

Why does the behavior not change when I have PrivateTmp set to "true" or "false"?

Any assistance is greatly appreciated.

Thank you.

Best, Stephen vmwarednd

johnwvmw commented 7 years ago

Stephen,

The first para. is talking about CentOS 7 on WS Pro 12. That is working as expected, correct?

On Fusion, what version of CentOS 7 have you installed and what version of open-vm-tools packages are in use?

stephennspencer commented 7 years ago

The behavior in WS Pro 12 on Windows 10 (as host) as with VMware Fusion on the Macintosh as the host - DnD from guest to host works consistently, DnD from host to guest stops after a couple of iterations (I got two files to drag in, the third failed). Copy and paste either direction works.

CentOS 7.3 - kernel 3.10.0-514.21.1.el7.x86_64, built 25 May 2017.

open-vm-tools 10.0.5-4-el7_3.

Best, Stephen

oliverkurth commented 7 years ago

I was able to reproduce the issue in CentOS 7.3. The vmblock fuse file system isn't mounted with the open-vm-tools package that comes with CentOS 7.3. To work around the issue, create the file /etc/systemd/system/run-vmblock\\x2dfuse.mount with the content:

[Unit]
Description=VMware vmblock fuse mount
Documentation=https://github.com/vmware/open-vm-tools/blob/master/open-vm-tools/vmblock-fuse/design.txt
DefaultDependencies=no
Before=umount.target vmtoolsd.service
ConditionVirtualization=vmware
After=sys-fs-fuse-connections.mount
Wants=vmtoolsd.service

[Mount]
What=vmware-vmblock-fuse
Where=/run/vmblock-fuse
Type=fuse
Options=subtype=vmware-vmblock,default_permissions,allow_other

[Install]
WantedBy=multi-user.target

Then do:

sudo mkdir /var/run/vmblock-fuse
sudo systemctl enable run-vmblock\\x2dfuse.mount

and reboot, or

sudo systemctl start run-vmblock\\x2dfuse.mount and logout, then log in again.

Let me know if this works for you.

oliverkurth commented 7 years ago

I found another thing - the setuid bit for vmware-user-suid-wrapper isn't set. So you also need to do:

sudo chmod ugo+s /usr/bin/vmware-user-suid-wrapper

stephennspencer commented 7 years ago

Oliver, after doing that, and restarting the guest, I see this:

[root@localhost auser]# systemctl status -l run-vmblock\x2dfuse.mount ● run-vmblock\x2dfuse.mount - VMware vmblock fuse mount Loaded: error (Reason: Invalid argument) Active: inactive (dead) Where: /var/run/vmblock-fuse What: vmware-vmblock-fuse Docs: https://github.com/vmware/open-vm-tools/blob/master/open-vm-tools/vmblock-fuse/design.txt

Jun 14 02:08:23 localhost.localdomain systemd[1]: run-vmblock\x2dfuse.mount's Where= setting doesn't match unit name. Refusing. Jun 14 02:08:23 localhost.localdomain systemd[1]: Cannot add dependency job for unit run-vmblock\x2dfuse.mount, ignoring: Unit is not loaded properly: Invalid argument.

Why the "\x2d" in all of this; why not just a dash character, as in the "Where" line of the file that was created in step 1 of this response?

Best, Stephen

oliverkurth commented 7 years ago

I made a mistake - replace the "where" line with /run/vmblock-fuse, not (/var/run/vmblock-fuse).

The \2xd is needed otherwise the dash would be replaced with a slash, but we want the dash in "vmblock-fuse".

stephennspencer commented 7 years ago

Success! Thank you, Oliver.

stephennspencer commented 7 years ago

Well, partial success.

When I bring the VM over to the Macintosh, the "run-vmblock\x2dfuse.mount" service isn't running: [root@localhost auser]# systemctl status -l run-vmblock\x2dfuse.mount ● run-vmblock\x2dfuse.mount - VMware vmblock fuse mount Loaded: loaded (/etc/systemd/system/run-vmblock\x2dfuse.mount; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Wed 2017-06-14 08:26:02 PDT; 7h ago Where: /run/vmblock-fuse What: vmware-vmblock-fuse Docs: https://github.com/vmware/open-vm-tools/blob/master/open-vm-tools/vmblock-fuse/design.txt

Jun 14 08:26:02 localhost.localdomain mount[463]: fuse: device not found, try 'modprobe fuse' first Jun 14 08:26:02 localhost.localdomain systemd[1]: run-vmblock\x2dfuse.mount mount process exited, code=exited status=1 Jun 14 08:26:02 localhost.localdomain systemd[1]: Failed to mount VMware vmblock fuse mount. Jun 14 08:26:02 localhost.localdomain systemd[1]: Unit run-vmblock\x2dfuse.mount entered failed state.

Running "modprobe fuse" and then "systemctl restart run-vmblock\x2dfuse.mount" results in a happier report: [root@localhost auser]# systemctl status -l run-vmblock\x2dfuse.mount ● run-vmblock\x2dfuse.mount - VMware vmblock fuse mount Loaded: loaded (/etc/systemd/system/run-vmblock\x2dfuse.mount; enabled; vendor preset: disabled) Active: active (mounted) since Wed 2017-06-14 15:37:31 PDT; 3s ago Where: /run/vmblock-fuse What: vmware-vmblock Docs: https://github.com/vmware/open-vm-tools/blob/master/open-vm-tools/vmblock-fuse/design.txt Process: 2941 ExecMount=/bin/mount vmware-vmblock-fuse /run/vmblock-fuse -t fuse -o subtype=vmware-vmblock,default_permissions,allow_other (code=exited, status=0/SUCCESS) CGroup: /system.slice/run-vmblock\x2dfuse.mount └─2943 vmware-vmblock-fuse /run/vmblock-fuse -o rw,subtype=vmware-vmblock,default_permissions,allow_other,dev,suid

Jun 14 15:37:31 localhost.localdomain systemd[1]: Mounting VMware vmblock fuse mount... Jun 14 15:37:31 localhost.localdomain systemd[1]: Mounted VMware vmblock fuse mount.

but dragging INTO the guest from the host consistently fails. Dragging from guest to host works, as does copy and paste, both directions.

Rebooting does not help - I'm back to the run-vmblock\x2dfuse.mount service not running.

OTOH, it appeared to be working consistently on the Windows 10 box.

Best, Stephen

oliverkurth commented 7 years ago

Just to make sure, did you set the setuid bit for /usr/bin/vmware-user-suid-wrapper ? I understand you are using two different hosts, so is the setup otherwise the same in the two VMs? It shouldn't depend on the host system.

oliverkurth commented 7 years ago

You can also attach the log files from /var/log/vmware-* to this issue. Maybe we can find something useful.

stephennspencer commented 7 years ago

Yes, the setuid bit is set:

-rwsr-sr-x. 1 root root 11416 Mar 2 19:00 /usr/bin/vmware-user-suid-wrapper

I've attached the log.

vmware-vmsvc.txt

oliverkurth commented 7 years ago

There should be a file /var/log/vmware-vmusr.log , but it could be a permission problem. Can you please add these lines to /etc/vmware-tools/tools.conf:

[logging]
log = true
vmusr.level = debug
vmusr.handler = file
vmusr.data = /tmp/vmware-vmusr.log

And then send that log file when the issue is reproduced.

stephennspencer commented 7 years ago

There was not a file by that name, nor was there "/etc/vmware-tools/tools.conf." I created that file and restarted the guest.

I've attached "vmware-vmusr.log" (renamed "vmware-vmusr.txt") - in it, "test.txt" was successfully dragged from (Macintosh) host to guest, and "test copy 2.txt" was not successfully dragged.

Thank you! vmware-vmusr.txt

oliverkurth commented 7 years ago

Thank you. I asked some other developers for help, so I hope you will hear back from us.

sukeyisme commented 6 years ago

any update?

oliverkurth commented 6 years ago

@stephennspencer is this still an issue with later versions of CentOS?

@sukeyisme do you have the same issue? What is the environment (open-vm-tools version, OS and version, which version of Fusion or WS, which host (Mac or Windows))? Can you provide logs?

stephennspencer commented 6 years ago

Sorry, haven't pursued this functionality for our purposes lately. So, no update.

Best, Stephen

On Thu, Apr 26, 2018 at 11:19 AM Oliver Kurth notifications@github.com wrote:

@stephennspencer https://github.com/stephennspencer is this still an issue with later versions of CentOS?

@sukeyisme https://github.com/sukeyisme do you have the same issue? What is the environment (open-vm-tools version, OS and version, which version of Fusion or WS, which host (Mac or Windows))? Can you provide logs?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/vmware/open-vm-tools/issues/169#issuecomment-384740487, or mute the thread https://github.com/notifications/unsubscribe-auth/AVJt_36wHwLSyq67KN9VaQAzKcE40wZ-ks5tsg_KgaJpZM4N3vk0 .

-- Stephen Spencer e-mail: stephenspencer@gmail.com

sukeyisme commented 6 years ago

yes. open-vm-tools: 10.2.5-1 OS: manjaro linux 17.1.8 Hakoila desktop: i3 fusion pro: 10.1.1(7520154) host: mac logs: which logs? I couldn't find this file(/etc/vmware-tools/tools.conf)

tomwheeler commented 6 years ago

I can reproduce this on a fully-patched installation of CentOS 7.5.1804 running as a guest VM on a Mac OS X High Sierra host running VMWare Fusion Professional 7.1.3. I have not tried any of the workarounds to see if they fix it yet, but it's definitely a problem that's evident with the default installation. As in the screenshot for the original issue, the path shown in my error dialog also begins with two leading slashes.

tomwheeler commented 6 years ago

@oliverkurth I have performed the workaround suggested in this thread, but drag-and-drop continues to fail consistently. As stated above, I am running CentOS 7.5.1804 as a guest and Mac OS X High Sierra as a host with VMWare Fusion Professional 7.1.3.

Here's an excerpt from the /tmp/vmware-vmusr.log log file showing the before, during, and after of my attempt to drag a file (productratings.zip) from the desktop of the Mac OS X host to the desktop of the Linux guest.

Since I do not have a workaround for this bug, I'm very interested in helping to diagnose and test a fix for this. Please let me know what else you need from me.

oliverkurth commented 6 years ago

@tomwheeler which version of open-vm-tools do you have installed? Find out with vmtoolsd -v.

tomwheeler commented 6 years ago

@oliverkurth It's version 10.1.10.63510 (build-6082533).

tomwheeler commented 6 years ago

FYI: Another workaround for this bug is to click the Retry button when the error dialog pops up. It seems that it's only the first attempt that fails (although that fails 100% of the time).

Freedzone commented 6 years ago

4.14.71-1-MANJARO XFCE same issue. I am just using copy/paste for files. Not a big deal for me anyway.

NyaomiDEV commented 6 years ago

Drag 'n' Drop doesn't work on host Xubuntu 18.04 (XFCE) and guest Kubuntu 18.04 (KDE), both 64-bits, using Workstation 15 and open-vm-tools 10.3.0.5530 (build-8931395). Suggestions?

maxborowsky commented 5 years ago

The described problem (drag'n'drop does not work or is happily only after the second attempt with clicking Retry button) is completely solved on Fedora 30 (last version open-vm-tools from official repo), if we apply the method proposed in this thread by the respected @oliverkurth. Great solution! :-)

I hope this solution will be added to the repository as part of the default open-vm-tools package installation script /?/. (Sorry, if I use inaccurate terminology - I recently began to actively use Linux.)

NeilGatenby commented 5 years ago

In case it helps anyone, I got exactly this error message ...

    Error when getting information for 
    file '/var/run/vmblock-fuse/blockdir/a16aea9d/myDir': No such file or directory

when a subfolder of "myDir" was open in visual studio 2019. Close visual studio and all is well

HTH

neteroster commented 3 years ago

@oliverkurth 's method work for me on Arch Linux latest version with open-vm-tools installed. Thank you!

0xcb0ff commented 1 year ago

it's working!!! Nice.