Vmware 8.0.4为例子
步骤1、VM->Install Vmware Tools...
步骤2、查看要安装的Tools镜像文件(一般为linux.iso),连接光驱
步骤3、查看是否挂载
[root@localhost ~]# mount
...
proc on /proc type proc (rw)
/dev/sr0 on /mnt type iso9660 (ro)
...
如上,如果输出有...type iso9660...挂载记录,则说明已经挂载了
[root@localhost ~]# cd /mnt/
[root@localhost mnt]# ls
ls: reading directory .: Input/output error
#如上,提示错误(估计是没卸载之前的已经加载的光盘导致),解决方法:先power off,再power on,然后重复上述步骤1、VM->Install Vmware Tools...,接着如下
[root@localhost ~]# mkdir /mnt/cdrom
[root@localhost ~]# mount /dev/cdrom /mnt/cdrom/
mount: block device /dev/sr0 is write-protected,mounting read-only
[root@localhost ~]# mount
...
/dev/sr0 on /mnt type iso9660 (ro)
步骤4、查找vmtools安装文件
[root@localhost cdrom]# ls
manifest.txt VMwareTools-8.8.4-743747.tar.gz
步骤5、解压安装文件【建议新建一个临时目录,用完后可以直接删除该临时目录】
[root@localhost cdrom]# mkdir /tmp/temp
[root@localhost cdrom]# cd /tmp/temp/#先进入到要解压到的目录
[root@localhost temp]# tar -xzvf /mnt/cdrom/VMwareTools-8.8.4-743747.tar.gz
步骤6、进入工具目录,并安装
[root@localhost temp]# cd vmware-tools-distrib/
[root@localhost vmware-tools-distrib]# ls
bin doc etc FILES INSTALL installer lib vmware-install.pl
[root@localhost vmware-tools-distrib]# ./vmware-install.pl
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]
#说明:括号中的值表示缺省值,直接回车即可,接下还会遇到类似的,一路回车即可
...
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; and,
3. Restart your X session.
Enjoy,
--the VMware team
Found VMware Tools CDROM mounted at /mnt/cdrom. Ejecting device /dev/sr0 ...
No eject (or equivilant) command could be located.
Eject Failed: If possible manually eject the Tools installer from the guest
cdrom mounted at /mnt/cdrom before canceling tools install on the host.
查看安装情况:
如图,已经显示为Reinstall Vmware Tools...,说明已经安装上了
步骤7、配置
1).手动启动vmware-usr
[root@localhost vmware-tools-distrib]# /usr/bin/vmware-user
2).启动Xwindow
# startx #这一步只能在本机上执行,不能通过类似xshell之类的执行
3).退出xwindow
4).重启xwindow
# startx
5).配置网络
a.插入网线
b.log out
备注:该步骤似乎只在安装时没连接网线时才要。。。
卸载vmtools
步骤1、找到vmware-uninstall-toos.pl所在目录,进入该目录下,运行以下命令
[root@localhost bin]# vmware-uninstall-tools.pl
步骤2、查找残余文件,删除残余文件
[root@localhost bin]# find / -name *vmware-tools*
...
[root@localhost bin]# rm –rf vmware-tools-distrib
[root@localhost bin]# cd /etc
[root@localhost etc]# rm –rf vmware-tools
[root@localhost etc]# rm –rf /usr/lib/vmware-toos
步骤3、检查是否删除
[root@localhost bin]# find / -name *vmware-tools*