在使用vmware linux时,有时候会出现如下情况:
open-vm-tools Error when getting information for file "//tmp/VMwareDnD/3jTONh/:xxx: No such file or directory
会导致无法复制文件,拖拽也不行的情况。
参考VMware的文章,在文件拖拽和复制、粘贴,需要挂载一个特殊的文件系统:vmblock-fuse
,先查看这个文件系统挂载服务的情况,如果有类似这样的输出:
systemctl status run-vmblock\\x2dfuse.mount
● run-vmblock\x2dfuse.mount - VMware vmblock fuse mount
Loaded: loaded (/lib/systemd/system/run-vmblock\x2dfuse.mount; disabled; vendor preset: enabled)
Active: inactive (dead)
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
这个服务处于inactive
状态并且是disabled
状态,就是该服务没有启动,并且重启后也不会自启。
解决方法:
- 开机自启
systemctl enable run-vmblock\\x2dfuse.mount
- 启动服务
systemctl start run-vmblock\\x2dfuse.mount
现在来查看服务状态,会有如下输出。
systemctl status run-vmblock\\x2dfuse.mount
● run-vmblock\x2dfuse.mount - /run/vmblock-fuse
Loaded: loaded (/proc/self/mountinfo)
Active: active (mounted) since Sat 2022-08-27 12:04:26 CST; 12min ago
Where: /run/vmblock-fuse
What: vmware-vmblock
但是此时仍然无法复制粘贴,还需要再重启vmware-tools服务
systemctl restart vmware-tools
至此,VMware可以随意复制粘贴文件了。