Page 1 of 1

[Solved] VM suddenly inaccessible...what to do?

Posted: 8. Apr 2022, 23:54
by SnowMan55
Hi - Today I started my VirtualBox Manager to start my Windows VM as usual and right away noticed that the VM was shown as 'inaccessible.' I just used it just two days ago with no issues at all and now I'm getting this. I don't recall doing any updates to either Windows (host or guest) and definitely not to the VirtualBox Manager software. Even trying to open the VM manually doesn't work. My other VMs look fine. My host machine is running Windows 10, guest is Win 10 Pro. This is what I see in VirtualBox Manager for this VM:

Document is empty.
Location: 'C:\Users\<user name>\VirtualBox VMs\Win 10 Pro (Clone2)\Win 10 Pro (Clone2).vbox', line 1 (0), column 1.
F:\tinderbox\win-6.1\src\VBox\Main\src-server\MachineImpl.cpp[754] (long __cdecl Machine::i_registeredInit(void)).
Result Code:
E_FAIL (0x80004005)
Component:
MachineWrap
Interface:
IMachine {85632c68-b5bb-4316-a900-5eb28d3413df}

I have no idea what happened and if I can recover it (I have some data in it that wasn't backed up, unfortunately). Also, I have no clue where the reference to the F: drive in the error message above came from, as I don't have that drive letter at all (probably did at one point some time ago when using numerous USB sticks, but the machine worked fine even after that with them removed). In the folder where the VM is, I see a file with the same name as the VM name, just with a '.vbox-prev' extension. Is this a backup from the last time it started with no issues? Can I just change the extension to '.vbox' and try it? BTW, is this a common problem that you suddenly cannot access a VM? I've only had a few VMs before and have never experienced this. Thanks in advance for any info/tips on how to (hopefully) fix this.

Re: VM suddenly inaccessible...what to do?

Posted: 9. Apr 2022, 10:28
by mpack
Your question concerns the host, not the guest. Topic moved to "Windows Hosts".

The F:\ line refers to a VirtualBox source code line on the devs machine.

Look for a file called "Win 10 Pro (Clone2).vbox-tmp" (preferred) or "Win 10 Pro (Clone2).vbox-prev" in the VM folder. Rename the extension to ".vbox". You'll have to delete the old ".vbox" first.

Re: VM suddenly inaccessible...what to do?

Posted: 11. Apr 2022, 15:19
by SnowMan55
OK, thanks for moving the post to the proper area. I didn't have the .vbox-tmp file, but was able to use the vbox-prev to access the machine. Can someone tell me what would cause a VM to suddenly become inaccessible like this? I'm wondering if this is a common occurrence with VirtualBox and what may be causing it, so that I can try and prevent this from happening in the future.

Re: VM suddenly inaccessible...what to do?

Posted: 11. Apr 2022, 16:12
by mpack
VirtualBox updates the .vbox file after every session. The stages it goes through while saving the updated file are:
  1. Write the new file to <vmname>.vbox-tmp.
  2. Delete the old <vmname>.vbox-prev.
  3. Rename the existing <vmname>.vbox file to <vmname>.vbox-prev.
  4. Rename the <vmname>.vbox-tmp file to <vmname>.vbox.
This long winded procedure is designed to guard against glitches happening during the save sequence. I.e. we never want to be in a situation where the old file has been deleted but we are unable to write the new one.

Apparantly you suffered some kind of glitch during one of the above steps, e.g. perhaps it was unable to write during step 1. You should check your drive for errors. Third party Antivirus can also cause this kind of glitch. Are you using non-MS AV?

Another possibility is that you tried to edit the vbox file and made a hash of it. Not an accusation, I'm merely listing possibilities.

I will mark this topic as solved, since your request for an explanation amounts to a separate question.

Re: [Solved] VM suddenly inaccessible...what to do?

Posted: 18. Apr 2022, 17:46
by SnowMan55
Thanks for the explanation. I'm using Bitdefender as my AV. I suppose anything is possible, but it didn't cause any issue prior to that. I also wasn't editing the .vbox file, so would more suspect a HD issue in my case. For my primary purpose, which was to recover the VM, this is solved. Thanks a lot.