VMware Linux环境下安装VMware Tools

来源:互联网 发布:二叉树结点个数算法 编辑:程序博客网 时间:2024/05/01 21:56

一、前言

有时候需要在Linux环境下进行开发,会通过安装虚拟机的方式使用Linux。如果不安装VMtool,虚拟机分辨率不方便设置,并且不能和宿主机之间进行复制粘贴,安装VMtool后虚拟机分辨率会自动随窗口大小变化,也可以直接右键进行复制粘贴。比如窗口是这样的:
这里写图片描述

二、软件环境

Vmware Workstation 12,Ubuntu 16.04 Desktop

三、流程

1、 在菜单的虚拟机菜单项下选择重新安装VMware Tools

这里写图片描述

2、 这时候虚拟机的光驱中会插入VMware Tools的安装光盘,将光盘中的文件复制出来解压,然后执行文件夹中的vmware-install.pl脚本文件,一直按回车下一步就可以安装完成。安装完成后重启,虚拟机的分辨率就可以随窗口大小自动变化了,也可以跟物理机直接进行复制粘贴操作。具体安装过程命令行贴在下面。

root@ubuntu:~# cp /media/pan/VMware\ Tools/VMwareTools-10.0.10-4301679.tar.gz ~/root@ubuntu:~# tar -xzf VMwareTools-10.0.10-4301679.tar.gz root@ubuntu:~# ./vmware-tools-distrib/vmware-install.pl open-vm-tools are available from the OS vendor and VMware recommends using open-vm-tools. See http://kb.vmware.com/kb/2073803 for more information.Do you still want to proceed with this legacy installer? [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] Uninstalling the tar installation of VMware Tools.Stopping services for VMware ToolsStopping VMware Tools services in the virtual machine:   Guest operating system daemon:                                                                       done   Common Agent:                                                       done   VGAuthService:                                                      done   VMware User Agent (vmware-user):                                    done   Blocking file system:                                               done   Unmounting HGFS shares:                                             done   Guest filesystem driver:                                            doneStopping Thinprint services in the virtual machine:   Stopping Virtual Printing daemon:                                   doneThis program previously created the directory /var/lib/vmware-caf/pme/data/input, and was about to remove it. Since there arefiles in that directory that this program did not create, it will not be removed.This program previously created the directory /var/lib/vmware-caf/pme/data, andwas about to remove it. Since there are files in that directory that this program did not create, it will not be removed.This program previously created the directory /usr/lib/vmware-caf/pme/bin, and was about to remove it. Since there are files in that directory that this program did not create, it will not be removed.This program previously created the directory /etc/vmware-caf/pme/config, and was about to remove it. Since there are files in that directory that this program did not create, it will not be removed.This program previously created the directory /usr/lib/vmware-caf/pme, and was about to remove it. Since there are files in that directory that this program did not create, it will not be removed.This program previously created the directory /var/lib/vmware-caf/pme, and was about to remove it. Since there are files in that directory that this program did not create, it will not be removed.This program previously created the directory /var/lib/vmware-caf, and was about to remove it. Since there are files in that directory that this program did not create, it will not be removed.This program previously created the directory /etc/vmware-caf/pme, and was about to remove it. Since there are files in that directory that this program did not create, it will not be removed.This program previously created the directory /usr/lib/vmware-caf, and was about to remove it. Since there are files in that directory that this program did not create, it will not be removed.This program previously created the directory /etc/vmware-tools, and was about to remove it. Since there are files in that directory that this program did notcreate, it will not be removed.This program previously created the directory /etc/vmware-caf, and was about toremove it. Since there are files in that directory that this program did not create, it will not be removed.File /etc/pulse/default.pa is backed up to /etc/pulse/default.pa.old.0.The removal of VMware Tools 10.0.10 build-4301679 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/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] In which directory do you want to install the common agent library files? [/usr/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? [/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 10.0.10 build-4301679 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] Initializing...Making sure services for VMware Tools are stopped.Stopping Thinprint services in the virtual machine:   Stopping Virtual Printing daemon:                                   doneStopping VMware Tools services in the virtual machine:   Guest operating system daemon:                                      done   Common Agent:                                                       done   VGAuthService:                                                      done   VMware User Agent (vmware-user):                                    done   Blocking file system:                                               done   Unmounting HGFS shares:                                             done   Guest filesystem driver:                                            doneupdate-rc.d: warning: start and stop actions are no longer supported; falling back to defaultsupdate-rc.d: warning: start and stop actions are no longer supported; falling back to defaultsThe 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 installeror 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] The vmxnet driver is no longer supported on kernels 3.3 and greater. Please upgrade to a newer virtual NIC. (e.g., vmxnet3 or e1000e)The vmblock enables dragging or copying files between host and guest in a Fusion or Workstation virtual environment.  Do you wish to enable this feature?[yes] VMware automatic kernel modules enables automatic building and installation ofVMware kernel modules at boot that are not already present. This feature canbe enabled/disabled by re-running vmware-config-tools.pl.Would you like to enable VMware automatic kernel modules?[no] Thinprint provides driver-free printing. Do you wish to enable this feature? [yes] Disabling timer-based audio scheduling in pulseaudio.Do you want to enable Guest Authentication (vgauth)? Enabling vgauth is needed if you want to enable Common Agent (caf). [yes] Do you want to enable Common Agent (caf)? [yes] Detected X server version 1.18.3Distribution 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.update-initramfs: Generating /boot/initrd.img-4.4.0-31-genericNOTE: both /etc/vmware-tools/GuestProxyData/server/key.pem and       /etc/vmware-tools/GuestProxyData/server/cert.pem already exist.      They are not generated again. To regenerate them by force,      use the "vmware-guestproxycerttool -g -f" command.   Starting Virtual Printing daemon:                                   done   Checking acpi hot plug                                              doneStarting VMware Tools services in the virtual machine:   Switching to guest configuration:                                   done   Guest filesystem driver:                                            done   Mounting HGFS shares:                                               done   Blocking file system:                                               done   Guest operating system daemon:                                      done   VGAuthService:                                                      done   Common Agent:                                                       doneThe configuration of VMware Tools 10.0.10 build-4301679 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 "/usr/bin/vmware-toolbox-cmd" from thecommand line.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-user2. Log out and log back into your desktop session; and,3. Restart your X session.Enjoy,--the VMware teamFound VMware Tools CDROM mounted at /media/pan/VMware Tools. Ejecting device /dev/sr0 ...umount: /media/pan/VMware Tools: target is busy(In some cases useful info about processes thatuse the device is found by lsof(8) or fuser(1).)/usr/bin/eject: unmount of `/media/pan/VMware Tools' failedEject Failed:  If possible manually eject the Tools installer from the guest cdrom mounted at /media/pan/VMware Tools before canceling tools install on the host.root@ubuntu:~# reboot

四、结果

这里写图片描述

2 0
原创粉丝点击