(VERR_FILE_NOT_FOUND) despite .vdi file being in the correct location

Discussions related to using VirtualBox on Windows hosts.
Post Reply
batmangrubbs
Posts: 2
Joined: 12. Jan 2022, 14:14

(VERR_FILE_NOT_FOUND) despite .vdi file being in the correct location

Post by batmangrubbs »

My computer glitched out during an attempt to move a VM. It moved the .vdi file and some of the snapshots all of which I move back into their original place. However, I keep getting this error:

Code: Select all

Could not open the medium 'F:\VirtualMachines\HackOne\SecurityOnion-HackOne\SecurityOnion-HackOne.vdi'.

VD: error VERR_FILE_NOT_FOUND opening image file 'F:\VirtualMachines\HackOne\SecurityOnion-HackOne\SecurityOnion-HackOne.vdi' (VERR_FILE_NOT_FOUND).
This is confusing because SecurityOnion-Hackone.vdi is indeed in F:\VirtualMachines\HackOne\SecurityOnion-HackOne\. How do I solve this problem and more generally how do I configure file places for 'lost' drives?
Last edited by mpack on 12. Jan 2022, 16:47, edited 2 times in total.
Reason: Add code brackets.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: (VERR_FILE_NOT_FOUND) despite .vdi file being in the correct location

Post by mpack »

Your question has nothing to do with your Linux Guest. I'll move this topic to "Windows Hosts".

If you are getting a "file not found" error from the host then I'm inclined to believe that the file is not there.

My mind could be changed if you could, instead of an unsupported assertion, show me a screenshot of the folder, with the correct path, and the file all being visible. Make sure that file extensions are enabled and visible in the screenshot.

Tip: I suspect I may see that Windows changed the drive letter.

Tip2: reboot the PC before you test it, to ensure that some errant process doesn't still have the file open, though I would expect this to give a permissions error, not "file not found".
batmangrubbs
Posts: 2
Joined: 12. Jan 2022, 14:14

Re: (VERR_FILE_NOT_FOUND) despite .vdi file being in the correct location

Post by batmangrubbs »

1. The VM in question is a Linux Guest and the title topics are vague.

2. The drive letter did not change. I made no unsupported assertion. I put eyes on the file and its path and typed out that path in the last sentence of my previous post. Attached is the screenshot requested.
Attachments
Screenshot 2022-01-12 113052.png
Screenshot 2022-01-12 113052.png (10.3 KiB) Viewed 1786 times
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: (VERR_FILE_NOT_FOUND) despite .vdi file being in the correct location

Post by scottgus1 »

Please right-click the VM in the main Virtualbox window's VM list, choose "Show in Explorer/Finder/File Manager". In the window that opens, zip the VM's .vbox file (not the .vbox-prev file), and post the zip file, using the forum's Upload Attachment tab. (Please make sure all file extensions are shown, so you will be able to see the .vbox extension easier.)

Also please let us know the path to the folder the .vbox file is in.

I wonder if the .vbox file is not coded correctly due to the host glitch. It appears to me that the .vbox file might not be in the folder with the .vdi: there seems a couple too many pixel rows of black at the bottom where the .vbox file should show in a cut-off cropped picture. In fact, if the .vbox file is called "SecurityOnion-HackOne.vbox" it isn't in the folder with the .vdi, since the .vbox file would show between Snapshots folder and the .vdi when the folder is organized by ascending name, as shown.

Additionally, that screenshotted .vdi is only 2MB in size, meaning it's an empty .vdi file. You might want to sort through your backups: that screenshotted file doesn't contain your VM anymore.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: (VERR_FILE_NOT_FOUND) despite .vdi file being in the correct location

Post by mpack »

batmangrubbs wrote:I made no unsupported assertion.
Eh? Of course you did. You made an assertion - you verbally stated that the file is present - but provided no supporting evidence. That is the very definition of the term.

And now the evidence appears to show a newly created VM with an empty VDI and a missing .vbox file.

What I now suspect will be part of this is that you were running from a live CD of this Linux distro, and you reset the VM. But that still doesn't explain what you are doing to get the "file not found" error.

This is what the normal folder structure would have been. Try to get it looking like this. Note however that if the best VDI you can recover is only 2MB then it is empty (2MB is just the header), in which case you may as well delete the VM and start again. You would only continue if there is a large .SAV file inside the Snapshots subfolder AND you can restore the lost .vbox file.

Code: Select all

"VirtualBox VMs" (or other container folder)
   "HackOne" (I assume this is a group folder)
      "SecurityOnion-HackOne" (VM name)
         "Snapshots" (subfolder for snapshots and saved state files)
         "SecurityOnion-HackOne.vbox" (control file)
         "SecurityOnion-HackOne.vdi" (primary hard disk)
fth0
Volunteer
Posts: 5677
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: (VERR_FILE_NOT_FOUND) despite .vdi file being in the correct location

Post by fth0 »

FWIW, you also have an empty base VDI file, if you created the first snapshot before installing anything on the virtual disk image. Just mentioning this possibility, because I did this myself when creating my first VMs years ago, and I wanted to save the effort of going through all the VM configuration dialogs into the first snapshot. ;)
Post Reply