Page 1 of 1

Deleting Snapshot Hosed my VM?

Posted: 13. Apr 2010, 00:38
by Jamie Jackson
VBox 3.1.6, with Ubuntu 9.10 host:

My host system was running low on disk space, so I figured I'd delete my XP guest's only snapshot to free up some space.

However, during the merge operation, I got an error, which I think was related to the low disk space, and the merge failed. After this, I made some space on my host by other means.

When I went to start my guest, I got:

Error Detail 1/2:

Code: Select all

Failed to start the virtual machine ICF10339.
Medium '/home/jamie/.VirtualBox/Machines/ICF10339/Snapshots/{260c685d-8d4b-4bab-bf34-71ffb730cb54}.vdi' is not accessible. Could not open the medium '/home/jamie/.VirtualBox/Machines/ICF10339/Snapshots/{260c685d-8d4b-4bab-bf34-71ffb730cb54}.vdi'.
VD: error VERR_FILE_NOT_FOUND opening image file '/home/jamie/.VirtualBox/Machines/ICF10339/Snapshots/{260c685d-8d4b-4bab-bf34-71ffb730cb54}.vdi' (VERR_FILE_NOT_FOUND).
Error Detail 2/2:

Code: Select all

Result Code: 
VBOX_E_INVALID_VM_STATE (0x80BB0002)
Component: 
Machine
Interface: 
IMachine {99404f50-dd10-40d3-889b-dd2f79f1e95e}
I see that the specified snapshot truly does not exist in the snapshots directory, though this one does: /home/jamie/.VirtualBox/Machines/ICF10339/Snapshots/{469dbce9-78fa-4b8f-a5bd-20d12dbacf53}.vdi (I don't know where this one came from, as there had only been one snapshot when I deleted the snapshot.)

On advice from #vbox on freenode, I edited the VM's XML to remove the entry for the missing {260c685d-8d4b-4bab-bf34-71ffb730cb54}.vdi. I also had to register the main vdi with the VM (via the GUI), because it was missing.

However, when I try to start the VM, I just get a black screen. (I'll add some vbox error logs at the end of this message.)

I suspect I won't be able to recover from this, and that I'll have to re-create the VM. Please let me know if you have any recovery ideas though.

Since I'm not terribly hopeful, I figure that about the best I can do is submit a bug report for this problem, since it's a nasty bug, IMO. Does that sound reasonable?

Thanks,
Jamie

I'm not sure which logs are which, and I suspect I've cycled past the most meaty logs (e.g., the one where the merge failed), but here goes:

Code: Select all

00:00:00.903 VirtualBox 3.1.6 r59338 linux.x86 (Mar 25 2010 19:25:35) release log
00:00:00.903 Log opened 2010-04-12T21:40:30.411613000Z
00:00:00.903 OS Product: Linux
00:00:00.903 OS Release: 2.6.31-21-generic
00:00:00.903 OS Version: #59-Ubuntu SMP Wed Mar 24 07:28:56 UTC 2010
00:00:00.903 Host RAM: 3015MB RAM, available: 2341MB
00:00:00.903 Executable: /usr/lib/virtualbox/VirtualBox
00:00:00.903 Process ID: 4559
00:00:00.903 Package type: LINUX_32BITS_UBUNTU_9_10
00:00:00.922 Power up failed (vrc=VINF_SUCCESS, rc=NS_ERROR_FAILURE (0X80004005))
My other log's too long, so I'll load it as an attachment.

Re: Deleting Snapshot Hosed my VM?

Posted: 15. Jun 2010, 14:33
by northshorepc
Bump. Does anyone have a solution to this? I was removing a snapshot, the box with the progress bar was up. I turned away from the server and looked back and it was gone. (It had been running for 2-3 minutes as it was so it appeared normal.) Upon pressing start VBox fails to load stating it is missing a .vdi in the snapshot directory. Indeed the file is gone. I'm not seeing them with undelete tools either, nor can I delete the snapshot from within VBox either.

Re: Deleting Snapshot Hosed my VM?

Posted: 15. Jun 2010, 14:42
by mpack
I don't know how many times you guys need to be told: DO NOT USE SNAPSHOTS - THEY ARE INHERENTLY UNSAFE. The problems mentioned in this thread are only one of a zillion ways in which the overly complex relationships among many important files can become terminally disrupted.

Once the disruption happens there is usually nothing you can practically do except restore from a backup: and in fact snapshots can hinder that as well.

Re: Deleting Snapshot Hosed my VM?

Posted: 24. Jun 2010, 02:03
by jondaley
Ah, I hadn't realized that snapshots weren't functional. Perhaps a feature could be added that says "you don't want to use this" when you click on the snapshot button. I hadn't ever used them before, but thought I had a perfect case for it - installing some software that I thought might break my system. I tested out the snapshots, made some changes, reverted to the old snapshot, made some changes, merged the snapshot, everything looked good.

However, after I actually went and made my real changes, and then after a week decided they were good, and deleted the snapshot, the system is hosed.

I don't have a recent enough backup to be worthwhile, so I'll have to start over. I've been happy with virtualbox up until this point, but if snapshots don't work, even when no errors are reported, etc. then why are they available?

Re: Deleting Snapshot Hosed my VM?

Posted: 24. Jun 2010, 02:22
by Perryg
@jondaley,

Snapshots are functional. The problem is they take up a lot of space and they are as mpack put it somewhat fragile when a problem occurs.
A full backup is the only way to get them back if something goes south as it did for you. Most of the time this happens is when the system ran out of disk space because most people do not check this that often.

But as mpack said I would suggest that you use them on a limited basis and make sure that you have plenty of free disk space until you are very familiar with the product. Then you will have your bases covered and problems will be a lot smaller.

Re: Deleting Snapshot Hosed my VM?

Posted: 24. Jun 2010, 12:35
by mpack
jondaley wrote:Ah, I hadn't realized that snapshots weren't functional
Snapshots are functional: when I say that snapshots are inherently unsafe I don't mean that they don't work, I mean that the risk of failure is high, and results of failure are likely to be catastrophic. Basically I'm saying that snapshots are structurally unsound. These are my personal views as a software engineer myself, but not one of the VBox devteam.