Tldr: vdi file corrupted, nothing i tried is helping
I noticed recently that the save files for one of my virtualbox machines disappeared. I had it on an hard drive that’s plugged into an outlet, and it’s been the victim of several breaker trips, so I’m assuming that the outages caused the data to get corrupted and removed somehow. So i tried recovering the relevant files with disk drill, only to realize that virtualbox wasn’t loading the machine with the recovered files, despite my best efforts. So I tried attaching the vdi to a different profile. The profile booted, but said “No bootable medium found.” So then I tried attaching the vdi as an external drive to a functioning Ubuntu machine, but the machine wasn’t even detecting it [i tried the vdi of a machine i know works, and that worked fine]. So my next try was to decompress the vdi using 7zip to access the actual image, but i had preallocated too much space [2 tb] and didn’t have enough space on my drives to expand it, even though the actual data stored on the vdi was less than 500 gb. I tried using “modifymedium —compact”, but that didn’t seem to have any effect. I tried using “modifyhd —compact” but that gave me a “read only” error [even though the file definitely wasn’t read only]. What should i try next? Is there anything else to try?