VirtualBox

Ticket #16545 (closed defect: fixed)

Opened 7 months ago

Last modified 6 months ago

Changing optical device attachment propagates back into previous snapshot(s)

Reported by: _madworm_ Owned by:
Priority: minor Component: GUI
Version: VirtualBox 5.1.16 Keywords:
Cc: Guest type: other
Host type: Windows

Description

5.1.16 on W10 host (64bit).

1) Create a minimal VM, no disk, no DVD image attached. 2) Take a snapshot. 3) Attach an ISO to VM's DVD (current state changed).

When viewing the snapshot's properties, you will observe that it has the ISO image attached to it.

I think this is an issue with the way the .vbox config file is processed.

Attachments

1_clean.vbox Download (2.2 KB) - added by _madworm_ 7 months ago.
2_snapshot.vbox Download (4.0 KB) - added by _madworm_ 7 months ago.
3_added-ISO.vbox Download (4.8 KB) - added by _madworm_ 7 months ago.

Change History

comment:1 in reply to: ↑ description Changed 7 months ago by socratis

Replying to _madworm_:

When viewing the snapshot's properties, you will observe that it has the ISO image attached to it.

How exactly did you view the snapshot's properties? Because through the GUI, you always view the "Current state" properties, not whatever you may have selected in the "Snapshots" tab. Are you looking in the .VBOX file and you still see the attached DVD?

Changed 7 months ago by _madworm_

Changed 7 months ago by _madworm_

Changed 7 months ago by _madworm_

comment:2 Changed 7 months ago by _madworm_

Really? Not on this machine. I do have some snapshots that appear to be immune to this. They reflect the state of the config data when saved (and the German translation states: "show ... of the -selected- snapshot... so I guess that's what I should expect).

Anyhow, see the attached files. This can't be right.

comment:3 Changed 7 months ago by _madworm_

This happens to the config file when adding an ISO to the VM. It shows up in the current state AND the snapshot.

<Snapshot uuid="{adf865e9-fc3a-4149-b403-f3c945dff549}" name="snapshot" timeStamp="2017-03-09T16:10:46Z">
[...]
<StorageControllers>
<StorageController ...>
<AttachedDevice passthrough="false" type="DVD" hotpluggable="false" port="1" device="0">
<Image uuid="{c0d0c804-3584-4745-89af-c8433c60714d}"/>
</AttachedDevice>
</StorageController>
</StorageControllers>
</Snapshot>
[...]
<Hardware>
<StorageControllers>
<StorageController...>
<AttachedDevice passthrough="false" type="DVD" hotpluggable="false" port="1" device="0">
<Image uuid="{c0d0c804-3584-4745-89af-c8433c60714d}"/>
</AttachedDevice>
</StorageController>
</StorageControllers>

comment:4 Changed 7 months ago by socratis

Confirmed!!!

Host: OSX 10.9.5
VirtualBox: 5.1.16 (haven't downgraded to test if it's a regression yet).

Yes sir, you are correct, it is propagating where it shouldn't! The thing is that it doesn't happen with all of the VMs. I can definitely see it when I create a new VM, just like you did in your example.

I cannot make it happen with an existing VM or two that I have. I've already excluded the fact that your VM (and one of my tests) didn't have a HD attached to it, so that's not the culprit.

I created another VM (one with a HD) and the DVD was added to the "Current state" and the "Snapshot" as well. So, existence of HD => that's not the problem.

I'll keep investigating it as to what triggers it...

comment:5 follow-up: ↓ 6 Changed 7 months ago by klaus

Don't underestimate what the VirtualBox GUI can do... the Details pane only shows the current state, but if you switch to the Snapshots pane, select a snapshot and use the "Show Details" button you'll get the settings of that snapshot.

That said... I can confirm the issue, too. It seems to be specific to 'freshly taken' snapshots (if you let VBoxSVC terminate by stopping all VirtualBox clients and start the GUI again, then everything is properly kept separate), and additionally specific to removable media. Adding a drive doesn't propagate incorrectly. This points at a bug in the code for taking snapshots, forgetting to separate the medium attachment state. The good news is that this clearly isn't a widespread bug (otherwise everything would still be shared, including stuff like the memory size), but still annoying that this slipped through.

comment:6 in reply to: ↑ 5 Changed 7 months ago by socratis

Replying to klaus:

if you switch to the Snapshots pane, select a snapshot and use the "Show Details" button you'll get the settings of that snapshot.

Ah, that "Show details". I completely forgot about that one! Mea culpa.


I can confirm the issue, too.

OK, so I guess there's no point in me going "bug hunting", at least not for that one. Any idea how far back does this thing go? Not a crucial question, but it might help troubleshooting issues in the forums.

comment:7 Changed 7 months ago by klaus

Just finished the fixing in the current dev version. Found another bug of the same kind, affecting PCI device attachments (relevant with PCI passthrough - not something which people use a lot, leave alone with snapshots).

Test build should happen sometime next week, but first this needs to be backported.

It's a plain and simple bug, not having any other consequences than doing removable medium changes in snapshots. Yes, floppies are also affected. Hard disks aren't, because there the API doesn't allow medium changes (only complete drive changes, and the way they are implemented rules out any current state to snapshot propagation). Didn't hunt it down precisely when this oversight happened, but I'm rather certain that it's almost 10 years old. When medium handling was generalized (moving away from the special DVD and floppy drive handling, allowing only 0 or 1 of them). I bet few users remember this limitation.

comment:8 Changed 7 months ago by klaus

The bug made its debut to the public in VirtualBox 3.1.0. About 7.5 years...

comment:9 Changed 7 months ago by socratis

Wow, a dormant one, for 7.5 years! @_madworm_, good one!

comment:10 Changed 7 months ago by klaus

It wasn't the first report of this quirk (found a duplicate which is quite old, #14300, and I suspect there were others trying to tell us the same thing), but the first which made us push the right buttons so that we could reproduce.

comment:11 Changed 6 months ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in VBox 5.1.18.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use