手动安装vmware tools (亲测有效,最新)

linux 环境手动安装vmware tools

情景: 在vcenter虚拟化平台中看不到机器的ip,想知道ip得进入命令窗口通过命令获得,非常麻烦,然后可以通过安装vmware-tools可以解决,但直接点击安装又不行,就只能手动安装了,以下是我在安装过程中遇到的问题和优质的解决方案,本人是用第二种方法解决的

注:对于较新的 Linux 发行版,系统会提示用户选择集成的 open-vm-tools。

方法一

源作者: 如何在Linux操作系统上安装VMwareTools-阿里云帮助中心_-阿里云帮助中心 (aliyun.com)

1、安装VMware Tools

2、挂载

3、命令安装

##挂载cdrom到/mnt目录
[root@localhost /]# mount /dev/cdrom /mnt
mount: /dev/sr0 is write-protected, mounting read-only
[root@localhost /]# 

##切换至/mnt目录
[root@localhost /]# cd /mnt/
[root@localhost mnt]# 

##复制VMware Tools安装包至/tmp目录
[root@localhost mnt]# cp VMwareTools-10.3.23-17030940.tar.gz  /tmp/
[root@localhost mnt]# 
[root@localhost mnt]# 

##切换至/tmp目录
[root@localhost mnt]# cd /tmp/

##解压安装包
[root@localhost tmp]# tar zxf VMwareTools-10.3.23-17030940.tar.gz 
[root@localhost tmp]# 

##切换入解压后的目录
[root@localhost tmp]# cd vmware-tools-distrib/
[root@localhost vmware-tools-distrib]# 
[root@localhost vmware-tools-distrib]# 

##运行如下命令开始安装
[root@localhost vmware-tools-distrib]# ./vmware-install.pl 
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 ##选择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/rc.d] 

INPUT: [/etc/rc.d]  default

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

INPUT: [/etc/rc.d/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] yes

INPUT: [yes]

The installation of VMware Tools 10.3.23 build-17030940 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...


Making sure services for VMware Tools are stopped.

Stopping vmware-tools (via systemctl):  [  OK  ]


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

INPUT: [no]  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?
[no] 

INPUT: [no]  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.4



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.23 build-17030940 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.

Found VMware Tools CDROM mounted at /run/media/root/VMware Tools. Ejecting 
device /dev/sr0 ...
Enjoy,

--the VMware team

[root@localhost vmware-tools-distrib]# 
##安装完成

方法二

CentOS / Rocky Linux

步骤 1:打开终端

首先,打开你的CentOS或Rocky Linux虚拟机并登录到系统。然后,打开终端应用程序。

步骤 2:安装所需软件包

在终端中,使用以下命令安装所需的软件包:

sudo yum install -y open-vm-tools

步骤 3:重新启动虚拟机

安装完成后,重新启动Linux虚拟机以应用更改。

sudo reboot

步骤 4:验证安装

虚拟机重新启动后,登录到系统。然后,在终端中运行以下命令以验证VM Tools是否成功安装:

vmware-toolbox-cmd --version

如果安装成功,将显示VM Tools的版本信息。

Ubuntu

步骤 1:打开终端

首先,打开你的Ubuntu虚拟机并登录到系统。然后,打开终端应用程序。

步骤 2:安装所需软件包

在终端中,使用以下命令安装所需的软件包:

sudo apt update

sudo apt install -y open-vm-tools

步骤 3:重新启动虚拟机

安装完成后,重新启动Linux虚拟机以应用更改。

sudo reboot

步骤 4:验证安装

虚拟机重新启动后,登录到系统。然后,在终端中运行以下命令以验证VM Tools是否成功安装:

vmware-toolbox-cmd --version

如果安装成功,将显示VM Tools的版本信息。

结论

通过以上步骤,你已经成功在线安装了VM Tools,使你的Linux虚拟机能够充分利用VMware虚拟化平台的功能和性能增强。现在,你可以享受更顺畅的虚拟机体验了!

报错a:

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

解决a: 

解决方法:新开一个终端,创建目录,必要的时候需要重启系统

cd /etc
mkdir init.d
cd init.d
for i in {0,1,2,3,4,5,6}; do mkdir rc$i.d; done

报错b:

b, 找不到ifconfig 

解决b

解决方法:安装net-tools

pacman -S net-tools
### 回答1: 在 Linux 虚拟机中手动安装 VMware Tools,可以按照以下步骤进行操作: 1. 在 VMware 虚拟机中,选择“虚拟机”菜单,然后选择“安装 VMware Tools”。 2. 在虚拟机中,会自动挂载一个 VMware Tools 的 ISO 镜像文件。如果没有自动挂载,可以手动挂载。 3. 在终端中,切换到挂载点,通常是 /mnt/cdrom。 4. 解压 VMware Tools 安装包,可以使用 tar 命令:tar -zxvf VMwareTools-*.tar.gz。 5. 进入解压后的目录,执行 ./vmware-install.pl 命令,开始安装 VMware Tools。 6. 按照提示进行安装,可以使用默认选项。 7. 安装完成后,重启虚拟机,即可使用 VMware Tools 提供的功能,如自适应分辨率、拖放文件等。 注意:在安装 VMware Tools 之前,需要确保虚拟机已经连接到互联网,以便下载和安装必要的依赖包。 ### 回答2: 在使用Linux虚拟机时,为了获得更好的性能和更好的用户体验,需要安装VMware ToolsVMware Tools是一组工具,提供了对虚拟机的显卡、网络等方面的增强支持,使虚拟机更加稳定和高效。 下面是手动安装VMware Tools的步骤: 1. 打开虚拟机,登录到Linux系统。 2. 选择VMware工具菜单中的“安装VMware Tools”,会在Linux虚拟机中挂载一个CD映像。 3. 在终端中输入以下命令,将挂载的CD映像的内容解压到临时目录中: ``` tar zxvf /mnt/cdrom/VMwareTools-*.tar.gz -C /tmp/ ``` 如果提示“没有文件或目录”,则需要将/mnt/cdrom修改为实际的CD挂载路径。 4. 进入VMware Tools安装目录,运行安装脚本: ``` cd /tmp/vmware-tools-distrib sudo ./vmware-install.pl ``` 安装脚本会询问一些问题,可以按照默认选项回答,也可以根据实际需要进行调整。注意:在安装过程中可能需要输入管理员密码。 5. 安装完成后,重启Linux虚拟机。 6. 成功重启后,打开终端并输入以下命令,检查VMware Tools是否已安装: ``` vmware-toolbox-cmd -v ``` 如果安装正确,则会显示VMware Tools的版本号。 安装VMware Tools后,可以享受到更好的虚拟机性能和使用体验,例如支持高分辨率显示、更好的网络性能等。如果使用的是VMware虚拟机,建议在每次更新VMware Workstation或vSphere Client后重新安装VMware Tools,以确保获得最佳的虚拟化效果。 ### 回答3: 在 Linux 虚拟机中手动安装 VMWare Tools,需要注意以下几个步骤: 1. 打开 VMWare Workstation,选中你要安装的虚拟机,点击菜单栏中的“虚拟机”->“安装 VMWare Tools”。 2. 打开虚拟机的终端,输入以下命令: mkdir /mnt/cdrom mount /dev/cdrom /mnt/cdrom cp /mnt/cdrom/VMwareTools-version.tar.gz /tmp/ cd /tmp tar -xzvf VMwareTools-version.tar.gz 3. 运行安装程序,进入 VMware Tools 安装目录,输入以下命令启动安装: cd vmware-tools-distrib sudo ./vmware-tools-install.pl 4. 根据提示完成配置,安装程序会自动进行安装,其中会包含 VMware Tools 的核心文件和相关驱动程序。 5. 在安装过程中,可能会遇到一些询问,例如安装位置、提供的选项、网络配置等,按照你的需求选择即可。 6. 安装完成之后,重新启动虚拟机,即可享受 VMware Tools 带来的优化和增强功能。 总之,在 Linux 虚拟机中手动安装 VMWare Tools,需要先下载并安装相关的软件包,然后按照提示进行安装和配置,最后检查是否安装成功,并根据需求设置相应的配置选项。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

SilentCodeY

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值