vmware / vmware/pyvmomi

Upload file to vm Error: [AttributeError: 'NoneType' object has no attribute 'fileManager']

Open
#882 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs verification
Dominant language
Python
Stars
2.3k
Forks
763
PR merge metrics
No merged PRs in 30d

Description

Hi,

I'm trying to execute the example code to upload file to vm. But I'm getting below error:
url = content.guestOperationsManager.fileManager.InitiateFileTransferToGuest(vm, creds, inputs['vm_path'],
AttributeError: 'NoneType' object has no attribute 'fileManager'

VSphere login, reverting snapshot are working fine, but when I try to upload file to vm the above error is occuring.

How to resolve this issue. Any help would be appreciated.

Thanks,
Manaswini

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 with the example invocation shown in the report and inspect why content.guestOperationsManager is None before fileManager is accessed. Reproduce the upload path and verify the guest-operation setup; done means the transfer call no longer raises this AttributeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.