debian 10 命令行安装vmtools

简要步骤

如果挂载点目录尚不存在,请创建该目录。
挂载 CD-ROM 驱动器。
转到工作目录,例如 /tmp
解压缩安装程序。
运行安装程序,配置 VMware Tools

root@heion:/dev# mkdir /mnt/cdrom
mkdir: 无法创建目录 “/mnt/cdrom”: 文件已存在
root@heion:/dev# mount /dev/cdrom /mnt/cdrom
mount: /mnt/cdrom: WARNING: device write-protected, mounted read-only.
root@heion:/dev# cd /mnt/cdrom/
root@heion:/mnt/cdrom# ls
manifest.txt     VMwareTools-10.3.10-62.tar.gz  vmware-tools-upgrader-64
run_upgrader.sh  vmware-tools-upgrader-32
root@heion:/mnt/cdrom# cd /tmp/
root@heion:/tmp# tar zxpf /mnt/cdrom/VMwareTools-10.3.10-13959562.tar.gz
root@heion:/tmp# cd vmware-tools-distrib/
root@heion:/tmp/vmware-tools-distrib# ls
bin  caf  doc  etc  FILES  INSTALL  installer  lib  vgauth  vmware-install.pl
root@heion:/tmp/vmware-tools-distrib# ./vmware-install.pl
Setup is unable to find the "depmod" program on your machine. 
Please make sure it is installed. 
Do you want to specify the location of this program by hand?
[yes] Use of uninitialized value $gOption{"default"} in numeric eq (==) at ./vmware-install.pl line 866.
^C
root@heion:/tmp/vmware-tools-distrib# exit

安装

zzyy@heion:/tmp/vmware-tools-distrib$ sudo ./vmware-install.pl                             
[sudo] zzyy 的密码:                                                                           
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.                      
使用tar4格式创建新的VMware Tools安装程序数据库                                                                                           
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/)?   
包含init目录的目录是什么            
[/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 common agent library files?
要在哪个目录中安装公共代理库文件                  
[/usr/lib]                                                                                 
                                                                                           
INPUT: [/usr/lib]  default                                                                 
                                                                                           
In which directory do you want to install the common agent transient files?
要在哪个目录中安装公共代理瞬态文件                
[/var/lib]                                                                                 
                                                                                           
INPUT: [/var/lib]  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.10 build-13959562 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.
确保VMware工具的服务已停止                                         
                                                                                           
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 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]                                                              
                                                                                           
INPUT: [yes]  default                                                                      
                                                                                           
WARNING:  It appears your system does not have the required FUSE packages                  
installed.  The VMware Host-Guest filesystem requires the fuse packages and its            
libraries to function properly.  Please install the FUSE or fuse-utils package             
using your systems package management utility and re-run this script in order              
to enable the VMware Host-Guest filesystem.                                                
                                                                                           
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?
vmblock允许在Fusion或工作站虚拟环境中的主机和来宾之间拖动或复制文件。是否要启用此功能            
[yes]                                                                                      
                                                                                           
INPUT: [yes]  default                                                                      
                                                                                           
NOTICE:  It appears your system does not have the required fuse packages                   
installed.  The VMware blocking filesystem requires the fuse packages and its              
libraries to function properly.  Please install the fuse or fuse-utils package             
using your systems package management utility and re-run this script in order              
to enable the VMware blocking filesystem.                                                  
                                                                                           
                                                                                           
Skipping configuring automatic kernel modules as no drivers were installed by              
this installer.
正在跳过配置自动内核模块,因为此安装程序未安装驱动程序                                                                            
                                                                                           
Do you want to enable Guest Authentication (vgauth)? Enabling vgauth is needed             
if you want to enable Common Agent (caf). [yes] 
是否要启用来宾身份验证(vgauth)?如果要启用公共代理,则需要启用vgauth                                           
                                                                                           
INPUT: [yes]  default                                                                      
                                                                                           
Do you want to enable Common Agent (caf)? [no]                                             
是否要启用公共代理                                                                                           
INPUT: [no]  default                                                                       
                                                                                           
No X install found.                                                                        
                                                                                           
                                                                                           
Skipping rebuilding initrd boot image for kernel as no drivers to be included              
in boot image were installed by this installer.                                            
                                                                                           
Generating the key and certificate files.                                                  
Successfully generated the key and certificate files.                                      
The configuration of VMware Tools 10.3.10 build-13959562 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 /mnt/cdrom. Ejecting device /dev/sr0 ...               
Enjoy,                                                                                     
                                                                                           
--the VMware team                                                                          
                                                                                           
zzyy@heion:/tmp/vmware-tools-distrib$                                                      
                                                                                           

debian 10 命令行安装vmtools

建议您在 Linux 虚拟机中使用 Open VM Tools。

有关 Open VM Tools 支持的 Linux 发行版的详细信息,请参见 https://github.com/vmware/open-vm-tools/blob/master/README.md 和《VMware 兼容性指南》(网址为 https://www.vmware.com/resources/compatibility/search.php)。

在版本 10.3.10 中停止提供适用于 Linux 虚拟机的 VMware Tar 工具的功能,因此 Workstation Pro 中包含的 tar 工具 (linux.iso) 是 10.3.10,且不会进行更新。由于此更改,系统为以下 Linux 虚拟机禁用了 安装/更新/重新安装 VMware Tools 菜单:

  • tar 工具尚未正式支持现代的 Linux 发行版。
    • Red Hat Enterprise Linux 8 及更高版本。
    • CentOS 8 及更高版本。
    • Oracle Linux 8 及更高版本。
    • SUSE Linux Enterprise 15 及更高版本。
  • Linux 内核版本为 4.0 或更高版本,并且安装的 Open VM Tools 版本为 10.0.0 或更高版本。
  • Linux 内核版本为 3.10 或更高版本,并且安装的 Open VM Tools 版本为 10.3.0 或更高版本。

对于安装了 Open VM Tools 但不在上述范围内的 Linux 虚拟机,将启用安装/更新/重新安装 VMware Tools 菜单,以便您可以在 Open VM Tools 上安装捆绑的 tar 工具以获得共享文件夹 (HGFS) 功能支持。

对于 Open VM Tools 不支持的旧版 Linux 虚拟机,请执行以下步骤来安装 tar 工具。

前提条件

  • 开启虚拟机。
  • 确认客户机操作系统正在运行。
  • 因为 VMware Tools 安装程序是使用 Perl 编写的,请确认已在客户机操作系统中安装 Perl。

过程

  1. 在主机上,从 Workstation Pro 菜单栏中选择虚拟机 > 安装 VMware Tools

    如果安装了早期版本的 VMware Tools,则菜单项是 更新 VMware Tools

  2. 在虚拟机中,打开终端窗口。

  3. 运行不带参数的 mount 命令,以确定 Linux 发行版是否已自动挂载 VMware Tools 虚拟 CD-ROM 映像。

    如果已挂载 CD-ROM 设备,则将采用类似于以下输出的形式列出 CD-ROM 设备及其挂载点:

    /dev/cdrom on /mnt/cdrom type iso9660 (ro,nosuid,nodev)
    
  4. 如果未挂载 VMware Tools 虚拟 CD-ROM 映像,请挂载 CD-ROM 驱动器。

    1. 如果挂载点目录尚不存在,请创建该目录。

      mkdir /mnt/cdrom
      

      某些 Linux 发行版使用不同的挂载点名称。例如,一些发行版的挂载点是 /media/VMware Tools,而不是 /mnt/cdrom。修改该命令以反映您的发行版所使用的约定。

    2. 挂载 CD-ROM 驱动器。

      mount /dev/cdrom /mnt/cdrom
      

      某些 Linux 发行版使用不同的设备名称或采取不同的方式组织 /dev 目录。如果 CD-ROM 驱动器不是 /dev/cdrom,或者如果 CD-ROM 的挂载点不是 /mnt/cdrom,请修改该命令以反映您的发行版所使用的约定。

  5. 转到工作目录,例如 /tmp。

    cd /tmp

  6. (可选)在安装 VMware Tools 之前,删除以前的任何 vmware-tools-distrib 目录。

    此目录的位置取决于在先前安装期间指定的位置。通常情况下,此目录位于 /tmp/vmware-tools-distrib 中。

  7. 列出挂载点目录的内容,并记下 VMware Tools tar 安装程序的文件名。

    ls mount-point
    
  8. 解压缩安装程序。

    tar zxpf /mnt/cdrom/VMwareTools-x.x.x-yyyy.tar.gz
    

    值 x.x.x 是产品版本号,yyyy 是产品版本的内部版本号。

  9. 如有必要,请卸载 CD-ROM 映像。

    umount /dev/cdrom 
    

    如果 Linux 发行版已自动挂载 CD-ROM,则不需要卸载该映像。

  10. 运行安装程序并以 root 用户身份配置 VMware Tools。

    cd vmware-tools-distrib
    sudo ./vmware-install.pl
    

    通常,在安装程序文件结束运行后,将运行 vmware-config-tools.pl 配置文件。如果尝试在 RPM 安装的基础上执行 tar 安装,或者在 tar 安装的基础上执行 RPM 安装,安装程序将检测到先前的安装,并且必须转换安装程序数据库格式,然后才能继续。

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

参考

用户不在sudoers文件中的解决方法
在 Linux 虚拟机中手动安装 VMware Tools

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值