Ubuntu 16.04 虚拟机安装 VMware Tools

Ubuntu 16.04 虚拟机安装 VMware Tools

1. 虚拟机 -> 安装 VMware Tools

Ubuntu 16.04 虚拟机安装 VMware Tools

2. 开启虚拟机 -> 虚拟机 -> 安装 VMware Tools

Ubuntu 16.04 虚拟机安装 VMware Tools

3. /media/strong/VMware\ Tools
Ctrl + L: /media/strong/VMware Tools

Ubuntu 16.04 虚拟机安装 VMware Tools

4. 安装 VMware Tools
open-vm-tools is a set of services and modules that enable several features in VMware products for better management of, and seamless user interactions with, guests. It includes kernel modules for enhancing the performance of virtual machines running Linux or other VMware supported Unix like guest operating systems.

[email protected]:~$ sudo su
[sudo] password for strong: 

[email protected]:/home/strong# find / -name open-vm-tools
/etc/init.d/open-vm-tools
/usr/share/lintian/overrides/open-vm-tools
/usr/share/doc/open-vm-tools
/usr/share/open-vm-tools
/usr/lib/open-vm-tools
[email protected]:~$ cd /media/strong/VMware\ Tools/
[email protected]:/media/strong/VMware Tools$ 
[email protected]:/media/strong/VMware Tools$ cp -a VMwareTools-10.0.10-4301679.tar.gz /home/strong/Downloads/
[email protected]:/media/strong/VMware Tools$ 
[email protected]:/media/strong/VMware Tools$ cd /home/strong/Downloads/
[email protected]:~/Downloads$ ls
VMwareTools-10.0.10-4301679.tar.gz
[email protected]:~/Downloads$ chmod 777 VMwareTools-10.0.10-4301679.tar.gz 
[email protected]:~/Downloads$ 
[email protected]:~/Downloads$ ll
total 70760
drwxr-xr-x  2 strong strong     4096 Oct 28 03:25 ./
drwxr-xr-x 18 strong strong     4096 Oct 28 03:15 ../
-rwxrwxrwx  1 strong strong 72448981 Aug 25  2016 VMwareTools-10.0.10-4301679.tar.gz*
[email protected]:~/Downloads$ 
[email protected]:~/Downloads$ tar -zxv -f VMwareTools-10.0.10-4301679.tar.gz 
[email protected]:~/Downloads$ 
[email protected]:~/Downloads$ ls
VMwareTools-10.0.10-4301679.tar.gz  vmware-tools-distrib
[email protected]:~/Downloads$ vmware-tools-distrib/vmware-install.pl 
vmware-tools-distrib/vmware-install.pl: 5: vmware-tools-distrib/vmware-install.pl: cannot create /var/log/vmware-install.log: Permission denied
tee: /var/log/vmware-install.log: Permission denied
Please re-run this program as the super user.

Execution aborted.

vmware-tools-distrib/vmware-install.pl: 7: vmware-tools-distrib/vmware-install.pl: cannot create /var/log/vmware-install.log: Permission denied
[email protected]:~/Downloads$ 
[email protected]:~/Downloads$ sudo vmware-tools-distrib/vmware-install.pl 
[sudo] password for strong: 
The installer has detected an existing installation of open-vm-tools on this 
system and will not attempt to remove and replace these user-space 
applications. It is recommended to use the open-vm-tools packages provided by 
the operating system. If you do not want to use the existing installation of 
open-vm-tools and attempt to install VMware Tools, you must uninstall the 
open-vm-tools packages and re-run this installer.
The packages that need to be removed are:
open-vm-tools
The installer will next check if there are any missing kernel drivers. Type yes
if you want to do this, otherwise type no [yes] no
......
[email protected]:~/Downloads$ 

5. 安装 VMware Tools 需要先卸载 open-vm-tools.
Please manually remove open-vm-tools before installing VMware Tools.

[email protected]:~/Downloads$ sudo apt-get autoremove open-vm-dkms open-vm-tools --purge
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package open-vm-dkms
[email protected]:~/Downloads$ 
[email protected]:~/Downloads$ sudo apt-get autoremove open-vm-tools --purge
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  libdumbnet1* libmspack0* libxmlsec1* libxmlsec1-openssl* open-vm-tools* open-vm-tools-desktop* snap-confine*
0 upgraded, 0 newly installed, 7 to remove and 51 not upgraded.
After this operation, 3,581 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 201518 files and directories currently installed.)
Removing open-vm-tools-desktop (2:10.2.0-3~ubuntu0.16.04.1) ...
Purging configuration files for open-vm-tools-desktop (2:10.2.0-3~ubuntu0.16.04.1) ...
Removing open-vm-tools (2:10.2.0-3~ubuntu0.16.04.1) ...
Purging configuration files for open-vm-tools (2:10.2.0-3~ubuntu0.16.04.1) ...
dpkg: warning: while removing open-vm-tools, directory '/etc/vmware-tools' not empty so not removed
Removing libdumbnet1:amd64 (1.12-7) ...
Removing libmspack0:amd64 (0.5-1ubuntu0.16.04.2) ...
Removing libxmlsec1-openssl (1.2.20-2ubuntu4) ...
Removing libxmlsec1 (1.2.20-2ubuntu4) ...
Removing snap-confine (2.34.2) ...
Purging configuration files for snap-confine (2.34.2) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
[email protected]:~/Downloads$ 

6. 安装 VMware Tools

[email protected]:~/Downloads$ sudo 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] 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 Tools

Stopping VMware Tools services in the virtual machine:
   VMware User Agent (vmware-user):                                    done
   Unmounting HGFS shares:                                             done
   Guest filesystem driver:                                            done

Stopping Thinprint services in the virtual machine:
   Stopping Virtual Printing daemon:                                   done

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:                                   done
Stopping VMware Tools services in the virtual machine:
   Guest operating system daemon:                                      done
   VMware User Agent (vmware-user):                                    done
   Unmounting HGFS shares:                                             done
   Guest filesystem driver:                                            done


update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
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] 

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 of
VMware kernel modules at boot that are not already present. This feature can
be 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.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.
update-initramfs: Generating /boot/initrd.img-4.8.0-36-generic
Generating the key and certificate files.
Successfully generated the key and certificate files.
   Starting Virtual Printing daemon:                                   done
   Checking acpi hot plug                                              done
Starting VMware Tools services in the virtual machine:
   Switching to guest configuration:                                   done
   Guest filesystem driver:                                            done
   Mounting HGFS shares:                                               done
   Blocking file system:                                               done
   VMware User Agent:                                                  done
   Guest operating system daemon:                                      done
   VGAuthService:                                                      done
   Common Agent:                                                       done
The 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 the
command 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-user
2. Log out and log back into your desktop session; and,
3. Restart your X session.

Enjoy,

--the VMware team

[email protected]:~/Downloads$