最新消息:20210917 已从crifan.com换到crifan.org

【未解决】VMWare中macOS和主机Win的共享剪贴板再次突然失效

VMWare crifan 733浏览 0评论
之前已经遇到过
虚拟机客户端macOS和主机Win的剪贴板共享,突然失效,但是当时已解决了:
【未解决】VMWare中macOS虚拟机无法和主机Win共享剪切板
但是现在又再次遇到:
折腾:
【未解决】Win中VMWare中macOS中调试抓包项目
期间,又出现同样问题:
刚刚共享剪切板还好好的
突然又不行了。
感觉或许和:
当时正在VSCode中复制和剪贴内容,有关系?
VSCode中,用:
去复制下一行,之类的操作。
然后是可以的。
又去 Win+/ 去取消注释
然后好像再去复制,就不行了。
去看看vmware-tools-daemon进程还在的:
并且ps查进程,也在:
且还是有2个:
一个是user的usr,一个是 system的svc
或许:kill掉这2个进程,然后分别命令行启动进程,看看是否有效。
暂时先另外试试
直接重新安装VMware Tools,但不重启,看看效果。
结果无法不重启,否则不给关闭弹框。
那就不管。也不关闭了。
结果问题依旧。
然后本来想暂时通过共享文件夹,新建文本文件,暂时实现拷贝内容粘贴进去,实现共享内容
结果发现,共享文件夹没了:
去到设置中看,结果:
此时已检测不出来安装过VMWare Tools
-》说明,VMWare Tools已失效了。
-》此处 很是尴尬,VMWare Tools用了一小段时间,就失效了。。。
-》不知道是否和VSCode有关?还是本身此处VMWare Tools安装后,不稳定,很容易失效。
还是去试试,kill掉进程,手动重启试试
还没去kill呢,结果:svc的VMware tools进程 都没了。。。
手动启动试试
换了sudo,路径中间有空格,加上引号,最终能运行,但是:
启动后,没有结束,好像一直就需要这么运行着?
算了,先试试,能否实现剪贴板共享
还是不行
不过有变化:
iTerm2中,去用快捷键:Win+C=Mac的Command+C 复制内容时
iTerm中的Edit 闪了一下 -》之前就注意到这个细节
-》说明内部Command+C是有效执行的
-》说明复制这个动作是OK了的
但是目前还是无法共享到剪贴板,Win中获取不到
不过另外注意到了:
共享文件夹 出现了:
-》说明:
的确是和前面那2个进程有关系
那现在终于可以暂时通过共享文件夹中的文本文件,实现内容共享了:
mac中:
win中:
之前相关log
crifanli@crifanlideMac  ~  ps aux | grep vmware
crifanli           516   0.0  0.4  4xxx   ??  S    三12上午   5:58.52 /Library/Application Support/VMware Tools/vmware-tools-daemon --name vmusr --common-path /Library/Application Support/VMware Tools/Plugins/Common --plugin-path /Library/Application Support/VMware Tools/Plugins/User
root                86   0.0  0.4  4333336  12212   ??  Ss   二11下午   6:06.00 /Library/Application Support/VMware Tools/vmware-tools-daemon --name vmsvc --common-path /Library/Application Support/VMware Tools/Plugins/Common --plugin-path /Library/Application Support/VMware Tools/Plugins/System
crifanli          5052   0.0  0.0  4258648    200 s000  R+    6:50下午   0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox vmware


crifanli@crifanlideMac  ~  ps aux | grep vmware
crifanli           516   0.0  0.4  4337496  13908   ??  S    三12上午   5:58.55 /Library/Application Support/VMware Tools/vmware-tools-daemon --name vmusr --common-path /Library/Application Support/VMware Tools/Plugins/Common --plugin-path /Library/Application Support/VMware Tools/Plugins/User
crifanli          5295   0.0  0.0  4267924    644 s000  R+    7:00下午   0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox vmware


crifanli@crifanlideMac  ~  sudo /Library/Application Support/VMware Tools/vmware-tools-daemon --name vmsvc --common-path /Library/Application Support/VMware Tools/Plugins/Common --plugin-path /Library/Application Support/VMware Tools/Plugins/System
Password:
sudo: /Library/Application: command not found
✘ crifanli@crifanlideMac  ~  sudo "/Library/Application Support/VMware Tools/vmware-tools-daemon" --name vmsvc --common-path "/Library/Application Support/VMware Tools/Plugins/Common" --plugin-path "/Library/Application Support/VMware Tools/Plugins/System"


Jun 27 19:02:44  VMware Tools[5414] <Notice>: Starting VMware Tools:


sudo "/Library/Application Support/VMware Tools/vmware-tools-daemon" --name vmsvc --common-path "/Library/Application Support/VMware Tools/Plugins/Common" --plugin-path "/Library/Application Support/VMware Tools/Plugins/System"
那么:
都kill掉:
Jun 27 19:02:44  VMware Tools[5414] <Notice>: Starting VMware Tools:
^A^CJun 27 19:12:29  VMware Tools[5464] <Notice>: Shutting down VMware Tools:
umount(/Volumes/VMware Shared Folders): Resource busy -- try 'diskutil unmount'
(kernel) Kext com.vmware.kext.vmhgfs did not stop (return code 0x5).
(kernel) Kext com.vmware.kext.vmhgfs can't unload - module stop returned 0xdc008017.
Failed to unload com.vmware.kext.vmhgfs - (libkern/kext) kext (kmod) start/stop routine failed.
再都重启试试
vmware-tools-daemon suddenly not work
crifanli@crifanlideMac  ~  ps aux | grep vmware
crifanli           516   0.0  0.4  4337496  13844   ??  S    三12上午   5:58.58 /Library/Application Support/VMware Tools/vmware-tools-daemon --name vmusr --common-path /Library/Application Support/VMware Tools/Plugins/Common --plugin-path /Library/Application Support/VMware Tools/Plugins/User
crifanli          5488   0.0  0.0  4258648    200 s000  R+    7:15下午   0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox vmware
crifanli@crifanlideMac  ~  kill -9 516
crifanli@crifanlideMac  ~  ps aux | grep vmware
crifanli          5522   0.0  0.0  4267924    548 s000  R+    7:34下午   0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox vmware
crifanli@crifanlideMac  ~  "/Library/Application Support/VMware Tools/vmware-tools-daemon" --name vmusr --common-path "/Library/Application Support/VMware Tools/Plugins/Common" --plugin-path "/Library/Application Support/VMware Tools/Plugins/User"
没输出
算了。中断掉,加上&在后台运行
crifanli@crifanlideMac  ~  ps aux | grep vmware
crifanli          5608   0.0  0.0  4267924    608 s000  R+    7:35下午   0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox vmware
crifanli@crifanlideMac  ~  "/Library/Application Support/VMware Tools/vmware-tools-daemon" --name vmusr --common-path "/Library/Application Support/VMware Tools/Plugins/Common" --plugin-path "/Library/Application Support/VMware Tools/Plugins/User" &
[1] 5619
⚙ crifanli@crifanlideMac  ~  ps aux | grep vmware
crifanli          5619   0.1  0.5  4340748  16452 s000  SN    7:35下午   0:00.12 /Library/Application Support/VMware Tools/vmware-tools-daemon --name vmusr --common-path /Library/Application Support/VMware Tools/Plugins/Common --plugin-path /Library/Application Support/VMware Tools/Plugins/User
crifanli          5631   0.0  0.0  4267924    584 s000  R+    7:35下午   0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox vmware
再去运行svc
⚙ crifanli@crifanlideMac  ~  sudo "/Library/Application Support/VMware Tools/vmware-tools-daemon" --name vmsvc --common-path "/Library/Application Support/VMware Tools/Plugins/Common" --plugin-path "/Library/Application Support/VMware Tools/Plugins/System" &
[2] 5712
⚙ crifanli@crifanlideMac  ~ 
[2]  + 5712 suspended (tty output)  sudo "/Library/Application Support/VMware Tools/vmware-tools-daemon" --name
⚙ crifanli@crifanlideMac  ~  ps aux | grep vmware
crifanli          5619   0.1  0.5  4340224  16684 s000  SN    7:35下午   0:00.28 /Library/Application Support/VMware Tools/vmware-tools-daemon --name vmusr --common-path /Library/Application Support/VMware Tools/Plugins/Common --plugin-path /Library/Application Support/VMware Tools/Plugins/User
crifanli          5730   0.0  0.0  4267924    364 s000  R+    7:36下午   0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox vmware
root              5712   0.0  0.2  4320976   7436 s000  TN    7:36下午   0:00.04 sudo /Library/Application Support/VMware Tools/vmware-tools-daemon --name vmsvc --common-path /Library/Application Support/VMware Tools/Plugins/Common --plugin-path /Library/Application Support/VMware Tools/Plugins/System
但是:
问题依旧:
剪贴板,仍旧无法共享。
但是文件夹共享,还是可以的。
算了,还是重启虚拟机,试试看吧。
重启后,共享文件夹 选项,则是正常可以操作的:
-》说明是检测到了,之前重装VMWare Tools,能识别已安装了VMWare Tools了。
暂时先这么着。以后再运到问题,再去试试:
kill掉后,重启:
sudo "/Library/Application Support/VMware Tools/vmware-tools-daemon" --name vmsvc --common-path "/Library/Application Support/VMware Tools/Plugins/Common" --plugin-path "/Library/Application Support/VMware Tools/Plugins/System" &

"/Library/Application Support/VMware Tools/vmware-tools-daemon" --name vmusr --common-path "/Library/Application Support/VMware Tools/Plugins/Common" --plugin-path "/Library/Application Support/VMware Tools/Plugins/User" &
后续问题依旧,然后去:
kill掉了svc,但是svc会自动重启
✘ crifanli@crifanlideMac  ~  ps aux | grep vmware
crifanli          2956   0.0  0.0  4268032    720 s001  R+   10:52下午   0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox vmware
root              2859   0.0  0.5  4337948  15076   ??  Ss   10:52下午   0:00.32 /Library/Application Support/VMware Tools/vmware-tools-daemon --name vmsvc --common-path /Library/Application Support/VMware Tools/Plugins/Common --plugin-path /Library/Application Support/VMware Tools/Plugins/System
crifanli@crifanlideMac  ~  sudo kill -9 2859
crifanli@crifanlideMac  ~  ps aux | grep vmware
root              2966  30.5  0.5  4338472  15008   ??  Ss   10:53下午   0:00.18 /Library/Application Support/VMware Tools/vmware-tools-daemon --name vmsvc --common-path /Library/Application Support/VMware Tools/Plugins/Common --plugin-path /Library/Application Support/VMware Tools/Plugins/System
crifanli          2986   0.0  0.0  4267924    340 s001  R+   10:53下午   0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox vmware
使得:共享文件夹OK了。
暂时通过共享的文件夹中的文本文件来实现内容共享。虽然复制和粘贴很麻烦。但是至少凑合用。
另外再去启动usr
crifanli@crifanlideMac  ~  "/Library/Application Support/VMware Tools/vmware-tools-daemon" --name vmusr --common-path "/Library/Application Support/VMware Tools/Plugins/Common" --plugin-path "/Library/Application Support/VMware Tools/Plugins/User" &
[1] 3146
⚙ crifanli@crifanlideMac  ~ 
⚙ crifanli@crifanlideMac  ~  ps aux | grep vmware
crifanli          3146   0.2  0.5  4338808  15424 s001  SN   10:59下午   0:00.13 /Library/Application Support/VMware Tools/vmware-tools-daemon --name vmusr --common-path /Library/Application Support/VMware Tools/Plugins/Common --plugin-path /Library/Application Support/VMware Tools/Plugins/User
crifanli          3166   0.0  0.0  4278272    732 s001  R+   10:59下午   0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox vmware
root              2966   0.0  0.4  4337948  13420   ??  Ss   10:53下午   0:00.85 /Library/Application Support/VMware Tools/vmware-tools-daemon --name vmsvc --common-path /Library/Application Support/VMware Tools/Plugins/Common --plugin-path /Library/Application Support/VMware Tools/Plugins/System
但是没啥作用。
算了,懒得弄。凑合用。

转载请注明:在路上 » 【未解决】VMWare中macOS和主机Win的共享剪贴板再次突然失效

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
88 queries in 0.205 seconds, using 20.15MB memory