[CentOS8]安装vmware tools

Posted LeoShi2020

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[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

以上是关于[CentOS8]安装vmware tools的主要内容,如果未能解决你的问题,请参考以下文章

虚拟机centos7与本地win10无法互相复制粘贴。vmware-tool已安装

虚拟机安装centos 的vm tools 完了.怎么复制不了命令

VMware16 安装CentOS8详细教程

VMware16 安装CentOS8详细教程

VMware安装Centos8超详细过程

VMware 安装 Centos8