[vbox-dev] Automate running a software

Alexey Eromenko al4321 at gmail.com
Wed Feb 22 20:49:37 GMT 2012


1. running exe from host on guest is possible via "Guest Control Execute".

1.a. copy the exe via shared folders.

1.b. run it
IConsole::IGuest.executeProcess()

Example in python:
console.guest.executeProcess(command.split()[0], flags,
command.split()[1:], env, self.guestcontrol_user,
self.guestcontrol_password, timeout*1000)

2. monitor:
VirtualBox has built-in statistics for many metrics.

IConsole::IDebugger.getStats()

Example in python:
self.statBytesReceived =
self.console.debugger.getStats("*%s/ReceiveBytes"  % str(int(vnic)-1),
False).splitlines()[2].split("=")[1].split('"')[1]
self.statBytesSent     =
self.console.debugger.getStats("*%s/TransmitBytes" % str(int(vnic)-1),
False).splitlines()[2].split("=")[1].split('"')[1]

3. Screenshots -- work in action:
http://forum.gns3.net/topic3262.html

First screenshot shows a 3rd party program getting information from
guest OS (such as network statistics and IP addresses)
2nd screenshot shows a 3rd party program *sending* a command from host
OS to guest OS.

-- 
-Alexey Eromenko "Technologov"




More information about the vbox-dev mailing list