[vbox-dev] Access the Virtualbox API inside the guest?

Klaus Espenlaub klaus.espenlaub at oracle.com
Mon Feb 27 01:33:58 PST 2012

The description below is not really clear, but with the subject it seems 
you want to call the VirtualBox API from within the guest. This isn't 
possible of course, as otherwise VMs would have way too much power.

Inside the guest there are much fewer requests possible, and those are 
implemented in in VBoxControl[.exe].


On 26.02.2012 17:17, Scott Gustafson wrote:
> I'm using "Vboxmanage guestproperty get|set" as a heartbeat indicator in
> my VMs (Windows 7-64 Prof host running VB 4.0.16 with extension pack,
> SBS2003 & 3 XP guests with 4.0.16's guest additions). The host runs a
> ".cmd" batch file every ten minutes that "guestproperty set"s a custom
> property to 0, then waits for the guest (running its own batch file) to
> set the property back to 1. If the guest does so within a certain time,
> the host assumes the guest is working properly, since the guest has to
> be able to run a batch file successfully to respond to the heartbeat
> request. Everything is working fine.
> But...
> I can't stand those flashing command windows every ten minutes. So I'm
> looking into running the "guestproperty get|set" stuff in a Visual Basic
> Script (.vbs), which will run invisibly. I found the SDK reference
> manual, and I'm hunting through it. I've hit a jam, though. The manual
> offers this code as a test to see the version of Virtualbox from a vbs file:
>     |set vb = CreateObject("VirtualBox.VirtualBox")
>     Wscript.Echo "VirtualBox version " & vb.version|
> On the host, this popus up a little window with the version listed. On a
> guest, I get an error: "ActiveX component can't create object:
> 'VirtualBox.VirtualBox' "
> I assume either there is no API to access on a guest, or it's called by
> something else. Anyone know?
> Scott Gustafson
> scott at rngcabinetshop.com
> _______________________________________________
> vbox-dev mailing list
> vbox-dev at virtualbox.org
> https://www.virtualbox.org/mailman/listinfo/vbox-dev

Oracle <http://www.oracle.com>
Dr. Klaus Espenlaub | Snr. Manager Software Development Desktop
Phone: +49 7151 60405 205 <tel:+49715160405205>
Oracle VM VirtualBox

ORACLE Deutschland B.V. & Co. KG | Werkstr. 24 | 71384 Weinstadt

ORACLE Deutschland B.V. & Co. KG
Hauptverwaltung: Riesstr. 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603
Geschäftsführer: Jürgen Kunz

Komplementärin: ORACLE Deutschland Verwaltung B.V.
Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
Geschäftsführer: Alexander van der Ven, Astrid Kepper, Val Maher

Green Oracle <http://www.oracle.com/commitment> 	Oracle is committed to
developing practices and products that help protect the environment

More information about the vbox-dev mailing list