Access the Virtualbox API inside the guest?
Posted: 24. Feb 2012, 16:02
I'm using "Vboxmanage guestproperty get|set" as a heartbeat indicator in my VMs (Windows 7-64 Prof host, SBS2003 & 3 XP guests). The host runs a 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:
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? Or do I contact the developers?
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:
Code: Select all
set vb = CreateObject("VirtualBox.VirtualBox")
Wscript.Echo "VirtualBox version " & vb.versionI assume either there is no API to access on a guest, or it's called by something else. Anyone know? Or do I contact the developers?