Hi Devs, A bit more feedback, following on my previous already long e-mail :
The method IConsole->restoreSnapshot() requires a ISnapshot object, when all the others require only the name or the UUID of a given snapshot. Any particular reaosn for this difference? If I want to find out if a VM currently has snapshot(s), I can use these two ways : - use getCurrentSnapshot() and check for null - use findSnapshot() and pass a null value, and check for an exception to be thrown, or not. Are both acceptable or is one more recommended? Would it make sense to provide a "hasSnapshot()" method aswell, so you hide the way to determine if a VM is using snapshots or not? When we are using methods that return a IProgress event, we basically have to keep "pooling" for the state, using IProgress->waitForCompletion() method. Wouldn't it make more sense to send events when there is an update in the progress? There is already an event manager in Virtualbox, so that could be used to provide a more reactive link to a running task? Finally, when modifying the settings of a VM, or controlling the VM, we need to aquire a lock. There are 2 types of locks, and some settings only require "Shared" while others definitly require "Write". The appropriate lock can easily by known with a bit of common sense, but I was wondering how to find out that information programmatically? I can't find anything in the API or in the docs that would look like a table with the different settings or actions, and the required lock type. Maybe I am being very picky here, but since this is all about feedback, I thought I would mention it. All for now, more to come I am sure. Best regards, Max On 26 September 2013 21:29, Maxime Dor <[email protected]> wrote: > Hi Klaus, > > So far so good, I can't find anything wrong in my tests. They are quite > basic for now, but I'll keep on testing and see if something comes up. > The medium variant list instead of an integer/long is definitly a very > nice change. Same for the USB controllers list. Quite neat now! > > Taking on your API feedback offer, I do have few questions/remarks on the > API in general, and for the Java part : > > If I want to get a IMedium object of a known medium, I have two > possiblities : > 1. I loop through 3 different arrays to find a specific value/UUID > 2. I have to use the IVirtualbox->openMedium() method, but then I must > know the medium type (floppy, cd/dvd, hard disk) > > Few questions about this : > - Shouldn't there be a findMedium() method, just like for a VM, using > either the path or the UUID? Else we have to build this "cache" ourselves. > - Wouldn't be a more appropriate to "auto-detect" the medium type and give > the options to simply open a file given a specific path? But I guess that's > more a matter of opinioin which one is "best". But I would like to see both > methods maybe. > - Why not a single array? > > > Still about mediums, I see that I cannot create a medium under the size of > 2MB. I must pass a value no less than 2048000 to > IMedium->createBaseStorage(size,variant). > No mention of this anywhere in the API, and I get a cryptic error (invalid > parameters) when I try. In retrospec, it is the proper error, but not > really when you discover this limitation. > I guess 2MB is a "physical" limitation (minimum sectors in a disk?) or is > a Virtualbox one? > > > I would like to provide a "Guest reboot" option, that would send a command > to reboot the guest, and check when the VM has reseted, but there is no > such event in the API. > I would like to send the reboot command to the guest (via the guest > properties per exemple, or other) and either wait for this event, or a > timeout and force the reboot by powering off the VM then restarting it. > It would very much make sense to send a machine event telling us the VM > has rebooted. It should be possible since you actually get a line in the VM > log about the VM reseting and the BIOS kicking in. > That would be a nice addition I think. > > > Specific to the Java API, I am interesting into gettnig the error code for > any VBoxException to rethrow a specific custom exception, but no such > method is present. > The only thing I can do is to parse the text message for the error number, > if it is included. > This is not very "clean" and could break if you decide to change the > format of error messages. Is there a way to get this error code from the > VBoxException somewhere, or not possible as of now? > > > More questions to come later I am sure. Thank you for your time already! > > Best regards, > Max > > > On 21 September 2013 22:27, Maxime Dor <[email protected]> wrote: > >> Oops, a bit too trigger happy hehe... >> I got it, thank you! >> >> -----Original Message----- >> From: Frank Mehnert [mailto:[email protected]] >> Sent: 21 September 2013 07:58 >> To: [email protected] >> Subject: Re: [vbox-dev] VBox 4.3 Beta - SDK Download >> >> Maxime, >> >> the SDK upload was just not yet completed. Please have a look at the >> download directory now. >> >> Kind regards, >> >> Frank >> >> On Saturday 21 September 2013 02:29:15 Maxime Dor wrote: >> > Hello Klaus; >> > >> > You already changed all the points I had "an issue" with in the 4.2 >> > API, so once I use the 4.3 API further, I can let you know my >> > impressions and any ideas. >> > >> > Could you give me a link to the SDK for BETA3 as well please? None was >> > uploaded. Thank you! >> > >> > On 18 September 2013 20:30, Klaus Espenlaub >> <[email protected]>wrote: >> > > Hi Max, >> > > >> > > On 16.09.2013 23:49, Maxime Dor wrote: >> > >> Hi Klaus, >> > >> >> > >> Just wanted to let you know that so far, everything is very easy >> > >> and that except for the actual API changes, which are very limited >> > >> from my PoV, all the code is pretty much plug & play. >> > >> I'll run all my unit tests once I have adapted the changes you made >> > >> and see how it goes, but I don't fear. >> > >> >> > >> I like when it's easy like this :) And I like the nice little >> > >> tweaks you've made - definitly makes more sense. >> > > >> > > We try not to break things just to break them... and let us know if >> > > you have any ideas for improving the API usability. Any suggestions >> > > will be reviewed, and we have a list of changes we want to do in 4.4 >> > > already (and we can't do them now because of lack of developer time). >> > > >> > > There will be a few more very minor changes coming in the next beta, >> > > which you'll probably call boring as I can't imagine that any code >> > > is using the affected methods (mostly not yet implemented stuff >> > > which we might be able to find time to implement in some 4.3.x). >> > > >> > > Klaus >> > > >> > >> On 12 September 2013 17:46, Klaus Espenlaub >> > >> <[email protected] <mailto:klaus.espenlaub@**oracle.com >> > >> <[email protected]>>> >> > >> >> > >> wrote: >> > >> Hi Max, >> > >> >> > >> On 12.09.2013 16:58, Maxime Dor wrote: >> > >> > Hello, >> > >> > >> > >> > Would it possible to get a SDK zip like with 4.2.x build so I >> can >> > >> > already test my code against 4.3 and already prepare what >> needs >> > >> > to >> > >> >> > >> be >> > >> >> > >> > changed? >> > >> >> > >> Was an oversight... 4.3.0_BETA1 had it, but it's not yet there >> for >> > >> 4.3.0_BETA2 (and there were API changes, some more to come). Will >> be >> > >> fixed soon, and appear in the expected place on >> > >> >> http://download.virtualbox.**org/virtualbox/4.3.0_BETA2/<http://down >> > >> load.virtualbox.org/virtualbox/4.3.0_BETA2/> >> > >> >> > >> Klaus >> > >> >> > >> > Thank you. >> > >> > >> > >> > Best regards, >> > >> > Max >> >> -- >> Dr.-Ing. Frank Mehnert | Software Development Director, VirtualBox ORACLE >> Deutschland B.V. & Co. KG | Werkstr. 24 | 71384 Weinstadt, Germany >> >> Hauptverwaltung: Riesstr. 25, D-80992 München >> Registergericht: Amtsgericht München, HRA 95603 >> Geschäftsführer: Jürgen Kunz >> >> Komplementärin: ORACLE Deutschland Verwaltung B.V. >> Hertogswetering 163/167, 3543 AS Utrecht, Niederlande Handelsregister der >> Handelskammer Midden-Niederlande, Nr. 30143697 >> Geschäftsführer: Alexander van der Ven, Astrid Kepper, Val Maher >> >> >
_______________________________________________ vbox-dev mailing list [email protected] https://www.virtualbox.org/mailman/listinfo/vbox-dev
