[Solved] Inaccessible vdi file after some hacking

Discussions related to using VirtualBox on Linux hosts.
Post Reply
psitae
Posts: 7
Joined: 25. May 2018, 14:40

[Solved] Inaccessible vdi file after some hacking

Post by psitae »

Hi All,

After moving my partition along my hard drive, I found that my Windows 10.vbox file was completely empty (but still existed). Some searching online didn't fix my problem, so I created a new VM called "Windows 11" and took Windows 11.vbox file and changed all instances of "Windows 11" to "Windows 10". I also changed the UUID to the Windows 10 machine. When there was a conflict, because two machines had the same UUID, I deleted the Windows 11 machine.

Now I'm having some peculiar errors. Have a look:
One or more disk image files are not currently accessible. As a result, you will not be able to operate virtual machines that use these files until they become accessible later.
Press Check to open the Virtual Media Manager window and see which files are inaccessible, or press Ignore to ignore this message.
This happens when I start up the Oracle VM VirtualBox Manager. When I click on check, Windows 10.vdi is the only image listed. It's not lost - the path matches the file location. But when I go to run the machine, I get the next error.
Failed to open a session for the virtual machine Windows 10.

Could not open the medium '/home/tony/VirtualBox VMs/Windows10/Windows 10.vdi'.

VD: error VERR_FILE_NOT_FOUND opening image file '/home/tony/VirtualBox VMs/Windows10/Windows 10.vdi' (VERR_FILE_NOT_FOUND).

Result Code: NS_ERROR_FAILURE (0x80004005)
Component: MediumWrap
Interface: IMedium {4afe423b-43e0-e9d0-82e8-ceb307940dda}
Some searching led me to people who's paths needed to be fixed, but I'm fairly sure my path is fine. Can anybody tell what's MediumWrap?

I think the problem is that the machine is expecting to find a saved state (like a snapshot, maybe?), but since this is all very contrived, I fear that there is no way to create the right conditions for a proper startup. I call on the experts to help me.

Note: I have about 1 month of work on the machine, so if you're going to suggest that I just make a new VM, please try to include a way for me to copy this image that I have to the new VM.

Thanks all!
Tony
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Inaccessible vdi file after some hacking

Post by mpack »

What tool did you use to move the partition? And to clarify: this operation was applied to the host, right? Not to the guest.

From the symptoms described (empty files after partition move), I rather fear that your partition tables have been updated, but the partition itself was not moved.

But, if each drive has an independent filesystem then that wouldn't explain everything. Are you by chance using LVM on the host?
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Inaccessible vdi file after some hacking

Post by socratis »

ZIP and attach the following files:
  • ~/.config/VirtualBox/VirtualBox.xml
  • The .vbox of the Win10 VM, after right-clicking, Show in Finder/Explorer/something.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
psitae
Posts: 7
Joined: 25. May 2018, 14:40

Re: Inaccessible vdi file after some hacking

Post by psitae »

I used GParted to move my partition. I did the operation on the host machine. I don't think I have an LVM - why does it matter?

Here are the requested files.
Attachments
Requested Files.zip
(2.7 KiB) Downloaded 67 times
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Inaccessible vdi file after some hacking

Post by mpack »

psitae wrote:I don't think I have an LVM - why does it matter?
It matters because LVM creates one logical filesystem covering multiple actual drives and partitions, so messing with a partition would be bad news. Whether or not GParted would let you mess up an LVM system I don't know: I would never use LVM or anything like it.
psitae
Posts: 7
Joined: 25. May 2018, 14:40

Re: Inaccessible vdi file after some hacking

Post by psitae »

Ok, I checked, and I am not using LVM style partitions, just the normal ones.

Does this line of inquery help me solve my problem, or are we just trying to understand the cause?

Both are worth doing, jw.

Tony
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Inaccessible vdi file after some hacking

Post by socratis »

Post the output of the commands:
  • 
    ls -alR "/home/tony/VirtualBox VMs/"
    VBoxManage showmediuminfo "/home/tony/VirtualBox VMs/Windows10/Windows 10.vdi"
    
And yes, we're the "detectives" and you're the only "eyewitness". And we're trying to reconstruct the "crime scene". And we're doing this from thousands of miles away. Via messaging. We need to ask several questions, hope you don't mind... ;)
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
psitae
Posts: 7
Joined: 25. May 2018, 14:40

Re: Inaccessible vdi file after some hacking

Post by psitae »

Definitely don't mind the help.

Here are the requested outputs

Code: Select all

$ ls -alR /home/tony/VirtualBox\ VMs/
/home/tony/VirtualBox VMs/:
total 12
drwxr-xr-x  3 tony sudo 4096 5月  25 20:08 .
drwxr-xr-x 38 tony sudo 4096 5月  25 22:11 ..
drwxr-xr-x  4 tony sudo 4096 5月  25 22:59 Windows10

/home/tony/VirtualBox VMs/Windows10:
total 39410944
drwxr-xr-x 4 tony sudo        4096 5月  25 22:59 .
drwxr-xr-x 3 tony sudo        4096 5月  25 20:08 ..
drwx------ 2 tony sudo        4096 5月  25 20:50 Logs
-rw-r--r-- 1 tony sudo        2761 5月  25 21:30 Requested Files.zip
drwx------ 2 tony sudo        4096 5月  15 13:15 Snapshots
-rw------- 1 tony sudo        2749 5月  25 21:29 Virtualbox.xml
-rw------- 1 tony sudo        3204 5月  25 20:25 Windows10-tmp.vbox
-rw------- 1 tony sudo        3204 5月  25 20:50 Windows10.vbox
-rw------- 1 tony sudo        3204 5月  25 20:26 Windows10.vbox-prev
-rw------- 1 tony sudo 40358641664 5月  22 20:08 Windows10.vdi

/home/tony/VirtualBox VMs/Windows10/Logs:
total 36
drwx------ 2 tony sudo 4096 5月  25 20:50 .
drwxr-xr-x 4 tony sudo 4096 5月  25 22:59 ..
-rw------- 1 tony sudo 2105 5月  25 20:50 VBox.log
-rw------- 1 tony sudo 4488 5月  25 20:26 VBox.log.1
-rw------- 1 tony sudo 4488 5月  25 20:25 VBox.log.2
-rw------- 1 tony sudo 4488 5月  25 20:25 VBox.log.3

/home/tony/VirtualBox VMs/Windows10/Snapshots:
total 8
drwx------ 2 tony sudo 4096 5月  15 13:15 .
drwxr-xr-x 4 tony sudo 4096 5月  25 22:59 ..

Code: Select all

$ VBoxManage showmediuminfo /home/tony/VirtualBox\ VMs/Windows10/Windows10.vdi
UUID:           edaff4db-7205-4324-ac94-945c2cb920e7
Parent UUID:    base
State:          created
Type:           normal (base)
Location:       /home/tony/VirtualBox VMs/Windows10/Windows10.vdi
Storage format: VDI
Format variant: dynamic default
Capacity:       51200 MBytes
Size on disk:   38489 MBytes
Encryption:     disabled
Thanks for the help
Last edited by socratis on 26. May 2018, 08:58, edited 2 times in total.
Reason: Enclosed the information in [code] tag for better readability
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Inaccessible vdi file after some hacking

Post by socratis »

First of all, I'm glad that you edited your original message to post the "showmediuminfo" for the VDI and not the VBOX as you originally had. ;)

Second, let me point out one key difference between what *I* (and VirtualBox) was expecting and what *you* typed:
  • VBoxManage showmediuminfo "/home/tony/VirtualBox VMs/Windows10/Windows 10.vdi"   <-- what *I* asked for
    VBoxManage showmediuminfo "/home/tony/VirtualBox VMs/Windows10/Windows10.vdi"    <-- what *you* entered
Notice the absence of the <space> between "Windows" and "10.vdi" in your command? That's kind of important. "Windows10.vdi" does exist, "Windows 10.vdi" doesn't! That's what VirtualBox was telling you...

Since you like "hacking", shut down all VirtualBox VMs, and wait for about 30 seconds. Check that there are no Virtual*, VBox* or VM* processes running. Then edit your "/home/tony/VirtualBox VMs/Windows10/Windows10.vbox" file with a text editor and change line 12 from:
<HardDisk uuid="{3128e403-fc77-4064-8d5f-6eba332484ff}" location="Windows 10.vdi" format="VDI" type="Normal"/>
to
<HardDisk uuid="{edaff4db-7205-4324-ac94-945c2cb920e7}" location="Windows10.vdi" format="VDI" type="Normal"/>
Notice that both the UUID and the path were wrong! Save the .vbox file and restart VirtualBox...

If you didn't want to hack your way through, the easiest (and suggested) way would be to release the VDI from the VM, and add the proper VDI back to the VM.


PS. If you want to hack (and I won't be discouraging you), next time try it with a VM that's not important, a throw-away VM, that's the best way to experiment... ;)
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
psitae
Posts: 7
Joined: 25. May 2018, 14:40

Re: Inaccessible vdi file after some hacking

Post by psitae »

Good work. This very likely will solve my problem. As usual, it's a simple detail that I overlooked.

By the way, I have no particular affinity for hacking (maybe you can tell because I'm not even that good at it, apparently), I just wanted my machine to work again. In my eyes, I was just trying to solve a problem created because I didn't back up by system. I know, I know, I should backup my system. I'll do it soon.

For the record, the easier way, the releasing from the VM --- Do I just release it and put it back? I saw that option but I got scared when it asked me if I was sure I wanted to do it. Will the vdi file still be there?
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Inaccessible vdi file after some hacking

Post by socratis »

psitae wrote:As usual, it's a simple detail that I overlooked.
Actually, it's two details; the UUID and the name... ;)
psitae wrote:I was just trying to solve a problem created because I didn't back up by system.
In that case you should have asked before messing with the VM's recipe (the .vbox).
psitae wrote:Do I just release it and put it back?
Yes. You release the VDI, you choose to NOT delete the file, and you add back the appropriate definition.
psitae wrote:I saw that option but I got scared when it asked me if I was sure I wanted to do it. Will the vdi file still be there?
Yes, as I said, it asks for confirmation, and you're presented with 3 options; Cancel, simply remove the reference (that's what you choose), or you remove the reference and delete the VDI.

In your case since the reference to the VDI was invalid to begin with (no VDI with that name or UUID existed), choosing "Delete VDI" would result in an error...
psitae wrote:This very likely will solve my problem.
Please let me know so that I can "close" the thread...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
psitae
Posts: 7
Joined: 25. May 2018, 14:40

Re: Inaccessible vdi file after some hacking

Post by psitae »

The question I raised in the thread is solved, but when I logged in I got the blue screen of death. Does this count as closing the thread? Strictly speaking my problem isn't solved. I have this boot error: 0xc0000225.

neosmart(dot)net/wiki/0xc0000225/
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Inaccessible vdi file after some hacking

Post by mpack »

The problem originally raised (the subject of the title) is solved. Now you have another problem, a subject for a different topic.

Certainly your new topic can reference this one, if you believe that the discussion above has a bearing on the new problem.

Marking as solved.
psitae
Posts: 7
Joined: 25. May 2018, 14:40

Re: [Solved] Inaccessible vdi file after some hacking

Post by psitae »

Thanks. I'll let you guys know if I can't hack my way out of this problem. :D :D
Post Reply