vmware / vmware/pyvmomi

Pickling pyvmomi class using multiprocessing

Open
#817 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted question
Dominant language
Python
Stars
2.3k
Forks
763
PR merge metrics
No merged PRs in 30d

Description

Hi folk,
I try do use python multiprocessing module to parallelize some data gathering from vcenter.
Unfortunately i have faced with following problem during starting parallel processes:

_pickle.PicklingError: Can't pickle <class 'pyVmomi.VmomiSupport.vim.VirtualMachine'>: attribute lookup vim.VirtualMachine on pyVmomi.VmomiSupport failed

So the question is, it's that true, that pymomi doesn't support "right pickling"?
Thanks, and appreciate.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with Python multiprocessing and a pyVmomi.VmomiSupport.vim.VirtualMachine instance. Investigate how pyVmomi defines and exposes that class during pickling; done means establishing whether multiprocessing pickling is supported and documenting or addressing the observed behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
18/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.