Page 1 of 1
No way to add an existing VHD to media registry
Posted: 14. Oct 2011, 01:26
by king_ramen
I have been trying for several hours to get my XP Mode VHD file imported into the media registry.
- There is no Add button in the Media Registry. All the old docs show this, and WE NEED IT BACK!
- The docs say to add a disk to an existing VM. When I click Add disk in an existing VM, then choose the file, it says I can't use it because it is not in the media registry. Oviously! I am trying to add it!!!
- I can't use VBoxManage clonehd, since it says the source is not in the registry. SO WHAT!?
- I can't use VBoxManage createhd to point to an existing file
- There is no VBoxManage importhd or other method to add a disk to the registry
- I tried to manually change the XML, but there is no DTD or XSD that tells me what the format should be
Between VirtualBox crashing VirtualPC (or vice versa), the inability to run Ubuntu in Virtual PC, and the inability to import my Virtual PC image into VirtualBox, I am about to go kick a puppy or break something. This has been an IT day from hell!
Re: No way to add an existing VHD to media registry
Posted: 14. Oct 2011, 01:54
by Perryg
First you can not use two virtualizers that are hardware-v aware at the same time. It will cause a crash and rightfully so. If it did not you would loose the contents on the drive at least and may cause processor damage.
The media thing is history, but you can still add pre-existing drives. You do that from the storage section of the guest.
For the rest of your issues you need to take them one at a time so we can deal with them. It is too difficult to understand what to tell you to do otherwise.
I would stay away from editing the any xml or vbox file. You can make things worse, or at the very least be sure you have a good backup of them.
Now which issue do you want to start with?
Re: No way to add an existing VHD to media registry
Posted: 14. Oct 2011, 03:15
by king_ramen
Thanks for the assistance, Perry. This also doesn't work:
1. Select Guest / Settings / Storage
2. Click the Icon on the IDE Controller entry that has hovertext of "Add Hard Disk"
3. Click 'Choose existing disk', then select the VHD file from the file chooser, and press Open
4. Following error is received:
Failed to open the hard disk C:\...\file.vhd.
Parent medium with UUID {503ed2a1-45c8-9c40-9c73-6c3a6fae50d7} of the medium 'C:\...\file.vhd' is not found in the media registry ('C:\...\/.VirtualBox\VirtualBox.xml').
Result Code: E_FAIL (0x80004005)
Component: Medium
Interface: IMedium {53f9cc0c-e0fd-40a5-a404-a7a5272082cd}
Callee: IVirtualBox {c28be65f-1a8f-43b4-81f1-eb60cb516e66}
Am I being daft, or does this functionality not exit?
Re: No way to add an existing VHD to media registry
Posted: 14. Oct 2011, 03:39
by Perryg
So are you trying to add a drive to an existing guest? That is the way you do it, but not as the primary drive as is has not been registered.
To add it as a primary drive you would create a new guest and when asked if you want to create a new HDD or use an existing one you would select to use an existing one.
You might also run into an issue with the *.VHD since you say it was/is a XP mode guest, not sure though.
Anyway I just went through the motions here and it works perfectly.
Re: No way to add an existing VHD to media registry
Posted: 14. Oct 2011, 04:09
by king_ramen
I am adding as an additional drive on the "IDE Controller", which currently shows my optical drive "Host Drive 'D:'".
Selecting the "SATA Controller" does the exact same error message (can't add since it is not in the registry).
I see no way out of this catch-22.
Thanks!
Re: No way to add an existing VHD to media registry
Posted: 14. Oct 2011, 04:18
by king_ramen
I also tried creating a SCSI controller, and attaching the .VHD file there, after copying it under the same folder as the primary drive. Still no dice.
Re: No way to add an existing VHD to media registry
Posted: 14. Oct 2011, 04:30
by Perryg
The VHD file may be the reason. Like I said it was created with XP mode from what I gather. Anyway it is really late here and I need to go for the night. I will take this back up tomorrow.
Re: No way to add an existing VHD to media registry
Posted: 14. Oct 2011, 04:43
by king_ramen
You are right. I was choosing a differential file (COW), so I had to merge the diffs file with the parent to create a merged, standalone VHD. Once I did this, I was able to import no problem!
Learnings here:
1. Not all .VHD files are created equal.
2. In order to import a VHD, it should be a merged, fixed size disk image.
3. If the file is not usable, VBox will issue very misleading error messages.
The problem had nothing at all to do with the file not being in the registry, so the error message was a big red herring.
Thanks for all the help; I think I am now on my way!
Re: No way to add an existing VHD to media registry
Posted: 14. Oct 2011, 13:10
by mpack
king_ramen wrote:3. If the file is not usable, VBox will issue very misleading error messages.
The problem had nothing at all to do with the file not being in the registry, so the error message was a big red herring.
As far as I can see you've only quoted one error message, and IMHO that message could not have been clearer as to the problem - it said in effect "can't find the parent disk in media registry". That should have allowed you to deduce that if a parent is needed then you must have a difference image, and if you want to mount it then you would need to register the parent first. That error message was not a red herring, it was the vital clue.
Re: No way to add an existing VHD to media registry
Posted: 14. Oct 2011, 16:42
by king_ramen
If you would like a usability suggestion that would make things clearer, I would suggest:
"The file you have selected is a Differential file that depends on a base (parent) image. This parent file can not be found in the Media Registry".
To an expert that may be "duh", but for 99% of the world it would make a big difference. I had no idea about COW/Differential files, and unless you read very carefully, and interpret 'parent' correctly, the message appears to indicate the file you are selecting is not in the registry.
Thanks,
Kevin
Re: No way to add an existing VHD to media registry
Posted: 14. Oct 2011, 17:39
by mpack
Personally I think your suggested rewording is indeed better in this case, but in general there must be a place where a line is drawn. If all messages pedantically explained in detail what every term meant and implied... then it would be unusable. You must in the end either rely on the user to have a certain amount of knowledge, or at least rely on him to seek out the details as you have done.
Re: No way to add an existing VHD to media registry
Posted: 2. Mar 2012, 07:52
by GTA_doum
Hello,
I just wanted to mention that I agree with king_ramen, because it is his remark that permitted me to discover how to resolve the error, since that for me too, I taught it was not finding information in the registry for the .vhd file !
In fact it is because the .vhd file was in differention mode, and needed to be merged with the parent file (It is the one that contains the changes since the last save of the .vhd file) ! The cool thing, is that within Virtual PC, there is a button to do that, just that easy

Re: No way to add an existing VHD to media registry
Posted: 2. Mar 2012, 11:32
by BillG
As far as I am concerned, the thing is that if you have been using XP Mode in Windows 7 you should have been aware that XP Mode worked from a base .vhd file, not from a normal .vhd file.