作者:手机用户2502889851 | 来源:互联网 | 2023-12-12 18:18
本文介绍了在CentOS6.5上安装VMwareTools及解决共享文件夹显示问题的方法。包括清空CD/DVD使用的ISO镜像文件、创建挂载目录、改变光驱设备的读写权限等步骤。最后给出了拷贝解压VMwareTools的操作。
1. 点击VM中“虚拟机(M)”->“设置”,将cd/dvd使用iso镜像文件清空
2. 创建挂载目录
1 mkdir /media/cdrom
2 mount /dev/cdrom /media/cdrom
3
4 安装虚拟机出现以下提示:
5 mount:block device /dev/sr0 is write - protected , mounting read-only
6 说明系统光驱加载成功,因为光驱是只读的,所以提示write-protected,mounting read-only,sr0是光驱设备名,
7 通过以下命令:ll /dev/cdrom
8 看到
9 lrwxrwxrwx. 1 root root 3 Dec 25 2013 /dev/cdrom -> sr0
10 即/dev/cdcom是sr0的软链接
11
12 改成
13 mount -o remount,rw /dev/sr0 /media
3. 拷贝解压,进入解压目录,执行,一路回车默认配置。
1 cp VMwareTools-9.6.2-1688356.tar.gz /root
2
3 cd /root
4 tar -xzvf VMwareTools-9.6.2-1688356.tar.gz
5
6 cd vmware-tools-distrib/
7 ./vmware-install.pl
4. windows主机上设置共享文件夹,在centos上对应是/mnt/hgfs/共享文件夹目录下
5. centos配置信息
1 用 vmware-hgfsclient 命令可以看到你的共享文件夹目录
2 使用 mount -t vmhgfs .host:/shareFolder /mnt/hgfs 命令挂载该共享文件夹。其中.host:/Documents是共享名,只需把Documents换成使用vmware-hgfsclient 命令得到的目录,/mnt/hgfs是挂载点
3 设置成开机挂载,用vi编缉/etc/fstab中的内容,在最下面增加一行内容为:
4 .host:/shareFolder /mnt/hgfs vmhgfs defaults 0 0
问题解决
(1)Unable to find the binary installation directory,删除一个文件即可。
1 A previous installation of VMware Tools has been detected.
2
3 The previous installation was made by the tar installer (version 4).
4
5 Keeping the tar4 installer database format.
6
7 You have a version of VMware Tools installed. Continuing this install will
8 first uninstall the currently installed version. Do you wish to continue?
9 (yes/no) [yes]
10 如果选择是,将会显示以下错误消息:
11
12 Error: Unable to find the binary installation directory (answer BINDIR)
13 in the installer database file "/etc/vmware-tools/locations".
14
15 Uninstall failed. Please correct the failure and re run the install.
16
17 Execution aborted.
1 rm -f /etc/vmware-tools/locations
(2)initctl: Job failed to start
1 Do you want to enable Guest Authentication (vgauth)? [yes]
2
3 No X install found.
4
5 Creating a new initrd boot image for the kernel.
6 vmware-tools-thinprint start/running
7 initctl: Job failed to start
8 Unable to start services for VMware Tools
9
10 Execution aborted.
1 移除文件
2 rm /etc/init/vmware-tools-thinprint.conf
3 重启服务
4 /etc/vmware-tools/services.sh start
centos6.5安装vmware tools&共享文件夹显示