【笔记】VMwareWorkstation手动在虚拟机内安装VMwareTools

前言

VMwareWorkstation手动在虚拟机内安装VMwareTools
解决重新安装 Vmware Tools按钮为灰色的问题

虚拟机为Windows

下载依赖

1
wget https://softwareupdate.vmware.com/cds/vmw-desktop/ws/17.6.1/24319023/windows/packages/tools-windows.tar
  • 解压tools-windows.tar文件得到.iso文件

挂载VMwareTools

  • 虚拟机->设置

  • CD/DVD->勾选已连接->勾选使用ISO映像文件->确定

安装VMwareTools

  • 此电脑->右键DVD 驱动器 VMware Tools->从媒体安装或运行程序

  • 下一步

  • 下一步

  • 安装

  • 完成

卸载VMwareTools

  • 下一步

  • 勾选删除->下一步

  • 删除

  • 完成

虚拟机为Linux

通用方法

下载依赖

1
wget https://packages-prod.broadcom.com/tools/frozen/linux/linux.iso

挂载VMwareTools

  • 虚拟机->设置

  • CD/DVD->勾选已连接->勾选使用ISO映像文件->确定

  • 在虚拟机中挂在目录
1
2
mkdir /mnt/cdrom
mount /dev/cdrom /mnt/cdrom

安装VMwareTools

1
2
3
4
5
6
7
mkdir /root/vmware-tools
cp /mnt/cdrom/VMwareTools-*.tar.gz /root/vmware-tools
cd /root/vmware-tools
tar -xzf VMwareTools-*.tar.gz
cd vmware-tools-distrib
./vmware-install.pl
reboot
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
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? [no] yes

INPUT: [yes]

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]

INPUT: [/usr/bin] default

What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc]

INPUT: [/etc] default

What is the directory that contains the init scripts?
[/etc/init.d]

INPUT: [/etc/init.d] default

In which directory do you want to install the daemon files?
[/usr/sbin]

INPUT: [/usr/sbin] default

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

INPUT: [/usr/lib/vmware-tools] default

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]

INPUT: [yes] default

In which directory do you want to install the documentation files?
[/usr/share/doc/vmware-tools]

INPUT: [/usr/share/doc/vmware-tools] default

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]

INPUT: [yes] default

The installation of VMware Tools 10.3.26 build-22085142 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]

INPUT: [yes] default

Initializing...

Segmentation fault (core dumped)

Making sure services for VMware Tools are stopped.

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


The installation status of vmsync could not be determined.
Skippinginstallation.

The installation status of vmci could not be determined. Skippinginstallation.

The installation status of vsock could not be determined. Skippinginstallation.


The installation status of vmxnet3 could not be determined.
Skippinginstallation.

The installation status of pvscsi could not be determined.
Skippinginstallation.

The installation status of vmmemctl could not be determined.
Skippinginstallation.

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]

INPUT: [yes] default

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]

INPUT: [yes] default


Skipping configuring automatic kernel modules as no drivers were installed by
this installer.


Disabling timer-based audio scheduling in pulseaudio.

Do you want to enable Guest Authentication (vgauth)? [yes]

INPUT: [yes] default



Detected X server version 1.20.13



Distribution provided drivers for Xorg X server are used.

Skipping X configuration because X drivers are not included.


Skipping rebuilding initrd boot image for kernel as no drivers to be included
in boot image were installed by this installer.

The configuration of VMware Tools 10.3.26 build-22085142 for Linux for this
running kernel completed successfully.

You must restart your X session before any mouse or graphics changes take
effect.

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
3. Restart your X session.

Enjoy,

--the VMware team

清理(可选)

1
2
3
4
cd
umount /mnt/cdrom
rmdir /mnt/cdrom
rm -rf /root/vmware-tools

虚拟机为Ubuntu

1
apt install open-vm-tools open-vm-tools-desktop

虚拟机为Kali

挂载VMwareTools

  • VMware菜单-> 虚拟机->安装 VMware Tools(因为我的已经安装成功,所以这里显示重新安装 VMware Tools)

  • 挂载成功后,kali系统会提示有光盘插入

安装VMwareTools

  • 复制虚拟光盘映像中的安装压缩包到本地Home目录
1
cp /media/cdrom/VMwareTools-10.3.10-13959562.tar.gz ~
  • 解压压缩包
1
tar -xf VMwareTools-10.3.10-13959562.tar.gz vmware-tools-distrib/
  • 执行安装命令
1
2
cd ~
vmware-tools-distrib/vmware-install.pl

执行安装命令后,会遇到停顿,脚本会自动向你询问安装的具体配置,你可以根据需要在”()”内选择一项输入,也可以直接按回车键使用默认配置

  • 显示”Enjoy,”表示安装成功

完成

参考文献

知乎——fRee