How to recover Virtual Machines in Virtualbox?
For some reason, all of a sudden, all virtual machines are gone from the User Interface in virtual box. I suspect CCleaner has something to do with it, but that's not the point. Both the virtual hardisks and the .xml files for the machines are still in their respective folders. How can I use them to get my virtual machines back into virtualbox?
I tried simply creating a new machine from the old virtual hardisks, and it worked with the ubuntu guest, but not with the windows one. Plus, it'd be nice to get my old machines back instead of having to create new ones, that would keep me from having to fix some shortcuts as well as reconfigure shared folders and other stuff.
Under File -> Preferences in VirtualBox, set your Default Machine & Hard Disk folder. VirtualBox should scan these folders on startup and add any machines found to the pane.
Solved it by manually editing virtualbox.xml file to include the old machine files, then added the hard drives through the User Interface, then modified the machine .xml files to point to the hardrive's uuid.
In fact, the reason the machines were gone in the first place is that I accidentally deleted the virtualbox.xml
file.
Open Oracle VM VirtualBox Manager and under Machine -> Add, point to each virtual machine file (.xml or .vbox) open and it will restore the machine back to the Manager dropdown list.