If you are trying to open an existing disk image file but VirtualBox an error message UUID already exists, here is what you can do to fix this problem. This problem appears only when users try to import an old disk image file to run a virtual machine with VirtualBox. Otherwise, if you create a virtual machine from scratch with VirtualBox, you will not get this error message. The whole error message looks something like this-
Failed to open the hard disk file [a random .vdi file location]. Cannot register the hard disk ‘.vdi file path’ {Virtual-Disk-UUID} because a hard disk ‘new-vdi-file-path.vdi’ with UUID {Virtual-Disk-UUID} already exists.
VirtualBox failed to register & open Hard Disk image file
If you want to solve this duplicate UUID error in VirtualBox, try these suggestions.
You face this problem only when you VirtualBox detects duplicate UUID or disk image file. Therefore, to fix this problem, you need to remove the existing disk image file.
Open VirtualBox and go to File > Virtual Media Manager.
Select the virtual disk file from the list and click the Release button.
Again, select the virtual disk file and click the Remove button.
Click the close button on Virtual Media Manager window.
Select the virtual machine and click the Settings button.
Switch to Storage section, and click the plus sign to add the virtual disk file.
On the popup menu, select Choose existing disk option and select the disk file (.vdi).
Save your changes and try to start your virtual machine.
This should help. However, if this solution is not working on your computer, you need to uninstall VirtualBox, remove all the leftovers, and reinstall it.
Related read: VirtualBox Failed to open session for the virtual machine.
How do I fix error 0x80004005 on VirtualBox?
To fix Failed to open a session for the virtual machine, VT-x is disabled in the BIOS for all CPU modes, 0x80004005, check if your CPU supports VT-X and enable Virtualization Technology (VTX) from BIOS.