- 查看一下本地是否安裝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