Interacting programmatically with VirtualBox VMs

I searched for the possibility to have an uptodate Ubuntu VM so that when I need a new VM I just have to clone that VM. For that I did not want to have SSH installed inside the VM (the clone base should be minimalistic).

Sending text to VMs is easy as pie using the VirtualBox’s command line tool named VBoxManage.

Unfortunately you cannot send text but scancodes (which are not keycodes) but there are tools for translating text to scancode (e.g.

An excellent article about interacting with VirtualBox VMs without the need of services running on the VM itself can be foud here:

The way of sending keycodes is a little bit fragil because it’s like typing blind (the script just sends text by text without the knowledge if there is a login prompt or if the login was succesful or not), so perhaps the better solution would be to use of libraries like but for my need (keeping the VM uptodate) the script sending the scancodes does it’s work fine.

This entry was posted in Bash/Shell, Virtualization. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s