VirtualBox

Opened 11 days ago

#22068 new enhancement

Add visual indication or error message in GUI that deleting snapshots with multiple children is not possible

Reported by: erforderlich Owned by:
Component: GUI Version: VirtualBox-7.0.18
Keywords: Cc:
Guest type: all Host type: Windows

Description

Snapshots cannot be deleted if they have more than one child. The GUI does a bad job at conveying this, since the "Delete" buttons are not grayed-out when a snapshot with more than one child is selected. After confirmation, simply nothing happens. Trying to delete the snapshot through VBoxManage.exe prints a proper error message.

Steps to reproduce:

  • Create a new VM "TestVm1". The settings shouldn't matter, but just in case: I left the default settings untouched.
  • Create a snapshot "Snapshot 1" of the current VM state.
  • Open the settings of the VM and change something. I slightly changed the RAM settings. Close with "OK".
  • Create a snapshot "Snapshot 2" of the current VM state.
  • Revert to "Snapshot 1"
  • Open the settings of the VM and change something. I slightly changed the RAM settings. Close with "OK".
  • Create a snapshot "Snapshot 3" of the current VM state.
  • Right-click "Snapshot 1", then click "Delete...".
  • When prompted for confirmation, confirm.
  • Observe that nothing happens.
  • Open a console window and execute vboxmanage.exe snapshot TestVm1 delete "Snapshot 1"
  • Observe the error message.

Output from VBoxManage.exe:

C:\Program Files\Oracle\VirtualBox>VBoxManage.exe snapshot TestVm1 delete "Snapshot 1"
Deleting snapshot 'Snapshot 1' (48c4d003-a1a6-47a3-bf1e-66f032b6b24b)
VBoxManage.exe: error: Snapshot 'Snapshot 1' of the machine 'TestVm1' cannot be deleted, because it has 2 child snapshots, which is more than the one snapshot allowed for deletion
VBoxManage.exe: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component SessionMachine, interface IMachine, callee IUnknown
VBoxManage.exe: error: Context: "DeleteSnapshot(bstrSnapGuid.raw(), pProgress.asOutParam())" at line 555 of file VBoxManageSnapshot.cpp

What should happen: Ideally, the GUI should gray out the "Delete" buttons when a snapshot with more than one child is selected. Ideally, when hovering over the buttons, a tooltip should inform the user about the reason for them being grayed-out. Alternatively, if the buttons are not grayed out, an error message that explains the reason should be displayed when deleting the snapshot fails.

Why this is important: When a program does nothing after confirming an action, it's always confusing for the user. Clearly something is wrong, but there could be many different reasons, including bugs in the software. Is there a good reason for it to not work? Did it actually delete the snapshot but simply not update the GUI? Did it irreversably corrupt the machine? Do I need to restart the Manager and then it'll work? Who knows! I was not aware of that limitation when deleting the snapshot and because I was already experiencing weird issues with VirtualBox, my first thought was "Oh no, it's broken again, is it?" and I mentally prepared to get out the backups and go through the whole setup process again. Luckily I had the idea to test VBoxManage.exe and when I read the error message, I immediately thought "Oh, yes, that makes a lot of sense!".

Change History (0)

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use