Problem with virtualbox on openSUSE Leap 15.6

Hello!
I need your help.
I’m using Linux openSUSE Leap 15.6.
Last night, I was working on a virtual machine when the power suddenly went out. After this unexpected shutdown, I can no longer start my Windows 10 virtual machine in VirtualBox 7.0. It contains very important files.
Based on the screenshot, it seems that the Windows10.vdi file is either missing or corrupted.
Has anyone encountered a similar issue and knows how to recover the virtual machine or at least retrieve data from it?
Unfortunately, I didn’t make any backups and never thought something like this could happen…
I would be extremely grateful for any advice or help!

SInce you are "extremely grateful for any advice or help", I posted your question to an overly helpful, too chatty AI.....

ChatGPT 4o replied (follow at your own risk!):

Here is a step-by-step recovery plan using TestDisk on openSUSE Leap 15.6 to try to find and recover your missing Windows10.vdi:


Step 1: Install TestDisk

sudo zypper install testdisk

Step 2: Identify the Partition

Find the disk/partition where the VirtualBox VM folder resides (usually /home):

df -h /home

This shows which device /home is on (e.g., /dev/sda3).


Step 3: Run TestDisk

sudo testdisk

Inside TestDisk:

  1. [Create] (if asked about log file, select Create).

  2. Select the disk where /home is (e.g., /dev/sda).

  3. Choose [Proceed].

  4. Select [Intel] if asked for partition type (most common).

  5. Choose [Advanced] or [Analyse] to look for partitions.

  6. Once partitions are listed, choose the one containing /home.

  7. Press [List] to view files.

    • Navigate to home/PaulWilliamson/Documents/VirtualBox VMs/Windows10/.

Step 4: Search for Deleted Files

If you don't see Windows10.vdi:

  1. Go back (press q).

  2. Choose [Advanced] → Undelete.

  3. Browse and look for Windows10.vdi.

  4. If found, highlight it and press c to copy.

    • Choose a different disk (not the same partition) to save the recovered file (e.g., an external USB drive).

Step 5: If Not Found — Use PhotoRec

PhotoRec (bundled with TestDisk) can do a raw scan:

sudo photorec
  • Select the same disk (/dev/sda).
  • Choose File Options → enable only .vdi (press s to deselect all, then arrow down to .vdi and press space).
  • Choose the partition and scan.
  • Save recovered files to a separate drive.

Step 6: Reattach the VDI to VirtualBox

Once you have the Windows10.vdi file:

  1. Open VirtualBox.
  2. Go to Settings → Storage of your VM.
  3. Remove the inaccessible disks.
  4. Add the recovered .vdi as a SATA disk.

Next Step

If your VDI is badly corrupted, you may still mount it manually to copy your files.

Would you like me to give you the commands to mount a partially recovered or corrupted .vdi file (using qemu-nbd or guestmount) so you can retrieve your important files?

Thanks, I'll try it.

I tried countless solutions, including rebuilding the virtual machine with the same configurations. The error disappeared, but the VM still wouldn’t start. A window would briefly open and then immediately close.

However, I finally found a way to recover my files using Hetman Partition Recovery. I mounted the virtual disk “windows10.vbox” in the software, scanned it for existing files, and successfully saved them to a USB flash drive. I then immediately made multiple backup copies and uploaded them to cloud storage.

P.S. Always make backups—anyone can end up in a similar situation. Thanks to everyone who responded and tried to help!

Excellent. That was basically what ChatGPT suggested (recover the lost file) - so good you found a tool which worked for you.

Well done!