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

This is for discussing general topics about how to use VirtualBox.
Post Reply
MikeP129
Posts: 11
Joined: 21. Jul 2015, 22:13

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

Post 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
Last edited by MikeP129 on 17. Dec 2017, 00:32, edited 1 time in total.
BillG
Volunteer
Posts: 5102
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Vdi on a partition that is no longer accessible

Post by BillG »

You need to remove the old file from the Virtual Media Manager. Click the File tab in the VirtualBox Manager window.
Bill
MikeP129
Posts: 11
Joined: 21. Jul 2015, 22:13

Re: Vdi on a partition that is no longer accessible

Post 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
BillG
Volunteer
Posts: 5102
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Vdi on a partition that is no longer accessible

Post 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?
Bill
MikeP129
Posts: 11
Joined: 21. Jul 2015, 22:13

Re: Vdi on a partition that is no longer accessible

Post 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.
MikeP129
Posts: 11
Joined: 21. Jul 2015, 22:13

Re: Vdi on a partition that is no longer accessible

Post 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...
Post Reply