Opened 11 years ago
Last modified 2 years 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:
- Create a new guest, with a floppy drive controller
- Attach a floppy disk image as drive a:
- Take an offline snapshot of the guest
- Edit the new guest's settings, and remove the floppy disk image
- 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 , 8 years ago
Resolution: | → obsolete |
---|---|
Status: | new → closed |
comment:2 by , 6 years ago
Resolution: | obsolete |
---|---|
Status: | closed → reopened |
comment:4 by , 2 years ago
Still occurs with VB 7.0.6 and an Unattended Install ISO.
- create new VM
- create Offline Snapshot
- create Unattended Install ISO
- start VM
- stop VM
- rollback to snapshot
- 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.
Please reopen if still relevant with a recent VirtualBox release.