Page 1 of 2

VirtualBox inaccessible, destroyed all my files.

Posted: 12. Nov 2014, 09:13
by elelont2
Hi,
i have Win7 host with Linux Mint guest. Today when i started VirtualBox (4.3.18) it announced that my Linux machine is "inaccessible".

I removed the inaccessible image and readded it, figuring it might do the trick.

But now everything inside the guest OS is lost, all my files and configuration. It appears to have reverted to the original state (when i got the image from another developer).

How is this possible? How did all my files and configuration disappear? Is it not stored inside the SAME image?

:twisted:

Re: VirtualBox inaccessible, destroyed all my files.

Posted: 12. Nov 2014, 13:01
by mpack
elelont2 wrote:I removed the inaccessible image and readded it, figuring it might do the trick.
Well, that will certainly do the trick, if your intention is to destroy the snapshot structure, which I'm guessing is exactly what you did.

At this point the old VM is dead. However you should be able to recover something. Hopefully you didn't destroy your data completely by starting the VM off the (supposed locked) base VDI.

Inside the VM folder is another folder called Snapshots. Each of the VDI files (with the funny names) in this folder represents one moment in time when a snapshot was taken. The creation datestamps on these should tell you which is the most recent.

Download CloneVDI and use it to clone the newest snapshot in that folder. If successful then you'll need to build a new VM around the cloned VDI.

Tips: (1) Rename the clone VDI to make the name mean something. (2) Move the VDI into the new VM folder on the hard disk step just before you select "Use existing". (3) Stop using snapshots, also disown friends and family members who give you VMs that use snapshots [ ok, the latter might be a tad extreme ].

Re: VirtualBox inaccessible, destroyed all my files.

Posted: 12. Nov 2014, 13:08
by loukingjr
mpack wrote:… also disown friends and family members who give you VMs that use snapshots [ ok, the latter might be a tad extreme ].
:lol: funny. :wink:

Re: VirtualBox inaccessible, destroyed all my files.

Posted: 12. Nov 2014, 13:29
by elelont2
Hi again,
There is now Snapshots directory, i tried to create one then the directory appeared as well, who was supposed to create these snaphosts anyway - me, MANUALLY? :roll:

I have only the one original vdi image that i got six months ago, why doesn't VirtualBox store my changes inside that vdi? If it locks up for some whatever reason i could just readd it and reopen.

Re: VirtualBox inaccessible, destroyed all my files.

Posted: 12. Nov 2014, 13:42
by loukingjr
If you never created any snapshots since you started using the .vdi then that wasn't your problem. And yes, files and changes to a guest are stored in the .vdi if you are not using snapshots.

Re: VirtualBox inaccessible, destroyed all my files.

Posted: 12. Nov 2014, 15:28
by mpack
The symptoms you describe in your first post clearly describe the effect of missing, corrupted or deleted snapshot files. There is no doubt about that. If you don't have them then perhaps your colleague omitted these when he copied the VM to you. That would certainly explain why they were inaccessible.

What exactly did he give you - i.e. the exact list of files and in what folders?

Or, perhaps you created the snapshots and then tampered with the VM, e.g. by deleting files and folders you didn't recognize.

You could post the original .vbox file here if you wish. Ideally not the one you modified by changing the disk attachment.

There's really nothing very complicated about this: "inaccessible" means that it can't access the disk file that it needs to run. So we need to find out what that is, make it accessible, and your problem is solved.

Re: VirtualBox inaccessible, destroyed all my files.

Posted: 12. Nov 2014, 15:44
by elelont2
Now to think about it, i moved the vdi to another location on my hard drive, then launched VirtualBox, saw the inaccessible error, removed the VM from Vbox, and readded it.

But why would this cause the vdi to revert to some old version?


Also, now that i created a snapshot, what happens if i delete the snapshot file?

Re: VirtualBox inaccessible, destroyed all my files.

Posted: 12. Nov 2014, 15:49
by loukingjr
elelont2 wrote:Now to think about it, i moved the vdi to another location on my hard drive, then launched VirtualBox, saw the inaccessible error, removed the VM from Vbox, and readded it.

But why would this cause the vdi to revert to some old version?


Also, now that i created a snapshot, what happens if i delete the snapshot file?
if you delete the snapshot whatever changes you have made since the snapshot was created will be merged into the .vdi.

It almost sounds like you attached the original .vdi you got 6 months ago instead of the one you were using.

Re: VirtualBox inaccessible, destroyed all my files.

Posted: 12. Nov 2014, 15:53
by mpack
loukingjr wrote:
elelont2 wrote: Also, now that i created a snapshot, what happens if i delete the snapshot file?
if you delete the snapshot whatever changes you have made since the snapshot was created will be merged into the .vdi.
Uh, be careful. That's what happens if you use "Delete" from the GUI, and can't be done right now (the files are inaccessible).

Right now, deleting the file using the host OS will kill the VM.

It now seems clear that the OP moved the base VDI and .vbox file instead of moving the entire folder tree. That of course made the snapshots inaccessible. He then mounted the base VDI in the VM, which of course reset the disk to the oldest state in the snapshot chain.

Re: VirtualBox inaccessible, destroyed all my files.

Posted: 12. Nov 2014, 15:57
by loukingjr
I may of misunderstood something. I was under the impression the OP reattached a .vdi that was working again, then took a snapshot.

Re: VirtualBox inaccessible, destroyed all my files.

Posted: 12. Nov 2014, 15:59
by mpack
elelont2 wrote:But why would this cause the vdi to revert to some old version?
Snapshots are a chain of difference files. If you mount the first element in the chain then of course you lose all the differences.
elelont2 wrote:Also, now that i created a snapshot, what happens if i delete the snapshot file?
It will permanently end all possibility of recovering the data.

You need to copy the base VDI and the snapshot VDIs into a single folder, then clone the most recent snapshot VDI using CloneVDI as I described in my first post.

Re: VirtualBox inaccessible, destroyed all my files.

Posted: 12. Nov 2014, 16:00
by mpack
loukingjr wrote:I may of misunderstood something. I was under the impression the OP reattached a .vdi that was working again, then took a snapshot.
No, the OP didn't mention snapshots until after I did. And I mentioned them because it's clear they are involved (or should have been).

Re: VirtualBox inaccessible, destroyed all my files.

Posted: 12. Nov 2014, 16:12
by loukingjr
mpack wrote:
loukingjr wrote:I may of misunderstood something. I was under the impression the OP reattached a .vdi that was working again, then took a snapshot.
No, the OP didn't mention snapshots until after I did. And I mentioned them because it's clear they are involved (or should have been).
Yes, I agree. He didn't.

What I think happened is, he had a working vm with no snapshots, for whatever reason he decided to move the .vdi to a different location which of course would make it inaccessible, detached that from the VM then attached the original .vdi instead of the one he moved. I could be wrong of course. :)

Re: VirtualBox inaccessible, destroyed all my files.

Posted: 12. Nov 2014, 17:04
by mpack
That wouldn't produce the symptoms. Copying or moving a VDI doesn't change the contents, so there would have been no data loss. VirtualBox doesn't mind if you mount the original or a copy, provided the UUID is different or you don't register both at the same time.

Re: VirtualBox inaccessible, destroyed all my files.

Posted: 12. Nov 2014, 18:01
by loukingjr
mpack wrote:That wouldn't produce the symptoms. Copying or moving a VDI doesn't change the contents, so there would have been no data loss. VirtualBox doesn't mind if you mount the original or a copy, provided the UUID is different or you don't register both at the same time.
True. What I meant was, I think he had two .vdis. The original one he started with from 6 months ago, made a copy of the original which was attached to the VM which he's been using for 6 months until he moved it. If not, as you said, he would have to have had snapshots.