无需归录
在虚拟机上点击安装 vm tools 后,会加载一下光盘,如下面的 /dev/sr0
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
fd0 2:0 1 4K 0 disk
sda 8:0 0 100G 0 disk
├─sda1 8:1 0 2G 0 part
├─sda2 8:2 0 66G 0 part
├─sda3 8:3 0 500M 0 part /boot
├─sda4 8:4 0 1K 0 part
└─sda5 8:5 0 31.5G 0 part
├─centos-root 253:0 0 27.8G 0 lvm /
└─centos-swap 253:1 0 3.7G 0 lvm [SWAP]
sdb 8:16 0 1T 0 disk
└─sdb1 8:17 0 1024G 0 part
└─datavg-soft 253:2 0 1023.8G 0 lvm /var/www/html
sr0 11:0 1 55.9M 0 rom
loop0 7:0 0 3.8G 0 loop /var/www/html/soft/repo/rhel7.4
loop1 7:1 0 3.6G 0 loop /var/www/html/soft/repo/rhel7.1
loop2 7:2 0 4.2G 0 loop /var/www/html/soft/repo/rhel7.7
loop3 7:3 0 10.3G 0 loop /var/www/html/soft/repo/centos7.7
loop4 7:4 0 3.5G 0 loop /var/www/html/soft/repo/rhel6.6
loop5 7:5 0 514.6M 0 loop /mnt
挂载,并解压其中的压缩包:
# mkdir /cydir
# mount /dev/sr0 /cydir
# cd /cydir
# cp VMwareTools-10.3.10-12406962.tar.gz /root/
# cd /root/
# tar zxvf VMwareTools-10.3.10-12406962.tar.gz
# cd vmware-tools-distrib/
# ll
total 376
drwxr-xr-x 2 root root 87 Feb 20 2019 bin
drwxr-xr-x 5 root root 39 Feb 20 2019 caf
drwxr-xr-x 2 root root 67 Feb 20 2019 doc
drwxr-xr-x 5 root root 4096 Feb 20 2019 etc
-rw-r--r-- 1 root root 146996 Feb 20 2019 FILES
-rw-r--r-- 1 root root 2538 Feb 20 2019 INSTALL
drwxr-xr-x 2 root root 95 Feb 20 2019 installer
drwxr-xr-x 14 root root 181 Feb 20 2019 lib
drwxr-xr-x 3 root root 21 Feb 20 2019 vgauth
-rwxr-xr-x 1 root root 227024 Feb 20 2019 vmware-install.pl
执行解压后的安装脚本进行安装:
# ./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.10 build-12406962 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.
Stopping vmware-tools (via systemctl): [ OK ]
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
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]
INPUT: [yes] default
Do you want to enable Common Agent (caf)? [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.
The configuration of VMware Tools 10.3.10 build-12406962 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.
Found VMware Tools CDROM mounted at /cydir. Ejecting device /dev/sr0 ...
Enjoy,
--the VMware team
#