在使用vmware kali linux时一直忍受着一个情况:
open-vm-tools Error when getting information for file "//tmp/VMwareDnD/3jTONh/:xxx: No such file or directory
无法复制文件,有时拖拽也不行的情况。
终于今天忍不住了,决定彻底解决这个问题
首先,vmware的增强工具是:open-vm-tools
和open-vm-tools-desktop
。复制字符没问题,就是复制文件和拖拽文件有问题。
在查询一番资料后,发现有篇文章写到:
For Drag-and-Drop and Copy-and-Paste functionality, open-vm-tools needs to mount a special filesystem (vmblock-fuse). Check if this is already enabled
拖拽和复制、粘贴文件,需要挂载一个特殊的文件系统:vmblock-fuse
,先查看这个文件系统挂载服务的情况:
1
╰─➤ systemctl status run-vmblock\\x2dfuse.mount
2
● run-vmblock\x2dfuse.mount - VMware vmblock fuse mount
3
Loaded: loaded (/lib/systemd/system/run-vmblock\x2dfuse.mount; disabled; vendor preset: enabled)
4
Active: inactive (dead)
5
Where: /run/vmblock-fuse
6
What: vmware-vmblock-fuse
7
Docs: https://github.com/vmware/open-vm-tools/blob/master/open-vm-tools/vmblock-fuse/design.txt
发现这个服务居然是inactive
状态并且是disabled
状态,意味着:没有启动,并且重启后也不会自启。难怪无法复制、粘贴。
1
1. 开机自启
2
systemctl enable run-vmblock\\x2dfuse.mount
3
4
2. 启动服务
5
systemctl start run-vmblock\\x2dfuse.mount
现在来查看服务状态,发现启动成功。
1
╰─➤ systemctl status run-vmblock\\x2dfuse.mount
2
● run-vmblock\x2dfuse.mount - VMware vmblock fuse mount
3
Loaded: loaded (/lib/systemd/system/run-vmblock\x2dfuse.mount; enabled; vendor preset: enabled)
4
Active: active (mounted) since Tue 2021-03-30 16:02:46 CST; 5s ago
5
Where: /run/vmblock-fuse
6
What: vmware-vmblock
7
Docs: https://github.com/vmware/open-vm-tools/blob/master/open-vm-tools/vmblock-fuse/design.txt
8
Tasks: 3 (limit: 9304)
9
Memory: 448.0K
10
CPU: 6ms
11
CGroup: /system.slice/run-vmblock\x2dfuse.mount
12
└─77525 vmware-vmblock-fuse /run/vmblock-fuse -o rw,subtype=vmware-vmblock,default_permissions,allow_other,dev,suid
13
14
Mar 30 16:02:46 we systemd[1]: Mounting VMware vmblock fuse mount...
15
Mar 30 16:02:46 we systemd[1]: Mounted VMware vmblock fuse mount.
但是此时仍然无法复制粘贴,还需要再重启vmware-tools服务
1
systemctl restart vmware-tools
至此,可以随意复制、粘贴文件。