Page 1 of 1

3.2.0 - live merging of snapshots not working?

Posted: 19. May 2010, 20:01
by hootjr29
I recently ran into an issue when attempting to delete a snapshot while my VM was running and it said you have to power off the vm. Then, about 3 hours later, I happened to notice that the latest release of VirtualBox includes:
New Online Snapshot Merging – Snapshots are powerful but can eat up disk space and need to be pruned from time to time. Historically, machines have needed to be turned off to delete or merge snapshots but with VirtualBox 3.2 this operation can be done whilst the machines are running. This allows sophisticated system management with minimal interruption of operations;
Therefore, I shutdown my vm, upgraded to 3.2.0, reinstalled my vbox guest additions, and did some testing. I already had 1 snapshot from 24 hours ago. I then created an additional one. Then, I deleted that additional one just fine. However, when I went to delete the primary (first and only) snapshot left, it said that it coulndn't. So I thought maybe it had something to do with the fact that I had created that snapshot prior to upgrading to 3.2.0. So I shutdown the VM, manually deleted the snapshot, and then started the vm.

When the vm finished coming up, I took a new snapshot. Now I see that it can't be removed either. Is there a bug in that only "additional" snapshots can be removed live, but the first one that is taken cannot?
OSX1:~ usernamehere$ VBoxManage snapshot asterisk take test1
Oracle VM VirtualBox Command Line Management Interface Version 3.2.0
(C) 2005-2010 Oracle Corporation
All rights reserved.

0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
OSX1:~ usernamehere$ VBoxManage snapshot asterisk delete test1
Oracle VM VirtualBox Command Line Management Interface Version 3.2.0
(C) 2005-2010 Oracle Corporation
All rights reserved.

0%...FAILED
Error: snapshot operation failed. Error message: Snapshot 'test1' of the machine 'asterisk' cannot be deleted while a VM is running, as this case is not implemented yet. You can delete the snapshot when the VM is powered off
OSX1:~ usernamehere$

Re: 3.2.0 - live merging of snapshots not working?

Posted: 19. May 2010, 21:27
by polymetr
I ran into same problem.
I created a shapshot and then can not delete it.

Code: Select all

Error: snapshot operation failed. Error message: Snapshot '2010-5-19_22:10:8' of the machine 'XP' cannot be deleted while a VM is running, as this case is not implemented yet. You can delete the snapshot when the VM is powered off
Merging eabe5545-40f2-4ef5-922a-6331f72791d1 is done

Re: 3.2.0 - live merging of snapshots not working?

Posted: 19. May 2010, 21:34
by baf
From the manual page 250
• Deleting the only snapshot with a running VM is not implemented. Trying to perform this operation will result in an error message.

Re: 3.2.0 - live merging of snapshots not working?

Posted: 20. May 2010, 02:09
by hootjr29
The document that you are referencing may not have been updated yet. If you look here:

http://www.virtualbox.org/manual/ch01.html#snapshots

It says:
As of VirtualBox 3.2, snapshots can be deleted even while a machine is running.
But of course, not much further down in that same section it also says:
There are some situations which cannot be handled while a VM is running, and you will get an appropriate message that you need to perform this snapshot deletion when the VM is shut down.
So I'm not sure if, even in 3.2.0, there are still some situations where snapshots cannot be deleted when a VM is in a running state. If so, I would be curious as to what those situations are.

Re: 3.2.0 - live merging of snapshots not working?

Posted: 20. May 2010, 10:55
by baf
from http://www.virtualbox.org/manual/ch14.html
Deleting the only snapshot with a running VM is not implemented. Trying to perform this operation will result in an error message. This feature will be added in one of the next maintenance releases. It is possible to delete the only snapshot when the VM is not running, e.g. in "poweroff" or "saved" state.

Re: 3.2.0 - live merging of snapshots not working?

Posted: 20. May 2010, 11:52
by hootjr29
I see. So it seems that they've recognized this and are working to fix it in the next maintenance release. Thanks for finding that baf.

Re: 3.2.0 - live merging of snapshots not working?

Posted: 24. May 2010, 05:02
by leightonn
Apparently I've run into a similar problem. My VM is running Oracle Enterprise Linux 5.4 64-bit (based on RHEL 5.4) I had several snapshots associated with the VM. I was able to delete a couple snapshots while the VM was running and it worked like a charm. However, while running a database [RAC] install on my VM it ran into a disk full error and my VM paused.
RAC VM Error.jpg
RAC VM Error.jpg (43.9 KiB) Viewed 2764 times
I started to delete a couple more snapshots but the process would not complete. Screenshot below.
Merge-time.jpg
Merge-time.jpg (71.04 KiB) Viewed 2764 times
I eventually had to kill the VM. Now it seems that all snapshots have become unusable as it was unable to find the correct differencing disks.
SnapshotDeleteFailed.jpg
SnapshotDeleteFailed.jpg (74.1 KiB) Viewed 2763 times
I eventually had to edit the VBoxNode.XML file to get the machine to boot. It gets through starting most services but hangs while starting background readahead.
I am hoping if I can disable the readahead service to allow it to continue booting but I'm not confident that will resolve the issue . Has this been logged as a bug?