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:
Code: Select all
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
Code: Select all
<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>
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.