安装VMWare tools,踩坑。记录一下

对于没钱买服务器的小白,只能靠安装虚拟机来勉强度日子。
最近比较闲,想实现一下docker的自动化部署,在制作java8镜像时出了个问题。
就是怎么在虚拟机上实现与本机文件夹的共享。

坑了2天。记录一下,环境 VMware® Workstation 12 Pro + CentOS

1. 首先是 CD/DVD(SATA) 这里的话 选择VMan安装目录的 linux.iso (C:\Program Files (x86)\VMware\VMware Workstation\linux.iso)

这里选择这个 是因为这里包含了 一些工具包,(https://www.linuxidc.com/Linux/2016-04/130806.htm)

选好后 ,打开虚拟机。

由于这里以及安装过了,所以是 重新安装。
点击安装后,会弹出一个框。

客户机操作系统已将 CD-ROM 门锁定,并且可能正在使用 CD-ROM,这可能会导致客户机无法识别介质的更改。如果可能,请在断开连接之前从客户机内部弹出 CD-ROM。确实要断开连接并覆盖锁定设置吗?

这个可以无视,不过。点了后。连接的虚拟机就不能用了。

2. 输入如下命令 
[root@localhost ~]# mkdir /mnt/cdrom --创建文件夹
输入 注意空格 
[root@localhost ~]#mount /dev/cdrom /mnt/cdrom/  -- 通俗地理解为将iso文件 挂载到 /mnt/cdrom 文件夹下

3。进入/mnt/cdrom 会出现一堆文件。
[root@localhost ~]# cd /mnt/cdrom/

[root@localhost cdrom]# ls

主要是那个红色的文件。将气拷贝至其他目录路

cp VMWareTools-10.0.10-4301679.tar.gz /home/VMWareTools-10.0.10-4301679.tar.gz

4. 进入目录/home,解压VMWareTools-10.0.10-4301679.tar.gz,解压后出现vmware-tools-distrib

  cd /home

  tar -zxf  VMWareTools-10.0.10-4301679.tar.gz

5.进入目录vmware-tools-distrib,运行安装文件./vmware-install.pl ,这里如果没有编译环境会报错(bash: ./vmware-install.pl: /usr/bin/perl: bad interpreter: ......)。

则需要安装  yum install perl gcc kernel-devel  安装后。在运行安装文件./vmware-install.pl

有[yes] 直接输入yes, 没有的直接回车。只到出现了一个重复的问题。以下是安装日志。

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? [yes] yes

A previous installation of VMware Tools has been detected.

The previous installation was made by the tar installer (version 4).

Keeping the tar4 installer database format.

You have a version of VMware Tools installed. Continuing this install will
first uninstall the currently installed version. Do you wish to continue?
(yes/no) [yes] yes

Uninstalling the tar installation of VMware Tools.

ValueError: 未定义 /sbin/vmtoolsd 的文件上下文
semanageFcontext: unable to set SELinux fcontext - command: "semanage fcontext
-d /sbin/vmtoolsd"
There was an error removing the local SELinux security context for VMware
Tools. Please make certain SELinux is set up correctly.

Stopping services for VMware Tools

This program previously created the file
/lib/vmware-tools/lib64/libconf/etc/gtk-2.0/gdk-pixbuf.loaders, and was about
to remove it. Somebody else apparently did it already.

This program previously created the file
/lib/vmware-tools/lib64/libconf/etc/gtk-2.0/gtk.immodules, and was about to
remove it. Somebody else apparently did it already.

The removal of VMware Tools 10.1.6 build-5214329 for Linux completed
successfully.

Installing VMware Tools.

In which directory do you want to install the binary files?
[/vm-tools]

The path "/vm-tools" does not exist currently. This program is going to create
it, including needed parent directories. Is this what you want? [yes]

What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc/rc.d]

What is the directory that contains the init scripts?
[/etc/rc.d/init.d]

In which directory do you want to install the daemon files?
[/sbin]

In which directory do you want to install the library files?
[/lib/vmware-tools]

The path "/lib/vmware-tools" does not exist currently. This program is going to
create it, including needed parent directories. Is this what you want?
[yes] yes

In which directory do you want to install the common agent library files?
[/lib]

In which directory do you want to install the common agent transient files?
[/var/lib]

In which directory do you want to install the documentation files?
[/doc/vmware-tools]

The path "/doc/vmware-tools" does not exist currently. This program is going to
create it, including needed parent directories. Is this what you want?
[yes] yes

The installation of VMware Tools 10.1.6 build-5214329 for Linux completed
successfully. You can decide to remove this software from your system at any
time by invoking the following command: "/vm-tools/vmware-uninstall-tools.pl".

Before running VMware Tools for the first time, you need to configure it by
invoking the following command: "/vm-tools/vmware-config-tools.pl". Do you want
this program to invoke the command for you now? [yes] yes

Initializing...

Making sure services for VMware Tools are stopped.

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? [yes] yes

Before you can compile modules, you need to have the following installed...

make
gcc
kernel headers of the running kernel

Searching for GCC...
Detected GCC binary at "/bin/gcc".
The path "/bin/gcc" appears to be a valid path to the gcc binary.
Would you like to change it? [no] no

Searching for a valid kernel header path... --这里要输入刚刚安装的repl 的include
The path "" is not a valid path to the 3.10.0-957.el7.x86_64 kernel headers.
Would you like to change it? [yes] yes

Enter the path to the kernel header files for the 3.10.0-957.el7.x86_64
kernel?

The path "" is not a valid path to the 3.10.0-957.el7.x86_64 kernel headers.
Would you like to change it? [yes] yes

Enter the path to the kernel header files for the 3.10.0-957.el7.x86_64
kernel? ""

Enter the path to the kernel header files for the 3.10.0-957.el7.x86_64
kernel? /usr/src/kernels/3.10.0-957.5.1.el7.x86_64/include

The path "/usr/src/kernels/3.10.0-957.5.1.el7.x86_64/include" is not a valid
path to the 3.10.0-957.el7.x86_64 kernel headers.

Would you like to change it? [yes] no

WARNING: This program cannot compile any modules for the following reason(s)...

- This program could not find a valid path to the kernel headers of the running
kernel. Please ensure that the header files for the running kernel are
installed on this sytem.

[ Press Enter key to continue ]

The filesystem driver (vmhgfs module) is used only for the shared folder
feature. The rest of the software provided by VMware Tools is designed to work
independently of this feature.

If you wish to have the shared folders feature, you can install the driver by
running vmware-config-tools.pl again after making sure that gcc, binutils, make
and the kernel sources for your running kernel are installed on your machine.
These packages are available on your distribution‘s installation CD.
[ Press Enter key to continue ] ......

后面yes 回车,输入即可,只到。

这里就OK啦。然后重启虚机。 reboot ;

设置共享文件夹。 虚拟机-》设置-》选项。

此时在linux中进入 /mnt/hgfs 文件夹,但发现共享的文件没有显示  继续。

[temp@localhost ~]$ vmware-hgfsclient
-bash: vmware-hgfsclient: 未找到命令
[temp@localhost ~]$ mount -t vmhgfs .host:/vm-share /mnt/hgfs  
mount: 只有 root 用户能使用“--types”选项
[temp@localhost ~]$ sudo mount -t vmhgfs .host:/vm-share /mnt/hgfs (红字是共享文件夹名称)
[sudo] temp 的密码:
Error: cannot mount filesystem: No such device(如提示该错误)
[temp@localhost ~]$ sudo yum install open-vm-tools (安装 yum install open-vm-tools)

完成后 。在执行 vmhgfs-fuse .host:/ /mnt/hgfs 

就有共享文件夹啦。

原文地址:https://www.cnblogs.com/yangcl-blogs/p/10449595.html

时间: 2024-10-10 22:25:10

安装VMWare tools,踩坑。记录一下的相关文章

安装Ubuntu16.04踩坑记录

下载Ubuntu16.04 中科大源 http://mirrors.ustc.edu.cn/ubuntu-releases/16.04/ 阿里云开源镜像站 http://mirrors.aliyun.com/ubuntu-releases/16.04/ 下载universal-USB-installer 制作U盘启动盘 准备一个U盘,格式化为FAT32 选择目标系统为Ubuntu,指定下载好的Ubuntu16.04 ISO镜像 制作完成 安装系统 重启计算机选择从U盘启动 如果U盘格式化为NTF

凝思6.0安装vmware tools记录

本文参考: https://blog.csdn.net/u013162548/article/details/45567681/ https://blog.csdn.net/qq920447939/article/details/79007980 1.从vmware菜单中选择安装vmware tools 2.虚拟机中会自动打开VMware tools的光驱 3.将光驱挂载到/mnt/cdrom,操作如下: 0) su root 1)cd /dev/cdrom 2) mkdir /mnt/cdro

Archlinux里面安装VMware Tools

用虚拟机学习linux确实很方便,但是和主机的文件共享是个大问题,VMWARE TOOLS可以很好的解决这个问题,但是在ARCH里却不能向大多数linux那样方便的安装,在查了很多帖子试了无数遍之后,终于安装成功,现将过程简单的记录一下,希望能对被这个问题困扰的朋友们有些帮助! 工作环境如下:linux:archlinux 2.6.25vmware 6.03 VMWARE的linux TOOLS 可以去如下网址下载:http://www.vmware.cn/Soft/1053.html Down

如何实现在虚拟机上的Linux系统上安装vmware tools

如何实现在虚拟机上的Linux系统上安装vmware tools工具 作者:何扬   时间:2017年9月23日  上午8:29:16 [安装目的]Linux下需要安装VMware Tools工具来实现主机和虚拟机直接文件复制粘贴功能. [基本流程] 1.首先,打开虚拟机,进入Linux系统登录界面,请以以root用户登入系统. 2.点击虚拟机VM菜单栏--虚拟机--安装VMware Tools,如图A-1所示(作者这里显示的是"重新安装VMware Tools",是因为作者之前已经安

关于安装VMware tools过程中的一些问题

安装的过程中,遇到的问题,记录一下:1.选中要安装VMware tools的linux虚拟机,然后点击VMware Workstation12顶部的"虚拟机(M)"按钮,选中"安装VMware tools"按钮,此时VMware tools的安装包就会默认放/media/vmware tools目录下2.创建一个目录:[[email protected] ~]# mkdir /mnt/cdrom3.将/media/vmware tools目录挂载到刚建立的/mnt/

【Pysc2】Deepmind Pysc2 环境配置及其踩坑记录

1. 下载星际争霸II游戏 可以直接下暴雪战网,然后在战网内下载. 2. 下载Pysc2 cmd后在命令行输入 pip install pysc2 3. 下载sc2 cmd后在命令行输入 pip install sc2 4. 下载地图 https://github.com/ClausewitzCPU0/SC2AI 解压密码: iagreetotheeula (表示自己同意最终用户许可协议) 解压在Maps的文件夹,我是使用的暴雪战网下载的游戏,发现游戏文件夹里并没有Maps, 需要自己手动创建.

Linux Git 踩坑记录

Linux Git 踩坑记录 git cherry-pick 冲突解决 出现: error: could not apply xxxxxx(commit ID)... ***** hint: after resolving the conflicts, mark the corrected paths hint: with 'git add ' or 'git rm ' hint: and commit the result with 'git commit' 此时使用git status命令查

虚拟机 安装 VMware Tools

为什么要安装VMware Tools ?    在操作虚拟机的时候是否会有些让你几乎不能忍受的地方,比如:鼠标移动不是很灵活.你的鼠标每次切换到真机都要按"Ctrl + Alt"键,这样是不是非常的麻烦.但是只要你在虚拟机中安装VMware Tools 后,所有的问题全都解决.这样可以帮助你更加轻松和流畅的来使用你的虚拟机. 安装环境    1)正常运行的虚拟机    2)linux版本的操作系统(5.9举例) 安装步骤     1 点击虚拟机安装VMware tools,此时会在li

手把手交大家在mac上用VMWare虚拟机装Linux-Ubuntu--及Ubuntu安装Vmware Tools[转载+一些修改](版本:17.04)

现在网上的虚拟机有很多,本人测试VMware在Mac上表现良好,推荐给大家 需要的工具 软件 vmware fusion for Mac (直接百度搜就好) 软件 Ubuntu 系统光盘 或 镜像文件(.iso) 安装Vmware 1.下载vmware fusion for Mac 网上有很多,大家自己找吧,最好找汉化版 2.安装Vmware 3.下面什么下一步啦,同意啦我就不说啦,为大家准备啦注册码 (我下载的VMware fusion 8 其他版本问度娘吧,有很多) Fusion 8序列号:

redhat安装VMware tools的方法

如果我们仔细看的话, 就会发现在VMware软件界面的左下角处显示着 "you don't have VMware Tools installed",即我们还没安装VMware Tools. VMware Tools有什么用呢? VMware Tools其实就是虚拟的显卡的驱动程序, 安装以后,虚拟系统屏幕的显示效果会更好, 除此之外,我在网上还发现有人说, 安装以后,鼠标就可以在主.客系统之间自如地移动, 而不需ctrl+alt组合键来切换(这确实有点麻烦). 接下来就简单介绍一下怎