Send scripted keyboard input to headless VM ?

This is for discussing general topics about how to use VirtualBox.
Post Reply
mark_orion
Posts: 33
Joined: 4. Nov 2008, 17:16

Send scripted keyboard input to headless VM ?

Post by mark_orion »

Is there a way to send keyboard input to a VM from the command line so that it can be scripted ? I want to be able to control (shutdown / reboot) a virtual appliance that has no guest additions installed and is not ACPI aware. The appliance is "Zeroshell" running on a Linux host (Ubuntu 10.04 Lucid).
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Send scripted keyboard input to headless VM ?

Post by Sasquatch »

Unless it has network access with SSH like remote options, then there is no way to do that other than a forced reboot/power down.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
kihjin
Posts: 71
Joined: 18. Nov 2008, 21:30
Primary OS: Ubuntu other
VBox Version: OSE self-compiled
Guest OSses: Ubuntu, Windows XP

Re: Send scripted keyboard input to headless VM ?

Post by kihjin »

Did you try:

VBoxManage controlvm keyboardputscancode
HubTou
Posts: 93
Joined: 24. Nov 2009, 11:01
Primary OS: FreeBSD
VBox Version: OSE other
Guest OSses: FreeBSD, OpenSolaris, and several Linuxes

Re: Send scripted keyboard input to headless VM ?

Post by HubTou »

Hello,
kihjin wrote:VBoxManage controlvm keyboardputscancode
You might want to check:
http://forums.virtualbox.org/viewtopic.php?f=1&t=33560

I have a shell library to ease the translation of command lines into scancode discussed there.

Best regards,

Hubert
Post Reply