Vix vmrun 不适用于 VMware Player

Vix vmrun doesn't work with VMware Player

我正在尝试通过 VIX vm运行 在我的虚拟机上 运行 一个批处理文件。

对于初学者来说,它甚至不想开始。当我在命令行中尝试此操作时:

vmrun -T player start "D:\myUser\VMWare\Windows7\Windows 7.vmx"

它说:

Unable to connect to host.

Error: The specified version was not found

有什么解决方法吗?我听说这与VIX配置文件没有正确处理VMware Player有关,但还没有找到任何具体的东西。

顺便提一句,我有 VMware Player 7.1.2 版和 VIX 1.13 版。

我也不想买Workstation

好的,成功了,方法如下:

1) 在VMware\VMware VIX 文件夹中有一个vixwrapper-config.txt 文件。进行备份并覆盖以下文件内容:

#@Version-Info
#
# VixAllProducts revision mapping for Workstation/Player
#
# This file translates product version specifications into the appropriate Vix
# implementations.
#
# Each @Version-Info line has 5 white-space seperated entries:
#
#    provider-type: ws, esx, viserver, etc
#    apiVersion: the apiVersion supported, as passed in from VixHost_Connect()
#    ipc-type: none, vmdb, vmodl, cim
#    product-version: the product version string
#
#    implementation-directory: the path to the library that implements the
#          version described by the first 4 parameters
#
#
# The configuration is based on the first 4 fields, which describe
# the product.  The 5th field is the location.  To force it to try
# multiple location, the same configuration can be repeated.  Note that
# list is built in LIFO order, so the latest entry in the configuration
# will be the first used.  If for some reason that value fails, it will
# continue through any other matches.


# Workstation 11.1.2 and Player 7.1.2
ws        17  vmdb  11.1.2 Workstation-11.0.0-and-vSphere-6.0.0
player    17  vmdb   7.1.2 Workstation-11.0.0-and-vSphere-6.0.0
ws-shared 17  none  11.1.2 Workstation-11.0.0-and-vSphere-6.0.0

# EOF

2) 如果有一个名为 "Workstation-11.0.0-and-vSphere-6.0.0" 的文件夹,则将其移动到其他地方作为备份

3) 复制文件夹 "Workstation-10.0.0-and-vSphere-5.5.0" 并将其命名为:

Workstation-11.0.0-and-vSphere-6.0.0

4)不要忘记将vmrun路径添加到用户变量:PATH(vmrun路径应该是这样的:"C:\Program Files (x86)\VMware\VMware VIX\")

现在 vmrun 命令应该可以工作了。

以下命令打开虚拟机:

vmrun -T player start "D:\myUser\VMWare\Windows7\Windows 7.vmx"

遇到同样的问题,但使用不同版本的 VMWare 播放器。

根据我的尝试,我认为您只需要在 vixwrapper-config.txt 中有一行,将您必须的播放器版本重定向到 VIX 中的这些 "Workstation-xxxx" 文件夹之一文件夹。

在我的案例中起作用的是 vixwrapper 中的这一行-config.txt

player    17  vmdb  12.1.1 Workstation-10.0.0-and-vSphere-5.5.0

其中:

  • 12.1.1 是播放器的版本(根据帮助或属性中的关于框在可执行文件中)

  • Workstation-10.0.0-and-vSphere-5.5.0是文件夹名称VIX程序文件夹(我选的是最高版本,貌似不需要复制重命名文件夹,直接指向已有的就可以了)

  • 17 :我不知道,但它有效:-)(尝试了一些其他值并且有效太)

正如 vixwrapper-config 文件中的注释所解释的那样,它是 VIX 工具(即 vmrun)和您的 VMware 引擎(WorkStation、Player、ESX 等)之间的包装器。 现在,如果您想将此 VIX 包装到 VMplayer 15.0.0(以便能够使用 'vmrun -T player ...'),那么您必须有一行

玩家 19 vmdb 15.0.0 Workstation-12.0.0

其中 'player' 用于 VMPlayer,'19' 是 API 版本,'vmdb' 是您的虚拟机存储库的形式,'15.0.0' 是您的虚拟机版本VMPlayer,以及API库所在的子目录。

简而言之,使用 'player' 复制现有行并适应您的 VMPlayer 的正确版本。

扩展 Paul-et-Mickey 的答案(没有 50 分,无法发表评论,抱歉)。如果您使用的是最新版本的播放器等,请不要忘记包含次要版本。所以对我来说是

玩家 19 vmdb 15.0.2 Workstation-12.0.0

要编辑的文件在 /usr/lib/vmware-vix/vixwrapper-config.txt.