Could not find an open hard disk with UUID {....} on VirtualBox 4.1.2
I was thinking whether I should ask this question myself since these posts all have 'accepted answers' .
I actually know the answer to this question but I saw so many work-a-rounds and solutions requiring lots of time and effort to accomplish a good result and unfortunately those questions had answers that were marked as solutions. All that is fine as they do work, but I wanted to post what I believe is an easier solution.
The key is that the HardDisk uuid must match the ImageID uuid of the storage medium
<HardDisk uuid="{ba913c05-aac5-4245-a0c9-4baaf7719377}" />
<AttachedDevice type="HardDisk" hotpluggable="false" port="0" device="0">
<Image uuid="{ba913c05-aac5-4245-a0c9-4baaf7719377}"/>
</AttachedDevice>
So there it is in a nutshell ..
Close shutdown any running VM's, close the VirtualBox manager. Backup your .vbox file , and yes I know there is one already but do it again to be sure you have a good copy as of right before you changed stuff!
Open your .vbox configuration file for the VM you are having trouble with. Edit the storage medium uuid to match your hard disk uuid (not the other way around).. Save the file. Start the VM and you will be up and running. Hope someone else finds it helpful.
I had the same errorCould not find an open hard disk with UUID {ab625445-c564-4ed5-ab89-2a3e75de7d6c}
.
The solution which worked for me was simply to execute the following command:
cd ~/VirtualBox VMs/Win7-VirtualBox/Snapshots
VBoxManage showhdinfo \{ab625445-c564-4ed5-ab89-2a3e75de7d6c\}.vdi
After that the problem was gone and it works again very well. :-)
https://www.virtualbox.org/ticket/14375
Annotation: I know that this command only shows information about the vdi file. Basically this should not help. But this command seems not only to read the file but also repairs it in some way. Executing it was enough and I was immediately able to add and start the machine again. All other attempts which I tried before did not work.
My Version of VirtualBox: 6.1.22_Debian r144080
2nd Annotation: After having this problem another time several weeks later I now versioned the following folders in order to be able to restore them next time:
- /home/MyUser/.config/VirtualBox
- /home/MyUser/VirtualBoxVms (= the folder where my .vbox files are)