100 up-vote answer didn't work for me
When I go to the menu: File → Virtual Media Manager the Hard Drives options are blank so there is nothing to Remove / Release.
My Error Screen

Solution
I copied and pasted the error text into gedit
and formatted lines nicely:
Machine UUID {89b61270-7d52-483c-bd40-2f14d6905c72}
- in '/home/rick/VirtualBox VMs/Lubuntu 16.04/Lubuntu 16.04.vbox' doesn't match its
UUID {3ca76efb-a497-42da-852c-da97a74b421b}
- in the registry file '/home/rick/.config/VirtualBox/VirtualBox.xml'.
Then I copied and pasted the filename in the last last line into gedit's File Open prompt. This is a top part of Gedit's newly opened second file window:
<?xml version="1.0"?>
<!--
** DO NOT EDIT THIS FILE.
** If you make changes to this file while any VirtualBox related application
** is running, your changes will be overwritten later, without taking effect.
** Use VBoxManage or the VirtualBox Manager GUI to make changes.
-->
<VirtualBox xmlns="http://www.virtualbox.org/" version="1.12-linux">
<Global>
<ExtraData>
<ExtraDataItem name="GUI/DetailsPageBoxes" value="general,system,preview,display,storage,audio,network,usb,sharedFolders,description"/>
<ExtraDataItem name="GUI/GroupDefinitions/" value="m=3ca76efb-a497-42da-852c-da97a74b421b"/>
- Notice it says "DO NOT EDIT THIS FILE.". Of course this means I'm about to do just that!
- Now close the running VirtualBox application.
gedit
gives warning that the file has changed, click the Reload button.
Changing .config/VirtualBox/VirtualBox.xml
Now use Search and replace in the second gedit opened file window Ctrl+H. It asks for a search string.
- Click the first gedit opened file window.
- Highlight the UUID string (between the quotes) of the target machine (second UUID). Use Ctrl+C to copy.
- Toggle back to second window and use Ctrl+V to paste in the search field.
- Click the Replace string field to give it focus.
- Toggle back to the first gedit window.
- Highlight the source UUID (first UUID) and use Ctrl+C to copy.
- Toggle back to the second gedit window and use Ctrl+V to paste in the replace field.
- Click Replace All button and two changes are made.
- Save the second gedit file window.
VirtualBox now loads copied image
It works fine now with copied image however I forgot to install Guest Additions to the new VirtualBox.
Why all this trouble and not use export
from the source machine and import
on the target machine? Well the source machine was bricked for Ubuntu Desktop and apt-get so I had to copy the ../VirtualBoxVM
folder to a Ext4 formatted USB stick. Default FAT formatted file system doesn't work because VB disk image is greater than 4 GB. I could also have chosen NTFS file system type but I already have lots of those USB sticks around and wanted to try something different.