欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  科技

虚拟机中的Linux安装VMware Tools的方法

程序员文章站 2023-08-13 12:17:31
虚拟机中的Linux安装VMware Tools的方法...

linux vmware tools安装步骤简易版

linux vmware tools安装估计有点困难,我也在网上看了好多版本的linux安装vmware tools,方法都一样。但是自己在安装过程中,还是遇到了点问题。但是最终还是搞定。我运行的是vmware workstation 8.0.4 , os: centos 6.0

1. 在cd-rom虚拟光驱中选择使用iso镜像,找到vmware tools 安装文件,如c:\program\vmware\vmware workstation\programs\linux.iso
    当然这个iso是你安装vmware workstation 的目录下的linux.iso,不是你的linux os 镜像文件。vmware tools一般都在这个文件里。

2. 以管理员身份进入linux,root账号

3. 退出到windows,在虚拟机菜单栏中点击 虚拟机-> 安装 vmware tools 子菜单,会弹出对话框,点击"确认" 安装
4. 挂载光驱:mount -t iso9660 /dev/cdrom /mnt

                加载cdrom设备,这是如果进入/mnt 目录下,你会发现一个文件:

                  vmwaretools-8.8.4-743747.tar.gz

                    这个就死vmware tools的linux软件包,也是我们刚才使用的winiso打开的liunx.iso

    有的虚拟机上估计执行mount /dev/cdrom /mnt/cdrom

    如果提示如下错误,挂载点不存在。,[root@localhost /]#mount /dev/cdrom /mnt/cdrom
                             mount: mount point /mnt/cdrom dose not exist

   请直接执行此命令:

     mount /dev/cdrom /opt
     cd /opt
或者应该可以使用自动挂载,直接进入
     cd /misc/cd

5. copy 此文件到临时文件夹

   cp /mnt/mvmwaretools-8.8.4-743747.tar.gz /tmp

6. 卸载cdrom,执行 umount /dev/cdrom

7. 进入tmp文件目录并解压此文件包

   cd /tmp

   tar zxf vmware-linux-tools.tar.gz

   解压默认到vmware-tools-distrib目录下:此时你可以使用ls -ll 查看文件夹下的文件

8. 进入vmware-tools-distrib,安装vmware tools.

    ./vmware-install.pl  执行安装,

    安装过程中他会一步一步的有问题回应,此过程中,你遇到后面显示[yes],[no],[yes][no]的直接输入yes,然后回车。其他的问题不管[]里面是什么,直接回车就好了,不要输入。

9. 大约5分钟左右安装完成。 执行init 6重启ok。

linux vmware tools安装步骤图文版,大家可以参考下

虚拟机中的Linux安装VMware Tools的方法

虚拟机中的Linux安装VMware Tools的方法


虚拟机中的Linux安装VMware Tools的方法


虚拟机中的Linux安装VMware Tools的方法

虚拟机中的Linux安装VMware Tools的方法

虚拟机中的Linux安装VMware Tools的方法

操作过程如下:

[root@localhost ~]# cd /
[root@localhost /]# ls
bin   dev home lost+found misc net proc sbin     srv tftpboot usr
boot etc lib   media       mnt   opt root selinux sys tmp       var
[root@localhost /]# cd /media
[root@localhost media]# ls
vmware tools
[root@localhost media]# cd vmware\ tools/
[root@localhost vmware tools]# ls
manifest.txt vmwaretools-8.1.3-203739.tar.gz
[root@localhost vmware tools]# cp vmwaretools-8.1.3-203739.tar.gz    /tmp
[root@localhost vmware tools]# cd /tmp
[root@localhost tmp]# ls
gconfd-root                                 scim-helper-manager-socket-root
keyring-lbbfvv                              scim-panel-socket:0-root
mapping-root                                scim-socket-frontend-root
orbit-root                                  ssh-fmnvlj2751
scim-bridge-0.3.0.lockfile-0@localhost:0.0 virtual-root.zxmhuv
scim-bridge-0.3.0.socket-0@localhost:0.0    vmwaretools-8.1.3-203739.tar.gz
[root@localhost tmp]# tar -zxf vmwaretools-8.1.3-203739.tar.gz 
[root@localhost tmp]# ls
gconfd-root                                 scim-panel-socket:0-root
keyring-lbbfvv                              scim-socket-frontend-root
mapping-root                                ssh-fmnvlj2751
orbit-root                                  virtual-root.zxmhuv
scim-bridge-0.3.0.lockfile-0@localhost:0.0 vmwaretools-8.1.3-203739.tar.gz
scim-bridge-0.3.0.socket-0@localhost:0.0    vmware-tools-distrib
scim-helper-manager-socket-root
[root@localhost tmp]# cd vmware-tools-distrib/
[root@localhost vmware-tools-distrib]# ls
bin doc etc files install installer lib vmware-install.pl
[root@localhost vmware-tools-distrib]# ./vmware-install.pl 
creating a new vmware tools installer database using the tar4 format.

installing vmware tools.

in which directory do you want to install the binary files? 
[/usr/bin] yes   


the path "yes" is a relative path. please enter an absolute path.

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/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? 
[/usr/sbin] 

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

the path "/usr/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 documentation files? 
[/usr/share/doc/vmware-tools] 
the path "yes" is a relative path. please enter an absolute path.

in which directory do you want to install the documentation files? 
[/usr/share/doc/vmware-tools] 
the path "/usr/share/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.1.3 build-203739 for linux completed 
successfully. you can decide to remove this software from your system at any 
time by invoking the following command: "/usr/bin/vmware-uninstall-tools.pl".

before running vmware tools for the first time, you need to configure it by 
invoking the following command: "/usr/bin/vmware-config-tools.pl". do you want 
this program to invoke the command for you now? [yes] 

stopping vmware tools services in the virtual machine:
guest operating system daemon:                          [确定]
virtual printing daemon:                                [确定]
unmounting hgfs shares:                                 [确定]
guest filesystem driver:                                [确定]

found a compatible pre-built module for vmmemctl. installing it...

found a compatible pre-built module for vmhgfs. installing it...

found a compatible pre-built module for vmxnet. installing it...

found a compatible pre-built module for vmblock. installing it...

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

found a compatible pre-built module for vmci. installing it...

found a compatible pre-built module for vsock. installing it...

found a compatible pre-built module for vmxnet3. installing it...

found a compatible pre-built module for pvscsi. installing it...

detected x.org version 7.1.

host resolution detected as "1440 x 900".

please choose one of the following display sizes that x will start with:

[1] "320x200"
[2] "320x240"
[3] "400x300"
[4] "512x384"
[5] "640x400"
[6] "640x480"
[7] "720x480"
[8] "800x480"
[9] "854x480"
[10] "720x576"
[11] "800x600"
[12] "1024x768"
[13] "1280x720"
[14] "1280x768"
[15] "1152x864"
[16] "1280x800"
[17]< "1366x768"
please enter a number between 1 and 17:

[17] 12   


x window system version 7.1.1
release date: 12 may 2006
x protocol version 11, revision 0, release 7.1.1
build operating system: linux 2.6.18-128.1.16.el5 i686 red hat, inc.
current operating system: linux localhost.localdomain 2.6.18-164.el5 #1 smp tue aug 18 15:51:54 edt 2009 i686
build date: 22 july 2009
build id: xorg-x11-server 1.1.1-48.67.el5 
before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
module loader present
markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (ii) informational,
(ww) warning, (ee) error, (ni) not implemented, (??) unknown.
(++) log file: "/tmp/vmware-config0/xf86configlog.16172", time: thu apr 1 02:40:28 2010
(++) using config file: "/tmp/vmware-config0/xf86config.16172"
the xkeyboard keymap compiler (xkbcomp) reports:
> warning:          multiple symbols for level 1/group 1 on key <i5f>
>                   using xf86sleep, ignoring xf86standby
> warning:          symbol map for key <i5f> redefined
>                   using last definition for conflicting fields
errors from xkbcomp are not fatal to the x server

x is running fine with the new config file.

freefontpath: fpe "unix/:7100" refcount is 2, should be 1; fixing.
creating a new initrd boot image for the kernel.
starting vmware tools services in the virtual machine:
switching to guest configuration:                       [确定]
paravirtual scsi module:                                [确定]
guest filesystem driver:                                [确定]
mounting hgfs shares:                                   [失败]
guest memory manager:                                   [确定]
guest vmxnet fast network device:                       [确定]
vm communication interface:                             [确定]
vm communication interface socket family:               [确定]
blocking file system:                                   [确定]
file system sync driver:                                [确定]
guest operating system daemon:                          [确定]
virtual printing daemon:                                [确定]

the configuration of vmware tools 8.1.3 build-203739 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 the following command: 
"/usr/bin/vmware-toolbox" 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 /usr/bin/vmware-user
2. log out and log back into your desktop session; and,
3. restart your x session.

to use the vmxnet driver, restart networking using the following commands: 
/etc/init.d/network stop
rmmod pcnet32
rmmod vmxnet
modprobe vmxnet
/etc/init.d/network start

enjoy,

--the vmware team

found vmware tools cdrom mounted at /media/vmware tools. ejecting device 
/dev/hdc ...
[root@localhost vmware-tools-distrib]#