A few weeks back, I needed to make space on my laptop SSDs for some new VMs for future training classes we’ll be doing and as a part of doing this I decided to copy a number of my VirtualBox VMs to an external hard disk.  What I had expected was that this would work the same way that it does in VMware Workstation, where the next time I opened the VirtualBox VM .vbox file it would realize that the files had been moved and prompt me for what to do. Instead what I got was a error message similar to the following:


Failed to open virtual machine located in D:/Virtual Machines/SQL2K12-SVR4/SQL2K12-SVR4.vbox.

Could not find an open hard disk with UUID {0966d12e-d694-41ec-81ce-8f6e57c530a9}.

Result Code:


IVirtualBox {c28be65f-1a8f-43b4-81f1-eb60cb516e66}

If I looked at the system, all of the files were there, so I decided to try copying it back to the original location and once again got the same error message.  At this point I was pretty much flustered because I had over 200GB of VMs that I had moved and were no longer functioning, comprising 14 of my test and teaching VMs for various topics.  After about an hour of trying to figure this out I gave up and essentially accepted that I had lost dozens of hours of work building my environments and set about to rebuilding them in VMware Workstation which allows me to copy and move VMs at will without having these kinds of problems pop up.

Today I was working through rebuilding one of my demo environments and I decided to try and get into my VirtualBox VMs again to try and save a little time on this.  I knew that I could create a new VM and use the existing hard disk from the copied files to boot into the VM, but the problem with that in the past was that it changed out all the hardware and removed the vNIC settings requiring Windows to be reconfigured.  However, what I found was that by creating a new VM and then selecting the existing disk, I was able to now open the vbox file successfully from the file system to get the VM back into Oracle VM VirtualBox Manager.  I was able to successfully open up each of my “previously lost” VMs by opening the .vhd for the VM in the Create New Virtual Machine Virtual Hard Disk window and then opening the .vbox file.  Once this was done, I was able to cancel the Create New Virtual Machine dialog and still access my VMs.  Based on this experience I am going to continue moving my VM’s back over to VMware Workstation which has never left me out to dry like this when copying VMs but at least for now I have my VMs back.