vmware / vmware/pyvmomi

When is the vCenter API ready after reboot?

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

Nobody has claimed this yet.

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

Description

Hi,

I wrote a script, to automatically start given virtual machines, I have saved in a textfile.
The script starts, as it connects to the vCenters API.

I found out, that this is to quick, as the virtual machines will not start up. If I wait for 3 minutes after I have got a connection to the vCenter and start the "startup" script manually, it works.

Does anybody know, when the vCenter API is ready for starting the virtual Machines?
I tried to start them, after:

  • I could ping the vCenter
  • I got connectionState = 'connected'
  • I got GuestToolsRunning = 'guestToolsRunning'
  • I got powerState = 'poweredOn'

Is there a specific task or process running on the vCenter, that indicates, that the API is ready?

Error Messages: („The operation is not allowed in the current state.“)

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 vCenter API connection and the listed connectionState, GuestToolsRunning, and powerState checks, then investigate the “operation is not allowed in the current state” response after reboot. Done means identifying a reliable readiness signal or documenting that no such signal exists and explaining the supported sequence for starting virtual machines.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.