4

I accidentally released one of the VDI's from my virtual machine using 'virtual media manager' in 'virtual box'. How can I attach it again?

enter image description here

3 Answers 3

6

Select your virtual machine in the VirtualBox Manager, select Settings and go to Storage. Right click the SATA controller and select Add Hard Disk. Then you choose to select an existing virtual hard disk file and attach your old .vdi which you released before.

1

The problem with trying to attach a virtual disk that was previously attached is that VirtualBox remembers that disk's UUID. The easiest way to reattach a disk that was previously detached is to change the UUID of the disk image.

You can run the following commands (note that you want the quotes around your image path to preserve spaces in the path):

vboxmanage internalcommands sethduuid "your old image" $(uuidgen)
VBoxManage modifyvm "your vm name" --hda "your old image"
0

In the above procedure you may get an error "Failed to open the disk image file". The better option I would suggest is to create a new virtual machine. When it asks for disk creation select the option "Use an existing virtual hard disk" and select your .vdi file, which will resolve all the issues.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .