[vbox-dev] Storage and Guest settings. Bug or intended behaviour

Klaus Espenlaub klaus.espenlaub at oracle.com
Tue Sep 20 21:08:49 GMT 2011


Hi Ian,

On 20.09.2011 17:24, Ian Chapman wrote:
> Hi,
>
> This is using the SOAP interface from Perl. When editing a guest's
> settings, if storage (eg hard disk image) is attached to a controller
> and then the settings of the guest are subsequently discarded
> (IMachine::discardSettings), the medium still believes it is attached to
> the guest, but the guest does not agree. The medium becomes impossible
> to release from the guest.

What do you mean by "attached to the guest, but the guest does not 
agree"? VirtualBox has two kinds of such associations: the medium 
registry location, and the actual usage of a medium by a particular VM 
(or snapshot). The former isn't easily seen (except by looking at the VM 
config file), however the latter is shown e.g. in the "Usage" field of 
the output of "VBoxManage list hdds" (which just uses API calls, so you 
could do the same through SOAP if you insisted).

> Secondly if you change a storage controller
> type (eg IDE) from PIIX3 to PIIX4 for example, it still retains it
> setting even after IMachine::discardSettings is called. All other guest
> settings such as audio, network, display, memory etc get discarded as
> expected.

That's a clear (and easy to spot) bug in the implementation. Changing 
this attribute doesn't take the necessary backup which is needed for 
rolling back.considered the case of changing

> Is this intended behaviour, a bug or am I completely missing something
> in the API that I should being doing instead? I'm currently using VB
> 4.1.2 but I've seen this in previous releases.

None of this sounds intentional, but with the first issue I don't know 
what to look for. I'm sure I aborted storage attachment changes, and 
later attached the medium to some other VM without trouble. So that 
needs a bit more detailed explanation...

Klaus




More information about the vbox-dev mailing list