Page 1 of 1

[Solved] Vdi on a partition that is no longer accessible

Posted: 8. Nov 2017, 23:43
by MikeP129
I'm running Virtualbox 5.2.0 in Xubuntu 17.04. One of my VMs is XP and it's vdi is on a partition which contains a (non virtual) installation of Windows (as a dual-boot with Xubuntu).

Recently I needed to restore that installation of Windows from a Norton Ghost file, but the restore failed and rendered the partition inaccessible. I had copied the vdi file to a different partition before the restore, thinking I'd be able to copy it back afterwards.

So I deleted the old vdi from within VB and tried to attach the copy instead. The problem is, VB still acknowledges the existence of the original vdi, and will not let me attach the copy because it has the same uuid.

Before I start from scratch and create a new XP VM, I just wondered whether anyone knows of a way to delete the connection to the old vdi (on the now inaccessible partition) and connect to the copy.

Thanks for any help/information..

Mike

Re: Vdi on a partition that is no longer accessible

Posted: 9. Nov 2017, 00:22
by BillG
You need to remove the old file from the Virtual Media Manager. Click the File tab in the VirtualBox Manager window.

Re: Vdi on a partition that is no longer accessible

Posted: 10. Nov 2017, 00:29
by MikeP129
Thanks, BillG,

But there lies the problem. The 'remove' button is greyed out, presumably because the partition is not accessible.

It seems to me I either need another way to break the connection, or I may be able to fix the partition and copy the vdi back to it.

M

Re: Vdi on a partition that is no longer accessible

Posted: 10. Nov 2017, 03:01
by BillG
If the Remove option is greyed out it usually means that the file is still assigned to a vm. Have you tried to release it first? Have you selected the Properties option to see where the .vdi is stored?

Re: Vdi on a partition that is no longer accessible

Posted: 10. Nov 2017, 04:28
by MikeP129
The 'release' button is greyed out too, and Properties (which is also greyed out) shows that the .vdi is/was stored on the partition which is no longer accessible..

I think I need some kind of nuclear option to disengage it, or I'll have to reformat the pn and start from scratch.

Re: Vdi on a partition that is no longer accessible

Posted: 17. Dec 2017, 00:31
by MikeP129
Just to round this off...

I tried everything I could find, including changing the uuids of the (reformatted) failed partition, and of the copy of the lost original vdi (which repeatedly failed, since VirtualBox was linked to the lost vdi).

Just as I was about to give up, it occured to me to move the copy of the original vdi to another (physical) machine, clone it to a new vdi (with a new uuid), using vboxmanage, move the new vdi back to the original (physical) machine, then attach it to the original VM. Bingo!

The learning curve took a lot longer than just deleting the original vm and starting from scratch, but was more satisfying and can be repeated in the future in a fraction of the time if necessary...