码迷,mamicode.com
首页 > 体系相干 > 详细

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

时间:2019-02-28 13:21:19      浏览:3436      评论:0      收藏:0      [点我收藏+]

标签:reboot   敕令   drive   script   first   distrib   mct   mpi   pil   

关于没钱大班事器的小白,只能靠装置虚拟机来委曲度日子。
比来比较闲,想完成一下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. 输入以下敕令 
[[email protected] ~]# mkdir /mnt/cdrom --创建文件夹
输入 留意空格 
[[email protected] ~]#mount /dev/cdrom /mnt/cdrom/  -- 浅显地理解为将iso文件 挂载到 /mnt/cdrom 文件夹下

3。进入/mnt/cdrom 会出现一堆文件。
[[email protected] ~]# cd /mnt/cdrom/  

[[email protected] 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 文件夹,但发明共享的文件没有显示  持续。

[[email protected] ~]$ vmware-hgfsclient
-bash: vmware-hgfsclient: 未找到敕令
[[email protected] ~]$ mount -t vmhgfs .host:/vm-share /mnt/hgfs  
mount: 只要 root 用户能应用“--types”选项
[[email protected] ~]$ sudo mount -t vmhgfs .host:/vm-share /mnt/hgfs (红字是共享文件夹称号)
[sudo] temp 的暗码:
Error: cannot mount filesystem: No such device(如提示该缺点)
[[email protected] ~]$ sudo yum install open-vm-tools (装置 yum install open-vm-tools)

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

技巧图片

就有共享文件夹啦。

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

标签:reboot   敕令   drive   script   first   distrib   mct   mpi   pil   

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

(0)
(0)
   
告发
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权一切 京ICP备13008772号-2
迷上了代码!