VMware虚拟机ubuntu系统安装VMware Tools实现主机与虚拟机互传文件
虚拟机:VMware Workstation
虚拟机系统:ubuntu
guest-ljtq6y@ubuntu:~$ uname -a
Linux ubuntu 4.4.0-21-generic #37-Ubuntu SMP Mon Apr 18 18:33:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
guest-ljtq6y@ubuntu:~$
装好ubuntu系统后,要使用vmware-tools实现文件共享,却发现虚拟机那里显示为灰色的,无法安装vmware-tools,在共享文件夹提示需要先安装vmware-tools。

解决方法如下:
虽然重新安装vmware tools 显示是灰色的,但是虚拟机的下载包里面有linux.iso

我们需要安装在linux上面,步骤如下:
1. 挂载镜像文件,虚拟机->设置->硬件->CD/DVD.右边“连接”下面选择“使用IOS镜像文件”,浏览选择虚拟机包目录下面linux.iso。

2. 挂载成功后,在虚拟机右下角cd/dvd,图标上右击选择“连接“,连接成功。放仨图,好找。(本人找的左下角,找了俩钟头)


3. 打开桌面上VMware Tools光盘文件,可以看到VMwareTools............tar.gz。


4. 解压压缩包到/home/Documents。
注意:文件在光盘里,光盘文件不能进行写操作,所以无法解压到当前文件夹。
ctrl+alt+f2切换到命令行模式,使用root权限解压。指令如下:
tar -xzvf VMwareTools............tar.gz -C /home/Documents #注意为大写-C,否则会报错,linux区分大小写
如果不知道压缩包路径,可以使用ctrl+L显示文件绝对路径。
5. 进入解压目录,安装。
cd /home/Documents
sudo ./vmware-install.pl
可能会报错 unable to copy the source file ./installer/services.sh to the destination file
(如果报错: failed to connect to socket /com/ubuntu/upstart connection refused,可以不予理会,不会对安装造成影响)
解决:安装报错后,重复安装,使linux自动创建路径,即可安装成功。以下是网上找的安装过程,经本人测试,可以安装成功
----------------------------------------------------------------------------------
[root@Fedora-W tmp]# cd vmware-tools-distrib
[root@Fedora-W vmware-tools-distrib]# ./vmware-install.pl
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]
Uninstalling the tar installation of VMware Tools.
The removal of VMware Tools 8.8.0 build-471268 for Linux completed
successfully.
Installing VMware Tools.
In which directory do you want to install the binary files?
[/usr] /bin
What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc]
What is the directory that contains the init scripts? [/etc]
The file /etc/vmware-tools that this program was about to install already
exists. Overwrite? [yes]
Unable to copy the source file ./installer/services.sh to the destination file
/etc/vmware-tools.
Execution aborted. //错误一次出现
[root@Fedora-W vmware-tools-distrib]# sudo ./vmware-install.pl
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]
Uninstalling the tar installation of VMware Tools.
The removal of VMware Tools 8.8.0 build-471268 for Linux completed
successfully.
Installing VMware Tools.
In which directory do you want to install the binary files?
[/bin]
What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc]
What is the directory that contains the init scripts? [/etc]
The file /etc/vmware-tools that this program was about to install already
exists. Overwrite? [yes]
Unable to copy the source file ./installer/services.sh to the destination file
/etc/vmware-tools.
Execution aborted. //错误2次出现
[root@Fedora-W vmware-tools-distrib]# sudo ./vmware-install.pl
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]
Uninstalling the tar installation of VMware Tools.
The removal of VMware Tools 8.8.0 build-471268 for Linux completed
successfully.
Installing VMware Tools.
In which directory do you want to install the binary files?
[/bin]
What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc] /etc/init.d
The path "/etc/init.d" is a directory which does not contain a rc0.d directory.
What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc] /etc/rc1.d
The path "/etc/rc1.d" is a directory which does not contain a rc0.d directory.
What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc] /rc0.d
The path "/rc0.d" is not an existing directory.
What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc] rc0.d/
The path "rc0.d" is not an existing directory.
What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc] /etc/vmware-tools
The path "/etc/vmware-tools" is a directory which does not contain a rc0.d
directory.
What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc]
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]
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]
The installation of VMware Tools 8.8.0 build-471268 for Linux completed
successfully. You can decide to remove this software from your system at any
time by invoking the following command: "/bin/vmware-uninstall-tools.pl".
Before running VMware Tools for the first time, you need to configure it by
invoking the following command: "/bin/vmware-config-tools.pl". Do you want this
program to invoke the command for you now? [yes]
Initializing...
Making sure services for VMware Tools are stopped.
Stopping vmware-tools (via systemctl): [确定]
[EXPERIMENTAL] The VMware FileSystem Sync Driver (vmsync) is a new feature that
creates backups of virtual machines. Please refer to the VMware Knowledge Base
for more details on this capability. Do you wish to enable this feature?
[no]
Before you can compile modules, you need to have the following installed...
make
gcc
kernel headers of the running kernel
Searching for GCC...
The path "" is not valid path to the gcc binary.
Would you like to change it? [yes]
What is the location of the gcc program on your machine?
The path "" is not valid path to the gcc binary.
Would you like to change it? [yes]
What is the location of the gcc program on your machine?
The path "" is not valid path to the gcc binary.
Would you like to change it? [yes] no
Searching for a valid kernel header path...
The path "" is not a valid path to the 2.6.40.8-4.fc15.i686.PAE kernel headers.
Would you like to change it? [yes]
Enter the path to the kernel header files for the 2.6.40.8-4.fc15.i686.PAE
kernel?
The path "" is not a valid path to the 2.6.40.8-4.fc15.i686.PAE 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 gcc binary. Please ensure
that the gcc binary is installed on this sytem.
- 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 communication service is used in addition to the standard communication
between the guest and the host. The rest of the software provided by VMware
Tools is designed to work independently of this feature.
If you wish to have the VMCI 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 ]
The VM communication interface socket family is used in conjunction with the VM
communication interface to provide a new communication path among guests and
host. The rest of this software provided by VMware Tools is designed to work
independently of this feature. If you wish to have the VSOCK 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 the Enter key to continue.]
The module vmxnet3 has already been installed on this system by another
installer or package and will not be modified by this installer. Use the flag
--clobber-kernel-modules=vmxnet3 to override.
The module pvscsi has already been installed on this system by another
installer or package and will not be modified by this installer. Use the flag
--clobber-kernel-modules=pvscsi to override.
The module vmmemctl has already been installed on this system by another
installer or package and will not be modified by this installer. Use the flag
--clobber-kernel-modules=vmmemctl to override.
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]
The fast network device driver (vmxnet module) is used only for our fast
networking interface. The rest of the software provided by VMware Tools is
designed to work independently of this feature.
If you wish to have the fast network driver enabled, 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 ]
!!! [EXPERIMENTAL] !!!
VMware automatic kernel modules enables automatic building and installation of
VMware kernel modules at boot they are not already present. By selecting yes,
you will be enabling this experimental feature. You can always disable this
feature by re-running vmware-config-tools.pl.
Would you like to enable VMware automatic kernel modules?
[no]
Disabling timer-based audio scheduling in pulseaudio.
Detected X server version 1.10.4
Distribution provided drivers for Xorg X server are used.
Skipping X configuration because X drivers are not included.
Creating a new initrd boot image for the kernel.
Starting vmware-tools (via systemctl): [确定]
The configuration of VMware Tools 8.8.0 build-471268 for Linux for this running
kernel completed successfully.
You must restart your X session before any mouse or graphics changes take
effect.
You can now run VMware Tools by invoking "/bin/vmware-toolbox-cmd" from the
command line or by invoking "/bin/vmware-toolbox" from the command line during
an X server session.
To enable advanced X features (e.g., guest resolution fit, drag and drop, and
file and text copy/paste), you will need to do one (or more) of the following:
1. Manually start /bin/vmware-user
2. Log out and log back into your desktop session; and,
3. Restart your X session.
Enjoy,
--the VMware team
[root@Fedora-W vmware-tools-distrib]#
安装过程原网址:http://blog.sina.com.cn/s/blog_66e7611801010to3.html
-----------------------------------------------------------------------------------------

浙公网安备 33010602011771号