10

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

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

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

它说:

无法连接到主机。

错误:未找到指定的版本

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

值得一提的是,我有 VMware Player 7.1.2 版和 VIX 1.13 版。

我也不想买工作站。

4

4 回答 4

6

好的,设法让它工作,方法如下:

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"

于 2015-08-20T13:59:38.220 回答
6

遇到同样的问题,但使用了不同版本的 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:我不知道,但它有效:-)(尝试了一些其他值,它也有效)

于 2016-09-08T11:06:48.307 回答
5

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

播放器 19 vmdb 15.0.2 工作站-12.0.0

要编辑的文件位于 /usr/lib/vmware-vix/vixwrapper-config.txt 中。

于 2019-02-05T10:34:27.513 回答
3

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

播放器 19 vmdb 15.0.0 工作站-12.0.0

其中“player”代表 VMPlayer,“19”是 API 版本,“vmdb”是虚拟机存储库的形式,“15.0.0”是 VMPlayer 的版本,以及 API 库所在的子目录。

简而言之,使用“播放器”复制现有行并适应您的 VMPlayer 的正确版本。

于 2018-11-04T00:34:27.087 回答