Send keystrokes to guest os with vmrun

1.4k Views Asked by At

I can't find documentation or examples of how use typeKeystrokesInGuest command of vmrun tool.

I tried send key code, like 30 and I try send Some text, but always got Insufficient permissions in the host operating system. I think, I must give right permission, but I don't know where, and I don't know is I use described command in properly way.

2

There are 2 best solutions below

0
On

Govc it's supposed to do this job as well I have found a bug which I'm hoping they'll fix soon

0
On

If I remember right, vmrun uses the VIX API which is slated to be deprecated. A new option is to use the PutUsbScanCodes method that is available with the vSphere 6.5 API and does not have a dependency of VMware Tools running on the guest OS.

More information is available at the following: https://www.virtuallyghetto.com/2017/09/automating-vm-keystrokes-using-the-vsphere-api-powercli.html