Python VIX script throws exception after VMWare Worokstation upgrade

半腔热情 提交于 2021-02-11 12:45:02

问题


I have a python VMWare script I was using for a while. After recently upgrading my Workstation version from 15.5.5 to 15.5.6 the script is throwing exception in python VIX module:

Traceback (most recent call last):
  File "C:\Python38_64\lib\runpy.py", line 192, in _run_module_as_main
    return _run_code(code, main_globals, None,
...more...
    vm, ss = common.get_vm(params.vm_path, params.vm_snapshot)
  File "D:\play\vmware\common.py", line 52, in get_vm
    host = vix.VixHost()
  File "C:\Python38_64\lib\site-packages\vix\VixHost.py", line 141, in __init__
    raise VixError(vix.VixJob_GetError(job))
vix.VixError.VixError: VixError #22002: The specified version was not found

I uninstalled the new VMWare Workstation version and reinstalled 15.5.5. My vixwrapper-config.txt (after downgrade) looks like this:

#...more...
# will be the first used.  If for some reason that value fails, it will
# continue through any other matches.

# Workstation 15.0.0
ws        19  vmdb  15.0.0 Workstation-15.0.0
player    19  vmdb  15.0.0 Workstation-15.0.0

# latest un-versioned
ws        19  vmdb  e.x.p Workstation-15.0.0
player    19  vmdb  e.x.p Workstation-15.0.0

# EOF

I tried to pip uinstall vix and reinstall again but the issue persists. The VIX binding I use is:

pip show vix
Name: vix
Version: 1.0.7
Summary: VMware VIX binding for Python (unofficial)
Home-page: https://github.com/naim94a/vix
Author: Naim A.
Author-email: naim94a@gmail.com
License: GPLv3
Location: c:\python38_64\lib\site-packages
Requires: cffi, six
Required-by:

Using vmrun.exe start <path_to_vm> starts the VM without any issues. Any help will be appreciated.


回答1:


After changing vixwrapper-config.txt to modify the lines:

ws        19  vmdb  e.x.p Workstation-15.0.0
player    19  vmdb  e.x.p Workstation-15.0.0

to:

ws        19  vmdb  15.5.0 Workstation-15.0.0
player    19  vmdb  15.5.0 Workstation-15.0.0

it started to work again.



来源:https://stackoverflow.com/questions/63200575/python-vix-script-throws-exception-after-vmware-worokstation-upgrade

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!