Vix vmrun在VMware Player上无法使用。

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。
另外,我不想购买Workstation。
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"


6

我遇到了同样的问题,但是使用的是不同版本的VMWare player。

根据我的尝试,我认为你只需要在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:我不知道但它可以工作 :-)(尝试了其他一些值也可以工作)


5

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

player 19 vmdb 15.0.2 Workstation-12.0.0

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


有没有任何提示,这行代码应该用于最新的16.1.1版本的播放器? - Yves Martin

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

player 19 vmdb 15.0.0 Workstation-12.0.0

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

简而言之,复制现有行并调整为适合您的VMPlayer版本。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接