Corrupted VDI after failed encryption

This is for discussing general topics about how to use VirtualBox.

Corrupted VDI after failed encryption

Postby fros » 24. May 2019, 09:52

Hello everyone!

I decided to encrypt my virtual machine, during the encryption I got information that there is no disk space.
I canceled the encryption and decided to turn on the virtual machine, I received an error:
Code: Select all   Expand viewCollapse view
Location: 'C:\Users\admin/.VirtualBox\VirtualBox.xml', line 1 (0), column 1.

I renamed the -prev file and that worked.

Now I want to open my VM and there is error:
Code: Select all   Expand viewCollapse view
FATAL no bootable medium found system halted


I had Windows 10 installed and im trying to do everything to restore my files from W10, there is any chance?
I convert VDI into RAW and using QPhotoRec tried recovery only .BIN files {which are one most important for me} but no results.
fros
 
Posts: 1
Joined: 24. May 2019, 09:38

Re: Corrupted VDI after failed encryption

Postby mpack » 24. May 2019, 10:19

I'm sure that you certainly backed up the VM before trying something so obviously dangerous as to deliberately randomize the contents of your VMs (aka encryption), so just restore from that backup?

Without a backup: no, there is absolutely no chance of fixing this. If it was possible to recover your data without a key then what would be the point of encryption?

[Edit] (1) First understand that the real encryption key (DEK) is stored in the .vbox file, the short password you enter serves only to decode the much tougher DEK. (2) AFAIK VirtualBox only writes an updated .vbox when shutting down the VM session, so if it had crashed while running then it should not have corrupted the .vbox file because it isn't even open. (3) Suppose somehow it was for some reason in the middle of updating the .vbox file. The procedure it follows (last time I looked anyway), is to first write a ".vbox-tmp" file, and then if that succeeds it renames the old .vbox file to .vbox-prev, and renames the .vbox-tmp to .vbox. So if it crashes in thel middle of this sequence you might find the encoded DEK in the .vbox-tmp file (if it still exists), or in the .vbox, or in .vbox-prev.

If the DEK is truly lost then as mentioned there is no chance of decrypting a VM.
mpack
Site Moderator
 
Posts: 29693
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP


Return to Using VirtualBox

Who is online

Users browsing this forum: No registered users and 16 guests