VirtualBox

Opened 16 years ago

Closed 16 years ago

#3714 closed defect (fixed)

Unable to remove snapshots => Fixed in SVN

Reported by: Rudolf Blazek Owned by:
Component: virtual disk Version: VirtualBox 2.2.0
Keywords: Snapshot, Discard, Delay Cc:
Guest type: other Host type: Linux

Description

The delay between creating and discarding the first snapshot is critical in VBox 2.2.0 (and 2.1.4 as well):

FAILURE: Create the first snapshot and wait 5 seconds or more. Discarding will fail for any snapshot afterwards.
OK: Create the first snapshot and discard it immediately. Discarding snapshots will then work OK for all snapshots.

This bug disables the snapshot feature completely. It prevents live backup of running VMs! Please look at this as soon as you can. Examples are enclosed in the enclosed archive of two .VirtualBox folders.

Thanks, Rudy

Host: Ubuntu server 8.04 LTS
Guest: Ubuntu JeOS 8.04 (but the problem is guest-independent)
Tool used: VBoxManage


WARNING: Backup (or move) your ~/.VirtualBox folder before testing any code below!!!! Otherwise you may corrupt your VirtualBox settings or VMs.


Failed snapshot discardation step-by-step

1. Backup (or move) your ~/.VirtualBox folder

2. Create a VM

VBoxManage createhd -filename TestVM.vdi -size 15000 -register
VBoxManage createvm -name TestVM -register
VBoxManage modifyvm TestVM -hda TestVM.vdi

3. Create a snapshot and discard it after 5 seconds
(Copy and paste ALL 3 lines)

VBoxManage snapshot TestVM take TestSnapshot; \
sleep 5; \
VBoxManage snapshot TestVM discard TestSnapshot

4. Error Message

0%...FAILED
Error: failed to discard snapshot. Error message:
Medium '/root/.VirtualBox/Machines/TestVM/Snapshots/{d4020afe-309f-47d5-854d-3649bd4288a3}.vdi'
is not accessible. Accessibility check was not yet performed

The critical 5 seconds
If in step 3 you replace "sleep 5" by "sleep 4" then the snapshot will be discarded OK.
AFTER that, the delay is NOT critical.
(I tested this on two different computers, the critical delay really seems to be 5 seconds.)


OK snapshot discardation step-by-step

1. Move your ~/.VirtualBox folder somewhere else
(Remember that you have to create the VM from scratch every time when you test this. )

2. Create a VM

VBoxManage createhd -filename TestVM.vdi -size 15000 -register
VBoxManage createvm -name TestVM -register
VBoxManage modifyvm TestVM -hda TestVM.vdi

3. Create a snapshot and discard it after 4 seconds
(Copy and paste ALL 3 lines)

VBoxManage snapshot TestVM take TestSnapshot; \
sleep 4; \
VBoxManage snapshot TestVM discard TestSnapshot

I repeat: Backup (or move) your ~/.VirtualBox folder before testing any code described here!!!! Otherwise you may corrupt your VirtualBox settings or VMs.

Attachments (1)

Example.tgz (20.1 KB ) - added by Rudolf Blazek 16 years ago.
Two .VirtualBox folders --- one with good and one with failed snapshot discardation.

Download all attachments as: .zip

Change History (12)

by Rudolf Blazek, 16 years ago

Attachment: Example.tgz added

Two .VirtualBox folders --- one with good and one with failed snapshot discardation.

comment:1 by Rudolf Blazek, 16 years ago

The same problem occurs on Mac OS X 10.5.6 with VBox 2.2.0. Only with VBoxManage, the GUI is OK on the Mac.

Rudy

comment:2 by Rudolf Blazek, 16 years ago

Workaround found

Even on Ubuntu, discarding snapshots works when the GUI is running.

  1. Start the GUI using "VirtualBox" and leave it running.
  2. Use VBoxManage or the GUI to discard snapshots.
  3. Exit the GUI when done discarding.

comment:3 by Frank Mehnert, 16 years ago

Bug reproduced.

comment:4 by Pavel Sutyrin, 16 years ago

Reproduced on Linux 2.6.26-gentoo #6 i686 Intel(R) Core(TM)2 Duo CPU E8300 @ 2.83GHz; VirtualBox v2.2.0 (installed from "all distributons" x86 bundle).

the above 5-sec test is reproduced too.

This is _very_ annoying bug, I wonder why didn't it show up on some -rc or whatever... :-/

comment:5 by Frank Mehnert, 16 years ago

Every bug is annoying.

comment:6 by Pavel Sutyrin, 16 years ago

Sorry, for being annoying myself.

comment:7 by Frank Mehnert, 16 years ago

I you are that annoyed then I just wonder why you didn't report that bug earlier. The original reporter said that even 2.1.4 has this bug. And the 2.2.0 Beta 1/2 have this bug either. Sorry, but we cannot test every code path in VBox.

comment:8 by Pavel Sutyrin, 16 years ago

Well, before this week I've used VBox on Windows host (starting from 2.0.0), then migrated some virtual machine to Linux-powered host, which is X-less, so the GUI workaround is not usable. I suspect here just too few active Linux users, which I hope to fix to some extent.

comment:9 by Frank Mehnert, 16 years ago

Summary: Unable to remove snapshotsUnable to remove snapshots => Fixed in SVN

comment:10 by Rudolf Blazek, 16 years ago

Thanks!!!

Is there a chance that this could also be fixed in the 2.1.x branch? I still have to use 2.1.4 due to some stability issues with 2.2.0. I would really appreciate that. Or is it that updated 2.1.x will never be released when 2.2.x is out?

Thanks again, best regards Rudy

comment:11 by Frank Mehnert, 16 years ago

Resolution: fixed
Status: newclosed

This is fixed in the 2.1 branch as well though a new 2.1.x release has currently no priority. I will close this bug as fixed. VirtualBox 2.2.2 should fix the most annoying bugs of the 2.2.0 release.

Note: See TracTickets for help on using tickets.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette