Skip to content

VMWare plugin incompatible to PyVmomi 9 #2324

@arogge

Description

@arogge

Bareos component version

all components on 24.0.4, RHEL 9

Steps to reproduce

  1. install PyVmomi 9
  2. run a VMWare backup

Expected results

Job should finish successfully

Actual results

File "/usr/lib64/bareos/plugins/BareosFdWrapper.py", line 69, in handle_plugin_event
return bareos_fd_plugin_object.handle_plugin_event(event)
File "/usr/lib64/bareos/plugins/bareos-fd-vmware.py", line 1066, in handle_plugin_event
return self.start_backup_job()
File "/usr/lib64/bareos/plugins/bareos-fd-vmware.py", line 506, in start_backup_job
return self.vadp.prepare_vm_backup()
File "/usr/lib64/bareos/plugins/bareos-fd-vmware.py", line 1482, in prepare_vm_backup
self.vmconfig2json()
File "/usr/lib64/bareos/plugins/bareos-fd-vmware.py", line 2522, in vmconfig2json
self.vm_config_info_json = json.dumps(
File "/usr/lib64/python3.9/json/__init__.py", line 234, in dumps
return cls(
File "/usr/local/lib/python3.9/site-packages/pyVmomi/VmomiSupport.py", line 2161, in __init__
raise Exception("No longer supported. Use pyVmomi.VmomiJSONEncoder instead.")
Exception: No longer supported. Use pyVmomi.VmomiJSONEncoder instead.

Environment

- OS: ``
- component:

Relevant log output

Relevant traces output

Anything else?

Did some testing with pyVmomi 9.0, changing
from pyVmomi.VmomiSupport import VmomiJSONEncoder
to
from pyVmomi.VmomiJSONEncoder import VmomiJSONEncoder
makes it work, successfully tested backup and restore.

Metadata

Metadata

Assignees

Labels

bugThis addresses a bug

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions