corrupted state .vdi file restorable?

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
ltree
Posts: 2
Joined: 9. Aug 2016, 06:11

corrupted state .vdi file restorable?

Post by ltree »

Hello all,

I have a VM of a Windows 8 guest, running on Yosemite (Macbook pro). Yesterday, while running a resource intensive process, it froze and then crashed, and the VM failed to start again. Windows 8 appeared to try starting up, but stopped at a black screen...

I see that the VM's vdi file is from a month ago. Under the Snapshots folder, there is a single vdi file with the corresponding .sav file, with timestamp of around when it crashed yesterday. I suppose that is the delta that contains all the work I have done recently, and so am desperate to see if I could scavenge it.

What I tried so far:
- Removing the files under Snapshots/ allowed me to start the VM with just the main .vdi, but then it is the month-old version.
- Removing the .sav file under Snapshots/ while leaving alone the {uuid}.vdi state file caused Windows to attempt repairing the disk, but it got stuck at 61%... It then gave me the option to go into command prompt mode (not safe mode). This is when I could see all my files that I want a copy of...
- However, I cannot find any means to copy the files to anywhere - I looked up on how to enable usb ports / shared folders, and it looks like I cannot get it to work. I don't have Guest Additions, couldn't install it now, and there's no network access.

So, is there a way at all to retrieve my files from the vdi? Or to repair the broken .sav and state .vdi file?

Also, I tried this cloneVDI tool based on instructions here: viewtopic.php?f=6&t=56371
It said to clone the state vdi file, but on using this for a new VM, Windows would treat it as a corrupted file.

Any suggestions on what I can do? I spent hours on this already and am almost consider on copying some of the code files by hand (i.e. by typing).. Many thanks!

BTW I'm running VirtualBox 4.3.28.
Last edited by socratis on 9. Aug 2016, 07:23, edited 1 time in total.
Reason: Fixed obfuscated URL.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: corrupted state .vdi file restorable?

Post by socratis »

I really hope that you created a backup of the whole VM folder before you started messing with it. On the other hand given that you're talking about potential loss of files of the past month doesn't inspire too much confidence...

The .sav files are the contents of your memory when that file was created. It is analogous to the hibernate file created on your OS when you hibernate your computer. In VirtualBox it is created when you close the VM and select "Save VM state". It's hibernation at the (emulated) hardware level, whether or not your guest OS supports it.

Now, why a save state happened when your guest OS crashed, is beyond me. In any event, if you were saving the files in your hard drive and not in memory, they won't be there.

The fact that your OS boots and runs through the repair, does not indicate a corrupted VDI but a corrupted guest OS filesystem. You can try all the tools that you would if you actually had a physical Windows 8 computer who's hard drive had crashed.

Your best option at this point is:
  1. BACKUP!!!
  2. Boot from a CD/DVD that has some HD repair utilities. "Ultimate Boot CD" and "Hiren's Boot CD" come to mind.
  3. Create a new Windows 8 guest. When you're done, attach your existing VDI as a second HD to the new guest. Retrieve your data.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
ltree
Posts: 2
Joined: 9. Aug 2016, 06:11

Re: corrupted state .vdi file restorable?

Post by ltree »

Thanks for your suggestions and explanation!

I only saved the vdi files, and realize now that the .sav is timestamped a month ago, and so you are right, it has nothing to do with the state of the machine around the crash.

I would go about to do the vdi repair - except that, like I said, the Windows guest does not seem to give me any access to external drives, if I want to boot from anything else. From the command prompt, I only get access to drives C: (mostly empty), D: (my data) and X: (bunch of system utilities and files). Is there anything I can try?

Thanks again.
socratis wrote:I really hope that you created a backup of the whole VM folder before you started messing with it. On the other hand given that you're talking about potential loss of files of the past month doesn't inspire too much confidence...

The .sav files are the contents of your memory when that file was created. It is analogous to the hibernate file created on your OS when you hibernate your computer. In VirtualBox it is created when you close the VM and select "Save VM state". It's hibernation at the (emulated) hardware level, whether or not your guest OS supports it.

Now, why a save state happened when your guest OS crashed, is beyond me. In any event, if you were saving the files in your hard drive and not in memory, they won't be there.

The fact that your OS boots and runs through the repair, does not indicate a corrupted VDI but a corrupted guest OS filesystem. You can try all the tools that you would if you actually had a physical Windows 8 computer who's hard drive had crashed.

Your best option at this point is:
  1. BACKUP!!!
  2. Boot from a CD/DVD that has some HD repair utilities. "Ultimate Boot CD" and "Hiren's Boot CD" come to mind.
  3. Create a new Windows 8 guest. When you're done, attach your existing VDI as a second HD to the new guest. Retrieve your data.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: corrupted state .vdi file restorable?

Post by mpack »

You don't need access to external drives. The recovery CD should be an ISO, which you mount in the virtual CD drive of your VM.
Post Reply