For Database connections, i would look to
DBI for whatever database engine is chosen. It is the standard, is stable, and has a clean interface. As for the database engine, i have used MySQL and
Sybase quite a bit, and have found that if MySQL cannot handle it, Sybase usually can.
On the vm within a vm, i am no help. I have implimented scripting languages in Perl using either source filters or Parse::* modules ... but with only some success.
remeber the immortal word's of Socrates who said, "I drank what ?"