Somehow my .vdi (Linux guest OS) file got corrupted. Now I have some files in it (Inside the vdi file) and I want to recover those files. How can I do that?
Linux: Recover files from .vdi file
virtualbox;virtual machine;data recovery;ext4
Assuming you're on a Linux host as well (you didn't mention that). You can always try the Network Block Device (NBD) option:-sudo modprobe nbd max_part=16sudo qemu-nbd -c /dev/nbd0 <path to your vdi file>ls -lh /dev/nbd0*<lists all the partitions on the vdi>Choose which of the partitions you want to mount (eg 1st partition), then:sudo mount /dev/nbd0p1 /mntThat may work, depending on how corrupt your vdi file is.  You can use normal filesystem tools on this mount and or dev node.When done, unmount it and:-sudo qemu-nbd -d /dev/nbd0Note: You may have to install qemu-nbd depending on your distro. Package qemu-utils on Ubuntu, qeu-img on Fedora.If you're on Windows you may have some success by following this post.An alternative Windows way would be to quickly install another Linux VM and then add your vdi file as additional disk to that VM.  You can then use the NBD procedure above on it.