while using vi in Oracle virtual box with Ubuntu 12.04 as the guest OS with Windows 7 as the host, when we press arrow keys in insert mode, it used to print B, A, D, C
to fix this add the below line to the .vimrc file, if it is no file create it
set nocompatible
after this setting if you open the vi , the problem should not come