Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

Thanks

EDIT:Running Windows. [Solved]

share|improve this question
add comment

5 Answers

up vote 4 down vote accepted

Solved it by manually editing virtualbox.xml file to include the old machine files, then added the harddrives through the User Interface, then modifiec 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.

Thanks for the help.

share|improve this answer
2  
I did not delete mine but they are now missing. Looks like I will have to rebuild manually. Why does VB not have a data recovery tool for this? –  cwd Aug 2 '11 at 20:21
add comment

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.

alt text

share|improve this answer
    
I'm sorry, that simply didn't work. If I create a new machine, it will go to the folder I specified, right next to the old machines. But virtualbox still doesn't look for the old ones. Even after a system reboot. –  Bruce Connor Dec 8 '09 at 17:43
add comment

try this: create a new machine(s), then just overwrite the new .xml file(s) with the old one(s), which you still have.

edit: if you check the 'machine folder date', it may give you a hint when the machines were created and you may trace the version from the changelog at virtualbox.org (it shows the release date of the various versions).

the machine data files are usually stored in subfolders with the machine name in %user folder%\application data\.virtualbox\machines

share|improve this answer
    
As I said in the question, creating new machines with the old drives didn't work for the windows client (the machine simply doesn't boot). Plus it will force me to fix a bunch of shortcuts and reset the configuration for shared folders and other stuff. –  Bruce Connor Dec 8 '09 at 17:47
1  
is this still the same version of VBox that you have been using to create the virtual machines or did you receive an update recently? uninstall VirtualBox (backup your XML and VDI files) and install VirtualBox again, preferably the original version (you find older versions at Filehippo if you need the installer). –  Molly7244 Dec 8 '09 at 18:43
    
Hm... Indeed, it's not the original version, maybe that's it. Unfortunately I also have no idea what the original version was. –  Bruce Connor Dec 9 '09 at 3:49
add comment

I woke up this morning to find the VirtualBox .vbox file of a guest that was running last night completely missing and VirtualBox telling me it was corrupted. Windows Update ran throughout the night and automatically rebooted my host.

Turns out I had a .vbox-temp version of the file still in the folder. I renamed it to .vbox and now my guest is back. Just FYI.

share|improve this answer
add comment

I want to describe another scenario that I just discovered.

I just upgraded VirtualBox for my Windows 7 host (to version 4.3.12r93733), running the installer program from another directory (using cygwin terminal) and let the installer start VirtualBox for me. I got worried as I saw my VirtualBox virtual machines having disappeared. When choosing "machine | Add" from the menu, I saw that the directory was not my $HOME directory but the directory where I run the installer (cygwin home directory). VirtualBox also had created .VirtualBox directory there.

When I quit VirtualBox and run it from the start menu I saw all my virtual machine definitions appear like expected, just like described in ${HOME}/.VirtualBox/VirtualBox.xml.

It seems like VirtualBox expected current directory to be ${HOME} when it was started. (Or perhaps it is a feature to allow run independent set of VirtualBox instances.)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.