How to Install VMware Tools in Arch Linux (Manjaro Linux)

摘要:
例如,您可以激活从主机上的文档到来宾计算机的复制和粘贴,反之亦然。或者,您可以创建一个共享文件夹,使文件可以从客户端或主机访问。因此,如果不需要,请安装VM

by adminOctober 2, 2019
VMware Tools incorporates many features that enhance the operation of VMware Workstation. For example, you can activate copy and pasting from documents on the host to the guest computer, or vice versa. Or you can create a shared folder to make files accessible from either the guest or the host machine. It is therefore prudent, if not necessary, to install VMware Tools in Arch Linux right after installing VMware Workstation.
In Arch Linux, VMware Tools does not install as easily as it does on Windows and other Linux distributions. One of the problem is the absence of “init directory” that the installer needs for it’s proper installation. A google search will point you the official Arch Linux website and a github vmware-tools-patches. Both articles are about making patches to make VMware Tools.
The procedure outlined below does not make any patches and only entails creating the systemd service file to start the VMware Tools service daemon.
Step 1 – Dowload VMware Tools
Download the VMware Tools package by clicking the “Install Tools” button at the bottom of the VMware Workstation’s window. You may also start the download process by using the menu at the top of the window by selecting VM/Install VMware Tools.
Step 2 – Unpack VMware Tools
If the VMware Tools download in Step 1 was successful, the installer ISO image would be automatically mounted on the file system, as shown in the screenshot below. The installer is mounted at /run/media/root/’VMware Tools’.
Let us unpack the compressed installer file to our home directory. Note that I am logged in as the user “root” and my home folder is “/root”.
# tar xf /run/media/root/'VMware Tools'/VMwareTools*.tar.gz -C /root
The uncompressed installer is now at my home directory as shown by the image below.
Step 3 – Create a Fake Init Directory
Before we run the installer, we need to create a fake init directory. The init directory is used by Linux distributions that use System V Init for initialization. Arch Linux does not use the System V Init but instead uses the new systemd initialization.
# for x in {0..6}; do mkdir -p /etc/init.d/rc${x}.d; done
Step 4 – Run the VMware Installer
Now, we can run the installer.
# ./vmware-tools-distrib/vmware-install.pl
On my install, I accepted all the defaults by pressing the enter key for all the prompts. The screenshot of the resulting message after the installation process is shown below. Take note that it says that it was unable to start the vmware-tools service.
Step 5 – Create a VMware Tools Service File
Create the service file /etc/systemd/system/vmwaretools.service by starting a text editor.
# nano /etc/systemd/system/vmwaretools.service
Type in the following text and save the file.
[Unit]
Description=VMWare Tools Daemon
[Service]
ExecStart=/etc/init.d/vmware-tools start
ExecStop=/etc/init.d/vmware-tools stop
PIDFile=/var/lock/subsys/vmware
TimeoutSec=0
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
Step 6 – Start and Enable VMware Tools Service
To start the VMware Tools service, you can use the command:
# systemctl start vmwaretools.service
To make the service start at boot time, we use the command:
# systemctl enable vmwaretools.service
Step 7 – Reboot and Check
To see if VMware Tools successfully starts after after a reboot, type the command:
# systemctl status vmwaretools.service
That’s it, and we have now a working VMware Tools Daemon.

VMware Tools包含许多增强VMware Workstation操作的功能。例如,您可以激活从主机上的文档到来宾计算机的复制和粘贴,反之亦然。或者,您可以创建一个共享文件夹,以使文件可从客户机或主机访问。因此,如果不需要,在安装VMware Workstation之后立即在Arch Linux中安装VMware Tools是明智的。
在Arch Linux中,VMware Tools的安装不像Windows和其他Linux发行版那样容易。问题之一是安装程序没有正确安装所需的“初始目录”。谷歌搜索将为您指出Arch Linux官方网站和github vmware-tools-patches。这两篇文章都是关于制作修补程序以制作VMware Tools的。
以下概述的过程不会进行任何修补,仅需要创建systemd服务文件来启动VMware Tools服务守护程序。
步骤1 –下载VMware Tools
单击VMware Workstation窗口底部的“安装工具”按钮,下载VMware Tools软件包。您也可以通过使用窗口顶部的菜单,选择VM / Install VMware Tools,开始下载过程。
步骤2 –解压缩VMware Tools
如果步骤1中的VMware Tools下载成功,则安装程序ISO映像将自动安装在文件系统上,如下面的屏幕快照所示。安装程序安装在/ run / media / root /“ VMware Tools”中。
让我们将压缩的安装程序文件解压缩到我们的主目录中。请注意,我以“ root”用户身份登录,主目录为“ / root”。
#tar xf / run / media / root /'VMware Tools'/ VMwareTools * .tar.gz -C / root
现在,未压缩的安装程序位于我的主目录中,如下图所示。
第3步–创建伪初始化目录
在运行安装程序之前,我们需要创建一个伪造的init目录。使用System V Init进行初始化的Linux发行版使用init目录。 Arch Linux不使用System V Init,而是使用新的systemd初始化。
#用于{0..6}中的x;做mkdir -p /etc/init.d/rc${x}.d;完成
步骤4 –运行VMware Installer
现在,我们可以运行安装程序了。
#./vmware-tools-distrib/vmware-install.pl
在安装过程中,我通过按所有提示的Enter键来接受所有默认设置。安装过程后生成的消息的屏幕截图如下所示。请注意,它说它无法启动vmware-tools服务。
步骤5 –创建VMware Tools服务文件
通过启动文本编辑器来创建服务文件/etc/systemd/system/vmwaretools.service。
#nano /etc/systemd/system/vmwaretools.service
输入以下文本并保存文件。

[Unit]
Description=VMWare Tools Daemon
[Service]
ExecStart=/etc/init.d/vmware-tools start
ExecStop=/etc/init.d/vmware-tools stop
PIDFile=/var/lock/subsys/vmware
TimeoutSec=0
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target

步骤6 –启动并启用VMware Tools服务
要启动VMware Tools服务,可以使用以下命令:
#systemctl启动vmwaretools.service
为了使服务在启动时启动,我们使用以下命令:
#systemctl启用vmwaretools.service
步骤7 –重新启动并检查
要查看重新启动后VMware Tools是否成功启动,请键入以下命令:
#systemctl status vmwaretools.service
就是这样,我们现在有一个正在运行的VMware Tools守护程序。

免责声明:文章转载自《How to Install VMware Tools in Arch Linux (Manjaro Linux)》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇CentOS8安装图形界面SQL Server 2008如何创建定期自动备份任务(一)下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

Centos下安装Mysql

一、二进制免编译包安装  参考:http://www.apelearn.com/bbs/forum.php?mod=viewthread&tid=10105&highlight=mysql5.7 1、下载地址: http://mirrors.sohu.com/mysql/MySQL-5.7/    文件名还glibc的为免编译的二进制安装包...

如何在Ubuntu server中修改IP

详细请移步至博客https://blog.csdn.net/shenzhen_zsw/article/details/74025066 方法一、 sudo  ifconfig eth0 100.100.100.60 netmask 255.255.255.0 注意:100.100.100.60为你想要改换的ip地址(即目标地址)   后面是子网掩码  方法...

CENTOS7静默安装ORACLE11G及数据泵迁移

2021年2月4日江苏淮安特钢 CENTOS7静默安装ORACLE11G及数据泵迁移 作者:查小广(北京红河谷时代信息技术有限公司) 检化验系统LIMS 数据库迁移 Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production lims数据库oracle:192.168.20....

debian+postfix+dovecot+squirrelmail安装配置笔记

系统和软件安装如下:1.debian4.02.postfix(MTA)提供smtp功能3.postfix-mysql提供postfix到mysql映射支持4.MYSQL用户数据库存储5.dovecot(POP3+IMAP+SASL)提供pop3+imap+(smtp sasl)6.amavisd-new libclass-dbi-mysql-perl sp...

(转)CentOS系统启动流程图文详解

CentOS系统启动流程图文详解. 原文:http://www.linuxidc.com/Linux/2017-03/141966.htm 熟悉系统启动流程对于我们学习Linux系统是非常有帮助的,虽然基础,但能帮助我们更加理解Linux系统的工作机制。以下将以CentOS发行版为例来介绍Linux系统的启动流程,因为在CentOS 5、CentOS 6以...

Linux学习3-yum安装java和Tomcat环境

前言 linux上安装软件,可以用yum非常方便,不需要下载解压,一个指令就能用yum安装java和tomcat环境。 前面一篇已经实现在阿里云服务器上搭建一个禅道系统的网站,算是小有成就,但并不是每个网站搭建都是这么简单的。 一般开发包是一个.war的文件,这就需要用到一个中间键,比如tomcat了,tomcat又是依赖于java环境的,所以先安装jav...