[CentOS8]安装vmware tools

  • 查看一下本地是否安装open-vm-tools
[root@localhost ~]# dnf remove open-vm-tools
No match for argument: open-vm-tools # 不存在
  • 关闭SElinux否则会挂
  • 挂载CDROM镜像
# 创建文件夹
[root@localhost ~]# mkdir /mnt/cdrom
# 挂载镜像
[root@localhost ~]# mount /dev/sr0 /mnt/cdrom/
mount: /mnt/cdrom: WARNING: device write-protected, mounted read-only.
[root@localhost ~]# cd /mnt/cdrom/
[root@localhost cdrom]# ls
manifest.txt  run_upgrader.sh  VMwareTools-10.3.21-14772444.tar.gz  vmware-tools-upgrader-32  vmware-tools-upgrader-64
# 复制VMwareTools-10.3.21-14772444.tar.gz到tmp路径并解压缩
[root@localhost tmp]# ls
ks-script-sxwzwe9u  vmware-root_2334-826847077  vmware-root_2354-868329686  VMwareTools-10.3.21-14772444.tar.gz  vmware-tools-distrib
[root@localhost tmp]# cd vmware-tools-distrib
[root@localhost vmware-tools-distrib]# ls
bin  caf  doc  etc  FILES  INSTALL  installer  lib  vgauth  vmware-install.pl
[root@localhost vmware-tools-distrib]# ./vmware-install.pl
open-vm-tools packages are available from the OS vendor and VMware recommends
using open-vm-tools packages. See http://kb.vmware.com/kb/2073803 for more
information.
Do you still want to proceed with this installation? [no] yes # 确认安装

INPUT: [yes]

Creating a new VMware Tools installer database using the tar4 format.

Installing VMware Tools.

In which directory do you want to install the binary files?
[/usr/bin] # 默认回车

INPUT: [/usr/bin]  default

What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc/rc.d] # 默认回车

INPUT: [/etc/rc.d]  default

What is the directory that contains the init scripts?
[/etc/rc.d/init.d] # 默认回车

INPUT: [/etc/rc.d/init.d]  default

In which directory do you want to install the daemon files?
[/usr/sbin] # 默认回车

INPUT: [/usr/sbin]  default

In which directory do you want to install the library files?
[/usr/lib/vmware-tools] # 默认回车

INPUT: [/usr/lib/vmware-tools]  default

The path "/usr/lib/vmware-tools" does not exist currently. This program is
going to create it, including needed parent directories. Is this what you want?
[yes] # 默认回车

INPUT: [yes]  default

In which directory do you want to install the common agent library files?
[/usr/lib] # 默认回车

INPUT: [/usr/lib]  default

In which directory do you want to install the common agent transient files?
[/var/lib] # 默认回车

INPUT: [/var/lib]  default

In which directory do you want to install the documentation files?
[/usr/share/doc/vmware-tools] # 默认回车

INPUT: [/usr/share/doc/vmware-tools]  default

The path "/usr/share/doc/vmware-tools" does not exist currently. This program
is going to create it, including needed parent directories. Is this what you
want? [yes] # 默认回车

INPUT: [yes]  default

The installation of VMware Tools 10.3.21 build-14772444 for Linux completed
successfully. You can decide to remove this software from your system at any
time by invoking the following command: "/usr/bin/vmware-uninstall-tools.pl".

Before running VMware Tools for the first time, you need to configure it by
invoking the following command: "/usr/bin/vmware-config-tools.pl". Do you want
this program to invoke the command for you now? [yes] # 默认回车

INPUT: [yes]  default

Initializing...


Making sure services for VMware Tools are stopped.

正在停止vmware-tools(透过 systemctl):                   [  确定  ]


The module vmci has already been installed on this system by another installer
or package and will not be modified by this installer.

The module vsock has already been installed on this system by another installer
or package and will not be modified by this installer.

The module vmxnet3 has already been installed on this system by another
installer or package and will not be modified by this installer.

The module pvscsi has already been installed on this system by another
installer or package and will not be modified by this installer.

The module vmmemctl has already been installed on this system by another
installer or package and will not be modified by this installer.

The VMware Host-Guest Filesystem allows for shared folders between the host OS
and the guest OS in a Fusion or Workstation virtual environment.  Do you wish
to enable this feature? [no] # 是否开启文件共享 默认回车

INPUT: [no]  default

The vmxnet driver is no longer supported on kernels 3.3 and greater. Please
upgrade to a newer virtual NIC. (e.g., vmxnet3 or e1000e)

The vmblock enables dragging or copying files between host and guest in a
Fusion or Workstation virtual environment.  Do you wish to enable this feature?
[no]
INPUT: [no]  default

### SElinux没有关闭报错
Skipping configuring automatic kernel modules as no drivers were installed by
this installer.

Do you want to enable Guest Authentication (vgauth)? Enabling vgauth is needed
if you want to enable Common Agent (caf). [yes] no # 没有图形界面
INPUT: [no]  default

No X install found.



Skipping rebuilding initrd boot image for kernel as no drivers to be included
in boot image were installed by this installer.

Generating the key and certificate files.
Successfully generated the key and certificate files.
manageSELinux install: The 'semanage' utility was not found.
There was an error configuring the SELinux security context for VMware Tools.
Please make certain that SELinux is configured correctly.

Job for vmware-tools.service failed because the control process exited with error code.
See "systemctl status vmware-tools.service" and "journalctl -xe" for details.
Unable to start services for VMware Tools

Execution aborted.

Warning no default label for /tmp/vmware-block-restore-22550.0/tmp_file
Enjoy,

--the VMware team

踩坑

-bash: ./vmware-install.pl: /usr/bin/perl: 解释器错误: No such file or directory

[root@localhost vmware-tools-distrib]# dnf install -y perl
  • 关闭SELinux 安装成功
The configuration of VMware Tools 10.3.21 build-14772444 for Linux for this
running kernel completed successfully.

You must restart your X session before any mouse or graphics changes take
effect.

To enable advanced X features (e.g., guest resolution fit, drag and drop, and
file and text copy/paste), you will need to do one (or more) of the following:
1. Manually start /usr/bin/vmware-user
2. Log out and log back into your desktop session
3. Restart your X session.

Enjoy,

--the VMware team

END

posted @   LeoShi2020  阅读(9220)  评论(1编辑  收藏  举报
编辑推荐:
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· AI技术革命,工作效率10个最佳AI工具
点击右上角即可分享
微信分享提示