VirtualBox

Opened 10 years ago

Last modified 14 months ago

#12894 reopened defect

Deleted snapshots leave removable media attached

Reported by: oddsocks Owned by:
Component: virtual disk Version: VirtualBox 4.3.10
Keywords: Cc:
Guest type: other Host type: other

Description

When taking a snapshot, removable media such as DVD images or floppy disks images are also referenced as part of that snapshot. However, deleting the snapshot still leaves the media attached to the snapshot and it can't be released or removed. This was done under Linux version 4.3.10 but the issue has been around for a while as far as I can tell.

For example:

  1. Create a new guest, with a floppy drive controller
  2. Attach a floppy disk image as drive a:
  3. Take an offline snapshot of the guest
  4. Edit the new guest's settings, and remove the floppy disk image
  5. Delete the snapshot of the guest.

Go to the VMM and highlight the floppy disk image, it will still show it as being attached and it can't be released. This can be worked-around (on Linux at least) by doing

/etc/rc.d/init.d/vboxdrv restart

which obviously unloads and reloads the kernel modules, releasing the disk image.

When using the API, querying a floppy image for example to see what it's attached to, generates an invalid object reference, presumably the IMachine or ISnapshot reference no longer exists. Using the API I've tried to detach the disk before deleting the snapshot, but I can't because the IMachine reference returned by the ISnapshot class is immutable. Also using IMachine::MountMedium with a null medium reference doesn't work.

I suspect that IConsole::DeleteSnapshot should be taking care of releasing any removable media attached to the snapshot.

Change History (4)

comment:1 by aeichner, 8 years ago

Resolution: obsolete
Status: newclosed

Please reopen if still relevant with a recent VirtualBox release.

comment:2 by oddsocks, 5 years ago

Resolution: obsolete
Status: closedreopened

comment:3 by oddsocks, 5 years ago

Still occurs with VB 5.2.20.

comment:4 by Dranuhl, 14 months ago

Still occurs with VB 7.0.6 and an Unattended Install ISO.

  1. create new VM
  2. create Offline Snapshot
  3. create Unattended Install ISO
  4. start VM
  5. stop VM
  6. rollback to snapshot
  7. Unattended Install ISO is still shown in GUI under "global" media and "VBoxManage list dvds". Attempts to use "Release" ISO do nothing and also "VBoxManage closemdium dvd" fails claiming that 1 VM still references it.
Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use