Vix vmrun doesn't work with VMware Player

Rex Feral picture Rex Feral · Aug 13, 2015 · Viewed 17.5k times · Source

I am trying to run a batch file on my virtual machine through VIX vmrun.

For starters it doesn't even want to start. When I try this in the command line:

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

It says:

Unable to connect to host.

Error: The specified version was not found

Any workaround for this? I heard it has something to do with VIX config files not handling VMware Player properly, but haven't found out anything specific.

For the mention I have VMware Player version 7.1.2 and VIX version 1.13.

Also I don't want to buy Workstation.

Answer

Rex Feral picture Rex Feral · Aug 20, 2015

Ok, managed to get it working, here's how:

1) In the VMware\VMware VIX folder there is a vixwrapper-config.txt file. Make a backup and overwrite the following over the content of the file:

#@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) If there is a folder named "Workstation-11.0.0-and-vSphere-6.0.0" then move it somewhere else as a backup

3) Make a copy of the folder "Workstation-10.0.0-and-vSphere-5.5.0" and name it:

Workstation-11.0.0-and-vSphere-6.0.0

4) Don't forget to add the vmrun path to the user variable: PATH (the vmrun path should be something like this: "C:\Program Files (x86)\VMware\VMware VIX\")

Now the vmrun commands should work.

The following command opens the VM:

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