vmware / vmware/pyvmomi

How to send keyboard & mouse instructions to VM

Open
#641 2 comments 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

I'd like to request a sample of pyvmomi code that results in the hypervisor sending a keyboard & mouse instruction to a VM.

To make things a bit clearer, here's a specific example of something I may wish to do:
Send the 's' key to a VM and then an hour later send a left click mouse instruction to the VM at point x=101 y=202

I believe the only way to do this programmatically would be via a mouse-keyboard-screen connection, is that belief correct?
-If this belief is correct, this is a sample request for how to send a key & click somewhere in a VM via a program utilizing pyvmomi. Ideally one doing the exact things listed in the example, so that I can see what [if anything] needs to be done to handle a connection potentially being dropped after a period of time.
-If that belief is incorrect, what other way(s) can you use to programmatically instruct the esxi hypervisor to send keyboard & mouse instructions to a VM?

As of right now I know only one way to instruct a keyboard / mouse instruction to be sent to a VM, and that's non-programmatically via the vsphere GUI.

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

Begin with pyvmomi's API surface for the ESXi hypervisor and compare it with the vSphere GUI workflow. Determine whether a keyboard event and mouse click at x=101, y=202 can be sent programmatically and how a dropped connection should be handled; done means a documented, reproducible answer or sample.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.