clonehd: Parent medium is not found in the media registry

Discussions related to using VirtualBox on Linux hosts.
Post Reply
Reginald Bell
Posts: 2
Joined: 11. Apr 2018, 12:07

clonehd: Parent medium is not found in the media registry

Post by Reginald Bell »

Hello everybody,

I'd like to have a problem. :wink:

Accidentally my whole system broke down due to a memory problem.

But I could restore all snapshots from my vm.
I checked with

Code: Select all

VBoxManage internalcommands dumphdinfo file
that all of my *.vmdk files have a valid parent uuid (except the first one).

Unfortunately it is not that easy to set up a running vm, if there is no corresponding VirtualBox.xml available.

I tried a lot of things including

Code: Select all

VBoxManage clonehd myold.vmdk new.vmdk
or
to create a new vm from an excisting hd using the vb manager.

All trials ended with a "NS_ERROR_FAILURE (0x80004005)"
Parent medium with UUID {258573e4-bf31-40b6-9d4a-814bf9a8c9e3} of the medium '/home/me/VirtualBox VMs/Win7_64/Snapshots/{f8cfa697-2ff2-40a4-95ec-f80d1742750b}.vmdk' is not found in the media registry ('/home/me/.config/VirtualBox/VirtualBox.xml').
Is there any chance to generate or manipulate the "VirtualBox.xml" file in a way that "clonehd" does not end like that:

Code: Select all

A1:~/VirtualBox VMs/Win7_64/Snapshots$ vboxmanage clonehd {f8cfa697-2ff2-40a4-95ec-f80d1742750b}.vmdk Win10_64.vdmk
VBoxManage: error: Parent medium with UUID {258573e4-bf31-40b6-9d4a-814bf9a8c9e3} of the medium '/home/me/VirtualBox VMs/Win7_64/Snapshots/{f8cfa697-2ff2-40a4-95ec-f80d1742750b}.vmdk' is not found in the media registry ('/home/me/.config/VirtualBox/VirtualBox.xml')
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component MediumWrap, interface IMedium, callee nsISupports
VBoxManage: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 179 of file VBoxManageDisk.cpp
Thanks for any help.

-----------------------------------------------------------------
In use
Version 5.1.34_Ubuntu r121010 © 2004-2018 Oracle Corporation (Qt5.5.1)
actually no guest addition
host: LUBUNTU 4.4.0
guest: Win10_64bit
Last edited by Reginald Bell on 12. Apr 2018, 08:22, edited 1 time in total.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: clonehd: Parent medium is not found in the media registry

Post by mpack »

What does VirtualBox.xml have to do with it? About 8 years have passed since VirtualBox stopped using VirtualBox.xml to store media info.

This discussion is host OS specific, it doesn't really belong in "Using VirtualBox". Moving this to "Linux Hosts".

Btw, 5.1.34_Ubuntu identifies a fork. We don't normally support forks here, but I'll give you a little latitude.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: clonehd: Parent medium is not found in the media registry

Post by mpack »

Btw, in answer to your question:

If you have all elements of a snapshot chain then create a dummy VM and add the VDI chain elements, base first, then the snapshots in increasing date order. You should then be able to clone the VM or the latest VDI. Alternatively you can just put all the element files in one folder and clone the latest snapshot VDI using CloneVDI (under Wine). Either way you end up with a merged VDI.

If you only have parts of a chain then cloning is only possible up to the missing element. If you are lacking the first (base) VDI then cloning is not possible at all - that VM is gone for good - but that's snapshots for you.
Reginald Bell
Posts: 2
Joined: 11. Apr 2018, 12:07

Re: clonehd: Parent medium is not found in the media registry

Post by Reginald Bell »

Hello mpack,

thanks for your answer.

First to clearify:
After the crash I set up a new linux hostsystem and installed VirtualBox.
Then I tried to restore my old virtual machine (Win10_64) from file fragments particularly snapshots.
My trials ended more or less everytime in the VirtualBox-Message

(is not found in the media registry ('/home/me/.config/VirtualBox/VirtualBox.xml').

Sorry, but this is why I thought virtualbox.xml is involved.

Second: as mentioned I am trying to get a running virtual machine from fragments of a broken VirtualBox vm (this is, pardon was a Win10_64bit machine).
The tools I used were not Linux or Windows but VirtualBox tools.
Therfore I do not know why this is a matter of the Linux system, the same could have happend on a Windows PC.
I even could have tried to restore my old vm on a Windows VB host.

But
nevertheless you pointed out a way to merge the old system. Unfortunately I used a difference image so CloneVDI was not suitable.
But your other suggestion worked nearly ok. I got my virtual hd back (but Windows starts with a blue screen so I helped myself in creating a new vm with the old hd as an additional hd).

Therfore
Thank you very much! :!:
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: clonehd: Parent medium is not found in the media registry

Post by mpack »

Reginald Bell wrote:Unfortunately I used a difference image so CloneVDI was not suitable.
Actually CloneVDI has supported snapshots/difference images for many years, so it was certainly suitable. I wouldn't have mentioned it as a possibility otherwise. You have to make sure that all elements of the snapshot chain are present in one folder, otherwise it'll tell you that the current image is partial (a difference image) - CloneVDI doesn't support cloning of incomplete images.
Post Reply