重启后 Open-vm-tools 不再起作用

重启后 Open-vm-tools 不再起作用

我已在 Windows 10 主机上的 VMWare Workstation 15 中的 Ubuntu 20.04 客户机上成功安装了 open-vm-tools。

安装后,全屏和共享文件夹均可正常工作。

但重新启动虚拟机后,全屏和共享文件夹都不再起作用。

这些是我尝试过的:

sudo apt-get remove open-vm-tools
sudo apt-get install open-vm-tools

在重新安装的过程中,出现如下消息:

无法重新启动 open-vm-tools.service 单元 vgauth.service 已被屏蔽

但经过一番搜索后我尝试:

systemctl list-unit-files|grep 'open-vm-tools'
systemctl list-unit-files|grep 'vgauth'

均已“启用”

然后

systemctl stop open-vm-tools
systemctl start open-vm-tools

没有消息。

接下来是什么?

答案1

用户不同,但问题相同,所以我觉得我应该做出贡献。我删除了 vmware-tools,因为启动/停止/休眠/恢复脚本存在问题。我不知道是什么导致它们损坏,但我觉得使用 open-vm-tools-desktop 会更干净。我在卸载 vmware-tools 和安装 open-vm-tools-desktop 之间重新启动。

systemctl status vgauth
× vgauth.service - Authentication service for virtual machines hosted on VMware
     Loaded: loaded (/lib/systemd/system/vgauth.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Tue 2023-03-07 08:56:21 EST; 1min 34s ago
       Docs: http://github.com/vmware/open-vm-tools
    Process: 2555 ExecStart=/usr/bin/VGAuthService (code=exited, status=255/EXCEPTION)
   Main PID: 2555 (code=exited, status=255/EXCEPTION)
        CPU: 6ms

Mar 07 08:56:21 ubuntu VGAuthService[2555]: Pref_Init: Using '/etc/vmware-tools/vgauth.conf' as preferences filepath
Mar 07 08:56:21 ubuntu VGAuthService[2555]: Core dump limit set to -1
Mar 07 08:56:21 ubuntu VGAuthService[2555]: INIT SERVICE
Mar 07 08:56:21 ubuntu VGAuthService[2555]: Using '/var/lib/vmware/VGAuth/aliasStore' for alias store root directory
Mar 07 08:56:21 ubuntu VGAuthService[2555]: LoadCatalogAndSchema: Using '/usr/bin/../schemas' for SAML schemas
Mar 07 08:56:21 ubuntu VGAuthService[2555]: Error: catalog file not found at "/usr/bin/../schemas/catalog.xml"
Mar 07 08:56:21 ubuntu VGAuthService[2555]: Failed to load schemas
Mar 07 08:56:21 ubuntu VGAuthService[2555]: ServiceStartAndRun: failed to init verification; exiting
Mar 07 08:56:21 ubuntu systemd[1]: vgauth.service: Main process exited, code=exited, status=255/EXCEPTION
Mar 07 08:56:21 ubuntu systemd[1]: vgauth.service: Failed with result 'exit-code'.
systemctl status open-vm-tools
● open-vm-tools.service - Service for virtual machines hosted on VMware
     Loaded: loaded (/lib/systemd/system/open-vm-tools.service; enabled; vendor preset: enabled)
    Drop-In: /usr/lib/systemd/system/open-vm-tools.service.d
             └─desktop.conf
     Active: active (running) since Tue 2023-03-07 08:56:21 EST; 7min ago
       Docs: http://open-vm-tools.sourceforge.net/about.php
    Process: 2561 ExecStartPre=/sbin/modprobe vmwgfx (code=exited, status=0/SUCCESS)
   Main PID: 2562 (vmtoolsd)
      Tasks: 3 (limit: 14167)
     Memory: 1.7M
        CPU: 706ms
     CGroup: /system.slice/open-vm-tools.service
             └─2562 /usr/bin/vmtoolsd

Mar 07 08:56:21 ubuntu systemd[1]: Starting Service for virtual machines hosted on VMware...
Mar 07 08:56:21 ubuntu systemd[1]: Started Service for virtual machines hosted on VMware.

答案2

刚刚遇到这个问题,幸运的是修复很简单:

sudo apt remove open-vm-tools --purge

抱怨/etc/vmware-tools目录不为空

所以我只需要手动销毁该目录的残余部分,然后我重新安装了 open-vm-tools 而没有任何问题:-)

相关内容