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

2023-05-16

对于没钱买服务器的小白,只能靠安装虚拟机来勉强度日子。
最近比较闲,想实现一下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

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

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

  • VMware Workstation 英文改中文界面

    在控制面板 时间和语言 语言 区域中设置中文简体 感谢
  • 开发工具之 Snipaste(超级截图工具)

    snipaste工具是一款开源免费的超级截图工具 这里小编强烈推荐此工具的使用 前言 当你使用ALT TAB习惯性的来回切屏的时候 其实在这个过程中 仔细想想是不是比较累 这样子做久了很容易导致疲劳 所以小编强推贴图功能 好了废话不多说 直
  • VMware vRealize Suite 8.8.0

    https pan baidu com s 16 VtEGgAMia8vLjMweHjGA 输入提示信息 j323 目录 VMware vRealize Suite 2019 8 8 0 百度网盘群共享 629229614 VMware爱好
  • VMware 15 安装ubuntu 18.04的总结

    换了新电脑 想安装了VMware12 0版本的 结果发现安装包和我现在的电脑并不匹配 所以下载了较新版本的vmware 15 5 网上找到对应版本的序列号注册 在安装完成后激活即可 emsp 从Linux公社的文章 Ubuntu 18 04
  • VMware安装Windows Server 2003提示Operating System not found

    VMware安装Windows Server 2003提示Operating System not found 解决方法 首先 检查虚拟机设置里的设备状态的启动时连接是不是没勾选 还是不行的话 换一个ISO文件 正常的文件大小是600多兆
  • VMware虚拟化- 虚拟化与VMware的基础介绍

    1 什么是虚拟化 1 1 虚拟化概念 通俗的理解 如果你问 什么是虚拟化 我想大部分人的回答都会是 就是在一个操作系统中运行另一个操作系统 虽然这个答案也没错 但这并不是真正 虚拟化 的意义 只能说是虚拟化在硬件和操作系统之间的一个实践 事
  • Linux启动网卡时出现RTNETLINK answers: File exists错误解决方法

    一 问题描述 VMware中克隆虚拟机是经常的事情 虽然如此 用到虚拟机时 本人还是喜欢新安装一个操作系统 针对服务器的应用 在安装操作系统时 一并安装好 并且也花不了多少时间 但最近需要大量的配置一样的虚拟机进行测试 故安装了一个模板虚拟
  • 如何访问虚拟机中的Web服务

    需求 1 在虚拟机Vmware中安装了CentOS6 5 虚拟机使用NAT的方式 2 在CentOS中安装了APACHE 并且使用 http 192 168 237 128可以正常访问 3 想在其他windows机器上访问该虚拟机的web服
  • LAB1实验

    Part 1 遇到问题1 我将JOS放在Windows的目录下 通过VMware设置共享该文件夹来编译JOS 但是Windows更改linux下设置的权限 导致GDB无法调试QEMU 解决方法 将JOS放在虚拟机下的linux的目录下 20
  • VM安装windows7 32位

    首先你电脑必须安装了 VMware 推荐版本 VMware12 或者 VMware 11 版本 然后你还需要一个系统镜像 可以通过下面链接下载 Win7 的镜像 复制链接 打开迅雷新建任务即可下载 Windows7 64位 ed2k fil
  • Sublime Text 3 插件安装及Vim 模式设置

    Sublime Text 3 1 安装Sublime Text 3 下载安装 http www sublimetext com 3 Package Control安装 https sublime wbond net installation
  • 在VMware中给win10/win7虚拟机配置静态IP地址(保姆级教学,全是干货)

    1 点击VMware菜单栏的编辑 进入虚拟网络编辑器 2 点击更改设置 3 选择NAT模式 取消勾选 使用本地DHCP服务将IP地址分配给虚拟机 然后点击NAT设置 查看并记住网关IP 然后关闭NAT设置窗口 回到虚拟编辑器页面 点击确定
  • VM 快照期间 BizTalk 与 SQL 的连接问题

    我们有一个用于 BizTalk 的虚拟机和一个用于 SQL 后端的单独虚拟机 我们使用 Veeam 进行备份 这基本上会启动虚拟机的快照 当此快照在 SQL VM 上最终确定时 应用程序服务器上的 BizTalk 服务将失败 通常它们会自动
  • pgAdmin3 连接问题

    我最近正在使用 VMware Workstation 8 设置并运行 Windows 2008 r2 服务器 我正在运行带有 Postgresql 9 1 的 Centos 6 2 虚拟 Linux 盒子 本地一切似乎都正常 我可以通过桥接
  • VMware vFabric 服务器超时

    因此 我下载了 Spring Tool Suite 当我想启动 VMware vFabric tc Server 时 我收到以下消息 服务器 VMware vFabric tc Server Developer Edition v2 6 无
  • 区分 VMware 网络适配器和物理网络适配器 - 或 - 检测虚拟网络适配器

    我必须使用任何 Windows API 来区分真实地址和虚拟机地址 我在用着GetAdaptersAddresses用于填充本地计算机的 IP 地址列表的 API 我只需要提取除与 VMware 网络适配器关联的地址和其他地址 自动配置和隧
  • SVN控制共享虚拟机文件夹

    我在 Mac 上使用 subclipse 进行 SVN 结账 我希望能够与 Windows 7 中的 vmware 共享文件夹共享此文件夹 并使用 tortoiseSVN 在 VM 上 和 或 subclipse 在 Mac 上 执行更新
  • 通过 USB 记忆棒携带和操作整个开发盒。可行的?

    最近我一直在考虑投资一个有价值的 USB 笔式驱动器 类似于 并在虚拟机上安装操作系统并开始在其上进行开发 我的想法是 我希望能够携带我的开 发箱 成为一名Windows 发行版用于 Net 开发和Linux发行版像 RoR Perl 之类
  • 使用 REST API 通过 PHP 连接到 VCenter 身份验证错误

    我按照官方 vSphere 站点中的说明从服务器和答案中获取信息这里的另一个用户 https stackoverflow com a 49324757 12013253 据我了解 首先我必须获取会话id cis id 但结果我得到 null
  • 由于频繁断网,repo 同步卡在 99%

    我尝试重新同步cyanogenmod源 一直到99 阶段 但是这个阶段好像有一个大文件 而且由于我的网络连接经常断开 所以无法下载它 每次发生断开连接时 fatal early EOF被打印出来 则repo sync停止 似乎在下次运行时

随机推荐