我有一个python VMWare脚本,我已经用了一段时间了。在最近将我的工作站版本从15.5.5升级到15.5.6之后,脚本在python VIX模块中抛出异常:
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我卸载了新的VMWare工作站版本,并重新安装了15.5.5。我的vixwrapper-config.txt (降级后)如下所示:
#...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我尝试pip uinstall vix并重新安装,但问题仍然存在。我使用的VIX绑定是:
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:使用vmrun.exe start <path_to_vm>启动虚拟机时没有任何问题。任何帮助都将不胜感激。
发布于 2020-08-01 08:32:28
在更改vixwrapper-config.txt以修改行之后:
ws 19 vmdb e.x.p Workstation-15.0.0
player 19 vmdb e.x.p Workstation-15.0.0至:
ws 19 vmdb 15.5.0 Workstation-15.0.0
player 19 vmdb 15.5.0 Workstation-15.0.0它又开始工作了。
https://stackoverflow.com/questions/63200575
复制相似问题