Error: Parent UUID

Discussions related to using VirtualBox on Windows hosts.
Post Reply
selena
Posts: 2
Joined: 24. Sep 2016, 17:24

Error: Parent UUID

Post by selena »

Hi! Yesterday I set a VM with Ubuntu. Everything was working great. Today I am surprised by this error when trying to start my VM:

Code: Select all

Failed to open a session for the virtual machine Ubuntu.

Parent UUID {00000000-0000-0000-0000-000000000000} of the medium 'C:\Users\User\VirtualBox VMs\Ubuntu\Snapshots/{e2758629-df3a-4f02-a9a3-eb1cfa43fcaf}.vhd' does not match UUID {eb1dad3e-8223-4284-9534-588b1af20c25} of its parent medium stored in the media registry ('C:\Users\User\.VirtualBox\VirtualBox.xml').

Result Code: E_FAIL (0x80004005)
Component: MediumWrap
Interface: IMedium {4afe423b-43e0-e9d0-82e8-ceb307940dda}
I'm not sure what to make of it. I didn't touch it. The only possible reason could be this snapshot that I took yesterday just out of curiosity. It won't let me delete the snapshot. What should I do? Thank you!
selena
Posts: 2
Joined: 24. Sep 2016, 17:24

Re: Error: Parent UUID

Post by selena »

Me asks, me replies:

I found the answer on the other website. I can't paste links here, so the answer is:
when using vhd disks or when you convert other disk formats (vmdk, vhd) to vdi and you create a snapshot, the virtual machine won’t boot. This can be fixed. Get the UUID of the parent disk

Code: Select all

D:\> vboxmanage internalcommands dumphdinfo harddisk0.vdi
--- Dumping VD Disk, Images=1
Dumping VD image "harddisk0.vdi" (Backend=VHD)
Header: Geometry PCHS=20573/16/255 LCHS=0/0/0 cbSector=512
Header: uuidCreation={ b76d8026-e222-470a-9c83-bc91351bb307}
Header: uuidParent={00000000-0000-0000-0000-000000000000}
and the properties the the snapshot:

Code: Select all

D:\>vboxmanage internalcommands dumphdinfo "c:\Users\UserName\VirtualBox VMs\VMName\Snapshots\{fdb2b61d-2212-45cc-8d29-b9f598d06f39}.vhd"
--- Dumping VD Disk, Images=1
Dumping VD image "c:\Users\UserName\VirtualBox VMs\VMName\Snapshots\{fdb2b61d-2212-45cc-8d29-b9f598d06f39}.vhd" (Backend=VHD)
Header: Geometry PCHS=20573/16/255 LCHS=0/0/0 cbSector=512
Header: uuidCreation={fdb2b61d-2212-45cc-8d29-b9f598d06f39}
Header: uuidParent={00000000-0000-0000-0000-000000000000}
The parent UUID (00000000-0000-0000-0000-000000000000) isn’t set correctly. Set it to its parent disk:

Code: Select all

D:\>VBoxManage.exe internalcommands sethdparentuuid "c:\Users\UserName\VirtualBox VMs\VMName\Snapshots\{fdb2b61d-2212-45cc-8d29-b9f598d06f39}.vhd" {b76d8026-e222-470a-9c83-bc91351bb307}
UUID changed to: b76d8026-e222-470a-9c83-bc91351bb307
From now on your VM should start as expected, also new snapshots are possible.
My comment to this: first, don't forget to navigate to the Virtualbox installation folder, where vboxmanage.exe is. Running cmd.exe as administrator also helps.
ericjmontz
Posts: 1
Joined: 9. Mar 2017, 05:33

Re: Error: Parent UUID

Post by ericjmontz »

Selena thank you so much for posting your response there were a lot of solutions to this issue out here and yours was the most concise. Just a few things worth noting.

If you are using multiple storage devices for Virtualbox you may need to apply this fix to both drives. You can see which drives are having issues from the Oracle VM VirtualBox Manger, right click on the machine having issues and click 'Settings' > 'Storage'. Instead of seeing your drives you will see the UUID of the drive you need to reset to have the correct parent UUID. In order to figure out what the correct parent UUID is use the first command Selena posted, you will use the UUIDCreation value from the output -

Code: Select all

vboxmanage internalcommands dumphdinfo <path to your virtual hard disc>
For instance mine for disc 1 was -

Code: Select all

C:\Program Files\Oracle\VirtualBox>VBoxManage.exe internalcommands dumphdinfo  "F:\virtualHD\eric2-vbox\eric2.vhd"
--- Dumping VD Disk, Images=1
Dumping VD image "F:\virtualHD\eric2-vbox\eric2.vhd" (Backend=VHD)
Header: Geometry PCHS=33288/16/63 LCHS=0/0/0 cbSector=512
Header: uuidCreation={9699347e-5960-43b9-8233-5118c2c92388}
Header: uuidParent={00000000-0000-0000-0000-000000000000}
For disc 2 -

Code: Select all

C:\Program Files\Oracle\VirtualBox>VBoxManage.exe internalcommands dumphdinfo  "F:\virtualHD\eric2-vbox\eric2-mysql.vhd"
--- Dumping VD Disk, Images=1
Dumping VD image "F:\virtualHD\eric2-vbox\eric2-mysql.vhd" (Backend=VHD)
Header: Geometry PCHS=24966/16/63 LCHS=0/0/0 cbSector=512
Header: uuidCreation={62e97e69-0594-458f-82a9-f4c68ee19f0c}
Header: uuidParent={00000000-0000-0000-0000-000000000000}
Then to correct the parent UUID for disc #1 I used the UUID for my first virtual hard disc that was having issues which could be found in the 'Settings' > 'Storage' mentioned earlier -

Code: Select all

VBoxManage.exe internalcommands sethdparentuuid "C:\Users\ericj\VirtualBox VMs\RG\Snapshots\{57c41ad5-3810-4117-bcaf-30686b929f40}.vhd" {9699347e-5960-43b9-8233-5118c2c92388}
UUID changed to: 9699347e-5960-43b9-8233-5118c2c92388
Then same thing to correct the second virtual hard disc just using the UUID for the second hard disc along with the UUIDCreation value that was stated from the dumphdinfo command.
Aevans0001
Posts: 1
Joined: 20. Nov 2017, 09:12

Re: Error: Parent UUID

Post by Aevans0001 »

Just so everyone knows, I had to create a new snapshot and complete the preceding steps. The first time I tried it still showed a loading error, I then created a new snapshot and it worked great
RgG
Posts: 2
Joined: 11. Aug 2019, 22:46

Re: Error: Parent UUID

Post by RgG »

Been using VB for while now and today, for first time, this happened to me and this solution did the trick!
A bit disturbing that it happened - not sure why it happened (created a snapshot for the first time the day before...)
szirsp
Posts: 1
Joined: 3. Jun 2011, 15:09
Primary OS: MS Windows 2003
VBox Version: OSE other
Guest OSses: ubuntu

Re: Error: Parent UUID

Post by szirsp »

It's the end of 2019 and this is still a thing.

I created a vhd with disk2vhd, set up a VM, crated snapshot of VM, started VM, parent UUID error.
Deleted VM.
Created new VM with vdi, starts fine.
Set vhd to immutable in media manager, added it to new VM, VM doesn't start, hangs, without displaying any error.
In settings/Storage there is a yellow exclamation mark with hover text of parent UUID error.

Thanks to Google I found this thread, and VBoxManage.exe internalcommands dumphdinfo, VBoxManage.exe internalcommands sethdparentuuid did solve my problem.

But because the snapshot has autoReset, it fucks up the parent UUID every time, and have to run the fix before starting the VM every time.

in %userprofile%\.VirtualBox\VirtualBox.xml

Code: Select all

        <HardDisk uuid="{9183fee5-d222-4e3f-9597-2295f7ebf48a}" location="*path to parent*.VHD" format="VHD" type="Immutable">
          <HardDisk uuid="{b234c7ad-6b0f-4381-9c96-3d327b393d44}" location="*path to vm*/Snapshots/{b234c7ad-6b0f-4381-9c96-3d327b393d44}.vhd" format="VHD" autoReset="true"/>
        </HardDisk>
Note: You don't need the dumphdinfo to find out the parent UUID because it's in the xml, it was read correctly, it's just not set when creating the snapshot disk image. :(
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Error: Parent UUID

Post by mpack »

szirsp wrote:It's the end of 2019 and this is still a thing.
Since the "thing" is users trying to use an invalid VHD, how could it ever not be a thing?

Also the OPs solution is a gross hack which will only work in rare circumstances. Probably the OP didn't even realize that he corrupted the drive, maybe he got lucky that he didn't corrupt a vital bit of it.

When you create a snapshot the previous disk is frozen. A new dynamic disk is created and it's header will have a "parent" UUID link which identifies the previous member in the chain of difference disks. The new disk will be empty, but will grow as sectors are written to. The new disk is NOT some kind of file cabinet which can operate independantly, its more like an extension that allows you to store more sectors. The new disk cannot work without the previous disk. If the previous disk was also a snapshot (or linked clone) then it too cannot work without access to it's previous disk, and so on.

Hacking the header so that it forgets who the correct previous disk was... is missing the point entirely.

The correct solution is for you to make sure you aren't missing any member of a snapshot chain.
Kirha
Posts: 1
Joined: 22. May 2020, 01:30

Re: Error: Parent UUID

Post by Kirha »

Can confirm, the simple act of creating a snapshot at least CAN cause this issue. Same general experience as OP; build VM, install software, boot a few times, test test test...

All's well in the world of ancient OS virtualization, so I make a snapshot to revert to if the next few things foul up the OS. No other changes. No boot; Parent UUID does not match. This is not a matter of my trying to use an invalid vhd, it's a matter of making a snapshot and now VM no worky.

Hacking the header might be a hackjob, but it's a damn sight better than "You used the wrong disk, dumbass" when this is most certainly not the case.

I'd love to use the not-hackjob solution, but since no other intelligent thought has been put forth I guess it's the answer.
Dimonsky
Posts: 1
Joined: 8. Jul 2020, 15:43

Re: Error: Parent UUID

Post by Dimonsky »

Hm. What if I do not have any VHD?
My VM has only VDI, which is 80GB size.

How to fix the error message in such VM?

Solution:
- checked *.vbox in VM folder (changed UUID there)
- renamed folder /user/.virtualbox/ to virtualbox.backup
Jono-Oz
Posts: 1
Joined: 16. Feb 2021, 01:37

Re: Error: Parent UUID

Post by Jono-Oz »

In my case, all the .vdi files had correct uuidParent entries. Instead, what I needed to do was:
1. Go into Task Manager and stop all VirtualBox processes.
2. Edit the <VMNAME>.vbox file (it's just XML) to remove the line with <HardDisk uuid="{UUID-OF-DELTETED-SNAPSHOT}"... and the matching </HardDisk> element.
Post Reply