Tuesday Dec 09, 2014

Send keystrokes to Virtualbox guest console

I hope I didn't anger anyone when I wrote the entry below.
It wasn't truely GUI-less after all. I used my Windows 7. True GUI-less-ness shouldn't require using Windows.

VirtualBox without GUI (INOUE Katsumi @ Tokyo)

1st level of GUIless-ness in VBox

So, here's 2nd level of GUIless-ness capability of VirtualBox software.
You can send keystrokes to guest's console by using VBoxManage command's
'controlvm keyboardputscancode' verb.

So one can do 'certain' simple things with pure command line interaction.

For example, with command sequences like below, you can boot linux guest from 2nd GRUB entry.
'50' is scan code for 'DOWN' key and 1c is 'Enter'.

$ vboxmanage startvm node1 --type headless
$ # sleep some seconds
$ VBoxManage controlvm node1 keyboardputscancode 50 d0
$ VBoxManage controlvm node1 keyboardputscancode 50 d0
$ VBoxManage controlvm node1 keyboardputscancode 1c 9c

Somehow, after booting with this, my console stops accepting any key.
I'm still searching for a solution.

Tuesday Nov 25, 2014

Am I in VirtualBox or OracleVM or KVM?

I happened to have 3 Oracle Linuxes running on VirtualBox guest and OracleVM DomU and KVM DomU now.
There is a handy command 'virt-what' which tells what virtualization technology you are in
and here are outputs.

$ sudo virt-what
[sudo] password for oracle:
virtualbox
# virt-what
xen
# unaame -a
Linux myserver.jp 2.6.32-300.25.1.el6uek.x86_64 #1 SMP Tue May 15 21:12:51 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
# virt-what
kvm
About

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

Search

Categories
Archives
« February 2015
SunMonTueWedThuFriSat
1
2
3
4
6
7
8
10
11
12
14
15
16
20
21
22
24
25
26
27
28
       
       
Today