VCSA中l(wèi)inux系統(tǒng)虛擬機 (CentOS/RHEL最小化安裝版) 安裝 VMware Tools
一、簡介
# 在VCSA中創(chuàng)建完虛擬機后,創(chuàng)建的虛擬機默認是沒有安裝VMware Tools工具的。
本文以VCSA中部署的最小化安裝的CentOS 7虛擬機為例,詳細介紹了在VCSA中如何安裝VMware Tools工具。
二、進安裝VMware Tools前準備工作
1)在VCSA頁面中,點擊 “安裝VMware Tools”,如下圖所示
# 注意:執(zhí)行該步驟時,虛擬機要在開機的情況下才可以執(zhí)行成功
2)點擊 “掛載”,如下圖所示
3)在虛擬機的編輯設(shè)置中,查看CD/DVD驅(qū)動器中“VMware Tools”鏡像文件的狀態(tài)為“已連接”
三、進入系統(tǒng)后的相關(guān)操作
1)驗證“VMware Tools”鏡像文件在系統(tǒng)內(nèi)部是否可以看到,創(chuàng)建掛載目錄,并掛載
# 1、在/dev/目錄下有cdrom
[root@localhost ~]# ll /dev/cdrom
lrwxrwxrwx. 1 root root 3 9月 13 22:07 /dev/cdrom -> sr0
# 2、創(chuàng)建掛載點
[root@localhost ~]# mkdir /mnt/cdrom
# 3、掛載“VMware Tools”鏡像文件
[root@localhost ~]# mount -t iso9660 /dev/cdrom /mnt/cdrom
mount: /dev/sr0 寫保護,將以只讀方式掛載
[root@localhost ~]# ll /mnt/cdrom/
總用量 56840
-r-xr-xr-x. 1 root root 1976 10月 2 2019 manifest.txt
-r-xr-xr-x. 1 root root 4943 10月 2 2019 run_upgrader.sh
-r--r--r--. 1 root root 56405224 10月 2 2019 VMwareTools-10.3.21-14772444.tar.gz
-r-xr-xr-x. 1 root root 872044 10月 2 2019 vmware-tools-upgrader-32
-r-xr-xr-x. 1 root root 918184 10月 2 2019 vmware-tools-upgrader-64
2)拷貝“VMware Tools”鏡像文件中的tar包文件至家目錄,并解壓
# 拷貝“VMware Tools”安裝程序的tar包文件
[root@localhost ~]# cp /mnt/cdrom/VMwareTools-10.3.21-14772444.tar.gz ~
[root@localhost ~]#
[root@localhost ~]# ls
anaconda-ks.cfg VMwareTools-10.3.21-14772444.tar.gz
# 解壓tar包文件
[root@localhost ~]# tar zxvf VMwareTools-10.3.21-14772444.tar.gz
# 進入解壓后的文件夾
[root@localhost ~]# ls
anaconda-ks.cfg VMwareTools-10.3.21-14772444.tar.gz vmware-tools-distrib
[root@localhost ~]# cd vmware-tools-distrib/
[root@localhost 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]# ll
總用量 380
drwxr-xr-x. 2 root root 84 10月 2 2019 bin
drwxr-xr-x. 5 root root 36 10月 2 2019 caf
drwxr-xr-x. 2 root root 64 10月 2 2019 doc
drwxr-xr-x. 5 root root 4096 10月 2 2019 etc
-rw-r--r--. 1 root root 146996 10月 2 2019 FILES
-rw-r--r--. 1 root root 2538 10月 2 2019 INSTALL
drwxr-xr-x. 2 root root 91 10月 2 2019 installer
drwxr-xr-x. 14 root root 4096 10月 2 2019 lib
drwxr-xr-x. 3 root root 20 10月 2 2019 vgauth
-rwxr-xr-x. 1 root root 227024 10月 2 2019 vmware-install.pl
3)執(zhí)行VMware Tools安裝 : 預(yù)置環(huán)境部署
# 前置條件:系統(tǒng)中需已安裝gcc,gcc++環(huán)境,若未安裝,需執(zhí)行以下命令
[root@localhost ~]# yum install -y gcc gcc*
執(zhí)行安裝程序時,報錯提示:/usr/bin/perl: 壞的解釋器: 沒有那個文件或目錄
[root@localhost vmware-tools-distrib]# ./vmware-install.pl
-bash: ./vmware-install.pl: /usr/bin/perl: 壞的解釋器: 沒有那個文件或目錄
# 報錯原因為:沒有安裝perl環(huán)境,需手動安裝perl環(huán)境,執(zhí)行以下命令:
[root@localhost vmware-tools-distrib]# yum install -y perl
4)安裝VMware Tools可執(zhí)行文件: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 # 此處手動輸入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.
Stopping vmware-tools (via 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
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.
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.
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.
Found VMware Tools CDROM mounted at /mnt/cdrom. Ejecting device /dev/sr0 ...
Enjoy,
--the VMware team
[root@localhost vmware-tools-distrib]#
四、安裝完成后,需卸載VMware Tools鏡像
# 安裝完成后,需在命令行執(zhí)行以下命令卸載VMware Tools鏡像,釋放掛載的鏡像
[root@localhost vmware-tools-distrib]# umount /dev/cdrom
umount: /dev/cdrom:未掛載
文章來源:http://www.zghlxwxcb.cn/news/detail-792134.html
至此,已完成在VCSA中對linux系統(tǒng)命令行版虛擬機VMware Tools工具的安裝。文章來源地址http://www.zghlxwxcb.cn/news/detail-792134.html
到了這里,關(guān)于VCSA中l(wèi)inux系統(tǒng)虛擬機 (CentOS/RHEL最小化安裝版) 安裝 VMware Tools的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!