[vbox-dev] Error while catching machine poweroff event via webservice

Andriy Yurchuk ayurchuk at minuteware.net
Fri Oct 11 08:24:19 GMT 2013


Hi!

I am trying to catch the event of machine's poweroff (when I select 
Close -> Power Off in the menu). Instead of the actual event i get an 
error from the webservice: "(SOAP-ENV:Client) VirtualBox error: 
(0x800706BE)". The steps I take are the following:
1. Start the machine from GUI
2. Login to webservice, find this machine, lock it with 'Shared' lock type
3. Create a listener from Console's event source, listen for 'All' 
events, register listener
4. In a loop run getEvent
After i poweroff the machine the getEvent call returns the above error.
I don't know if it's relevant but here is the code I use (Ruby). It is 
based on the custom object-oriented SOAP API wrapper I wrote:

VBox::WebService.connect
web_session = VBox::WebsessionManager.new
virtual_box = web_session.logon(:username => 'user', :password => 
'password')
session = web_session.get_session_object
virtual_box.find_machine(:name_or_id => 
'MACHINE1').lock_machine(:session => session, :lock_type => 'Shared')
event_source = session.console.event_source
listener = event_source.create_listener
event_source.register_listener(:listener => listener, :interesting => 
['Any'])
while true
   #the error goes from here
   ev = event_source.get_event(:listener => listener)
   sleep 1
end

The XML I get in the response from vboxwebsrv is the following:

<SOAP-ENV:Envelope 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:vbox="http://www.virtualbox.org/">
   <SOAP-ENV:Body>
     <SOAP-ENV:Fault>
       <faultcode>SOAP-ENV:Client</faultcode>
       <faultstring>VirtualBox error:  (0x800706BE)</faultstring>
       <detail>
         <vbox:RuntimeFault>
           <resultCode>-2147023170</resultCode>
           <interfaceID>00000000-0000-0000-0000-000000000000</interfaceID>
           <component/>
           <text/>
         </vbox:RuntimeFault>
       </detail>
     </SOAP-ENV:Fault>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

(If the formatting is not preserved all the info is in this forum 
thread: https://forums.virtualbox.org/viewtopic.php?f=34&t=57761)

The thing here is that I get the error only on poweroff, the other 
console events like snaphots, clipboard, drag/drop are catched fine. So 
I suspect it's not a bug in my code.
So where can I go from here? Maybe some debugging info I need to enable 
somewhere to see the root cause? I understand the info I provided might 
not be enough so I'll be glad to provide any additional info needed.

--
Regards,
Andriy Yurchuk




More information about the vbox-dev mailing list