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

Scott Gustafson scott at rngcabinetshop.com
Sun Feb 26 16:17:31 GMT 2012


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
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20120226/284cb966/attachment.html>


More information about the vbox-dev mailing list