<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>Hi Klaus/All,<br><br>Well ... I think I have finally got this figured-out and working.<br><br>I am still using the exact steps as described in my original message. After not being able to get this to work ... I decided to just on a whim try a "wildcard".<br><br>The IMachine::enumerateGuestProperties documentation specifically states the 'patterns' parameter will match properties where a list of properties separated by a pipe '|' can be provided. The documentation also states that if the 'patterns' parameter is empty or null, all properties will match.<br><br>This works as described for VMs that are not running (using "" or null as the patterns parameter). However, from my experience (3.1.8 - 3.2.4), I have now confirmed this does not work for VMs that are running or paused
(i.e: stopped, aborted, etc)<br><br>I took the chance and changed the parameter to an asterisk "*" and now all properties are being returned for any machine I chose regardless of state.<br><br>It would seem then there is either an error in the documentation or in the API or I'm missing something else.<br><br><br>Joe.<br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Klaus Espenlaub <Klaus.Espenlaub@Sun.COM><br><b><span style="font-weight: bold;">To:</span></b> Joseph Smith <joseph1962smith@yahoo.com><br><b><span style="font-weight: bold;">Cc:</span></b> vbox-dev@virtualbox.org<br><b><span style="font-weight: bold;">Sent:</span></b> Tue, June 29, 2010 8:44:04 AM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [vbox-dev]
Reading Guest Properties for running VM (SOAP APIs)<br></font><br>
Joseph Smith wrote:<br>> Hi Klaus,<br>> <br>> Yaay for me! I'm doing something right! <smile> It's all that VBoxManage advice ... ha ha ...<br>> <br>> From your response then ... are you indicating this could be a prob with vboxwebsrv ? VBoxManage does work correctly ... so the lower-level API obviously works.<br><br>I know for sure that it works over the webservice. Sun VDI uses this API call via the jax-ws wrappers for java, and I haven't ever heard of problems in this area. Maybe you could use <a target="_blank" href="http://vboxshell.py">vboxshell.py</a> (a rather big "sample" in python, using the API either directly or through the webservice if you run it with -w).<br><br>> It is nice to get some sense of direction on this thoguh ... I've been beating my head against a wall not wanting to ask for help before checking every possibility.<br><br>Sorry that I can't help you more...<br><br>Klaus<br><br>>
<br>> <br>> Thanks,<br>> Joe<br>> <br>> ------------------------------------------------------------------------<br>> *From:* Klaus Espenlaub <<a ymailto="mailto:Klaus.Espenlaub@Sun.COM" href="mailto:Klaus.Espenlaub@Sun.COM">Klaus.Espenlaub@Sun.COM</a>><br>> *To:* Joseph Smith <<a ymailto="mailto:joseph1962smith@yahoo.com" href="mailto:joseph1962smith@yahoo.com">joseph1962smith@yahoo.com</a>><br>> *Cc:* <a ymailto="mailto:vbox-dev@virtualbox.org" href="mailto:vbox-dev@virtualbox.org">vbox-dev@virtualbox.org</a><br>> *Sent:* Mon, June 28, 2010 2:27:08 PM<br>> *Subject:* Re: [vbox-dev] Reading Guest Properties for running VM (SOAP APIs)<br>> <br>> Joseph Smith wrote:<br>> > Hi Klaus,<br>> ><br>> > Thanks for the reply. I'm not able to re-run the test just now ... but will later this evening.<br>> ><br>> > Actually ... the message I put below
was copied directly from the output of the soap fault message ... so I did not modify the message in any way. Not sure why it was reported that way. I'll investigate further.<br>> <br>> Hehe. Thanks for spotting a bug then ;)<br>> <br>> > I am pretty sure I am not using a IVirtualBox::getMachine ref though I may have made such a mistake and not realized it. Later tonight when I get a chance to look at the code I will double-check.<br>> <br>> Dug a little deeper, and what's happening actually is an error asking the VM for up to date guest properties. Haven't seen that one ever.<br>> <br>> So you're definitely doing the right thing, just the VM process is confused. Very odd....<br>> <br>> Klaus<br>> <br>> > Thanks again,<br>> > Joe<br>> ><br>> > ------------------------------------------------------------------------<br>> > *From:* Klaus
Espenlaub <<a ymailto="mailto:Klaus.Espenlaub@Sun.COM" href="mailto:Klaus.Espenlaub@Sun.COM">Klaus.Espenlaub@Sun.COM</a> <mailto:<a ymailto="mailto:Klaus.Espenlaub@Sun.COM" href="mailto:Klaus.Espenlaub@Sun.COM">Klaus.Espenlaub@Sun.COM</a>>><br>> > *To:* Joseph Smith <<a ymailto="mailto:joseph1962smith@yahoo.com" href="mailto:joseph1962smith@yahoo.com">joseph1962smith@yahoo.com</a> <mailto:<a ymailto="mailto:joseph1962smith@yahoo.com" href="mailto:joseph1962smith@yahoo.com">joseph1962smith@yahoo.com</a>>><br>> > *Cc:* <a ymailto="mailto:vbox-dev@virtualbox.org" href="mailto:vbox-dev@virtualbox.org">vbox-dev@virtualbox.org</a> <mailto:<a ymailto="mailto:vbox-dev@virtualbox.org" href="mailto:vbox-dev@virtualbox.org">vbox-dev@virtualbox.org</a>><br>> > *Sent:* Mon, June 28, 2010 12:38:29 PM<br>> > *Subject:* Re: [vbox-dev] Reading Guest Properties for running VM (SOAP
APIs)<br>> ><br>> > Joseph Smith wrote:<br>> > > Hi,<br>> > ><br>> > > I am encountering some challenges when trying to retrieve guest properties (enumerateGuestProperties) via the SOAP API.<br>> > ><br>> > > I am able to use this API and retreive guest properties if the guest is not running ... but get a runtime exception if I try when the guest is running. I know it can be done since VBoxManage is able to ... but I'm wondering if this could possibly be a vboxwebsrv problem. Essentially ... the steps I use are:<br>> > ><br>> > > 1) Instantiate a new Session object<br>> > > 2) Using this session object ... try to open a new session (openSession)<br>> > > 3) If getting a new session fails ... try to open an existing session
(openExistingSession)<br>> > > 3) With the opened session object ... get the machine object reference (ISession::machine)<br>> > > 4) Using the machine reference ... enumerate the guest properties (ISession::enumerateGuestProperties)<br>> > ><br>> > > If the VM is not running ... it works perfectly. If the VM is running ... a runtime exception is thrown. The error thrown is:<br>> > > "VirtualBox error: Internal application error (0x2147500037)"<br>> ><br>> > Printing 0x in front of a number doesn't make it hex ;)<br>> ><br>> > This is error 0x80004005 = E_FAIL.<br>> ><br>> > From the looks you're not doing what you claim, as exactly this sequence works fine in VBoxManage. Sure that you're not accidentally using an IMachine reference returned
by IVirtualBox::getMachine?<br>> ><br>> > Klaus<br>> ><br>> > ><br>> > > Using the same Machine reference object I can retrieve other machine specific information ... so I know the machine ref is valid (additionally, the UUID on the machine ref matches the UUID of the VM).<br>> > ><br>> > > I am also able to use this same approach to getting a session for both a non-running and running VM to start/stop/pause or otherwise manage a VM. As frequently suggested (<smile>) ... I have looked over how VBoxManage does it ... and I am unable to see a difference between how VBoxManage retreives the information when compared to they way I do.<br>> > ><br>> > > I'm sure I must be doing something wrong ... but it sure does not seem very obvious.<br>> > ><br>>
> > Anyone have any suggestions they can offer ?<br>> > ><br>> > ><br>> > > Thanks,<br>> > > Joe<br>> > ><br>> > ><br>> > > ------------------------------------------------------------------------<br>> > ><br>> > > _______________________________________________<br>> > > vbox-dev mailing list<br>> > > <a ymailto="mailto:vbox-dev@virtualbox.org" href="mailto:vbox-dev@virtualbox.org">vbox-dev@virtualbox.org</a> <mailto:<a ymailto="mailto:vbox-dev@virtualbox.org" href="mailto:vbox-dev@virtualbox.org">vbox-dev@virtualbox.org</a>> <mailto:<a ymailto="mailto:vbox-dev@virtualbox.org" href="mailto:vbox-dev@virtualbox.org">vbox-dev@virtualbox.org</a> <mailto:<a ymailto="mailto:vbox-dev@virtualbox.org"
href="mailto:vbox-dev@virtualbox.org">vbox-dev@virtualbox.org</a>>><br><span>>> > <a target="_blank" href="http://vbox.innotek.de/mailman/listinfo/vbox-dev">http://vbox.innotek.de/mailman/listinfo/vbox-dev</a></span><br>> ><br>> ><br>> <br>> <br>> ------------------------------------------------------------------------<br>> <br>> _______________________________________________<br>> vbox-dev mailing list<br>> <a ymailto="mailto:vbox-dev@virtualbox.org" href="mailto:vbox-dev@virtualbox.org">vbox-dev@virtualbox.org</a><br>> <a href="http://vbox.innotek.de/mailman/listinfo/vbox-dev" target="_blank">http://vbox.innotek.de/mailman/listinfo/vbox-dev</a><br></div></div>
</div><br>
</body></html>