安装vm-tools和xs-tools

一、centos7安装VMware-tools

tools分为闭源的VMware-tools和开源的open-vm-tools。在用rhel7/centos7做模板进行虚机部署的时候,VMware vSphere默认使用了open-vm-tools
vm-tools会提示:正在运行(受管客户机)
需要卸载现有open-vm-tools,然后重新安装VMware-tools

1.#rpm -e open-vm-tools --nodeps

2.安装依赖包
# yum -y install perl gcc gcc-c++ make cmake kernel kernel-headers kernel-devel net-tools

3.加载vmware tools 到CentOS7光驱CD-ROM
点击菜单 `虚拟机` ——> `安装VMware Tools(T)...`

4.将CD-ROM挂载到指定目录
#mkdir -p /mnt/cdrom
#mount -t /dev/cdrom /mnt/cdrom
#cp /mnt/cdrom/VMwareTools-10.0.5-3228253.tar.gz /tmp
#cd /tmp
# tar -zxvf VMwareTools-10.0.5-3228253.tar.gz
# umount /dev/cdrom

5.安装VMware Tools
#cd /tmp/vmware-tools-distrib/
# ./vmware-install.pl
然后一路Enter即可

二、CentOS-Linux安装 XS-Tools (XenServer)

1.在Xencenter里光驱换成xs-tools.iso

2.登陆SSH:
# cd /mnt
# mkdir xs-tools
# mount /dev/cdrom /mnt/xs-tools/

mount: block device /dev/cdrom is write-protected, mounting read-only

# cd /mnt/xs-tools/Linux/
# bash install.sh

Detected `CentOS release 5.2 (Final)’ (centos version 5).

The following changes will be made to this Virtual Machine:
* packages to be installed/upgraded:
- kernel-xen-2.6.18-53.1.13.el5.xs4.1.0.24.x86_64.rpm
- xe-guest-utilities-4.1.0-257.x86_64.rpm

Continue? [y/n] y

Preparing…########################################### [100%]
1:xe-guest-utilities########################################### [100%]
Preparing…########################################### [100%]
package kernel-xen-2.6.18-92.el5 (which is newer than kernel-xen-2.6.18-53.1.13.el5.xs4.1.0.24) is already installed

You should now reboot this Virtual Machine.
重启完成安装。