Vix vmrun 不适用于 VMware Player



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

对于初学者来说,它甚至不想启动。当我在命令行中尝试这样做时:

vmrun -T player start "D:myUserVMWareWindows7Windows 7.vmx"

它说:

无法连接到主机。

错误:没有找到指定的版本

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

我有VMware Player版本7.1.2和VIX版本1.13。

我也不想买工作站

好的,设法使它工作,下面是如何:

1)在VMwareVMware 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)如果有一个名为"工作站-11.0.0和vsphere -6.0.0"的文件夹,那么将其作为备份移动到其他地方

3)复制文件夹"工作站-10.0.0- vsphere -5.5.0",命名为:

Workstation-11.0.0-and-vSphere-6.0.0

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

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

打开虚拟机:

vmrun -T player start "D:myUserVMWareWindows7Windows 7.vmx"

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

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

在我的例子中起作用的是vixwrapper-config.txt

中的这一行
player    17  vmdb  12.1.1 Workstation-10.0.0-and-vSphere-5.5.0

地点:

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

  • workstation -10.0.0 and vsphere -5.5.0是VIX程序文件夹中的文件夹名称(我选择了最高版本)。似乎没有必要复制和重命名文件夹,只要指向一个现有的文件夹似乎就足够了)

  • 17:我不知道,但它的工作:-)(尝试了一些其他的值,它也工作)

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

player 19 vmdb 15.0.2 Workstation-12.0.0

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

正如vixwrapper-config文件中的注释所解释的那样,它是VIX工具(即vmrun)和VMware引擎(工作站,播放器,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库所在的子目录。

简单来说,复制现有的一行'player',并适应您的VMPlayer的适当版本。

最新更新