问题解决:虚拟机无法复制粘贴文件
Posted 看,未来
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了问题解决:虚拟机无法复制粘贴文件相关的知识,希望对你有一定的参考价值。
首先,vmware的增强工具是:open-vm-tools和open-vm-tools-desktop。复制字符没问题,就是复制文件和拖拽文件有问题。
拖拽和复制、粘贴文件,需要挂载一个特殊的文件系统:vmblock-fuse,先查看这个文件系统挂载服务的情况:
[root@k8s-master wlf]# systemctl status run-vmblock\\\\x2dfuse.mount
● run-vmblock\\x2dfuse.mount - VMware vmblock Fuse Mount
Loaded: loaded (/usr/lib/systemd/system/run-vmblock\\x2dfuse.mount; disabled; vendor preset: disabled)
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
死的,是吧。现在让它活一下:
1. 开机自启
systemctl enable run-vmblock\\\\x2dfuse.mount
2. 启动服务
systemctl start run-vmblock\\\\x2dfuse.mount
再看:
[root@k8s-master wlf]# systemctl status run-vmblock\\\\x2dfuse.mount
● run-vmblock\\x2dfuse.mount - VMware vmblock Fuse Mount
Loaded: loaded (/usr/lib/systemd/system/run-vmblock\\x2dfuse.mount; disabled; vendor preset: disabled)
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
[root@k8s-master wlf]# systemctl enable run-vmblock\\\\x2dfuse.mount
Created symlink from /etc/systemd/system/multi-user.target.wants/run-vmblock\\x2dfuse.mount to /usr/lib/systemd/system/run-vmblock\\x2dfuse.mount.
[root@k8s-master wlf]# systemctl start run-vmblock\\\\x2dfuse.mount
[root@k8s-master wlf]# systemctl status run-vmblock\\\\x2dfuse.mount
● run-vmblock\\x2dfuse.mount - VMware vmblock Fuse Mount
Loaded: loaded (/usr/lib/systemd/system/run-vmblock\\x2dfuse.mount; enabled; vendor preset: disabled)
Active: active (mounted) since Sat 2022-06-25 23:04:53 PDT; 14s 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: 9874 ExecMount=/bin/mount vmware-vmblock-fuse /run/vmblock-fuse -t fuse -o subtype=vmware-vmblock,default_permissions,allow_other (code=exited, status=0/SUCCESS)
Tasks: 3
Memory: 2.5M
CGroup: /system.slice/run-vmblock\\x2dfuse.mount
└─9880 vmware-vmblock-fuse /run/vmblock-fuse -o rw,subtype=vmware-vmblock...
活的,是吧。
接下来重启 vm-tools 服务:
[root@k8s-master wlf]# systemctl restart vmware-tools
Failed to restart vmware-tools.service: Unit not found.
没这个服务,是吧。
搜一下:
[root@k8s-master wlf]# ls /usr/lib/systemd/system
找到了吧,重启它。
不要说找不到,除非你的屏幕就是小框。
有没有一种感觉,网上搜这个解决方案的,几乎都是让你重装 vm-tools 的,重装了还是不行。而且重装之后,连文本复制粘贴都不行了,查状态确是 active。。。
以上是关于问题解决:虚拟机无法复制粘贴文件的主要内容,如果未能解决你的问题,请参考以下文章