Home » Questions » Computers [ Ask a new question ]

How to recover Virtual Machines in Virtualbox?

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?

Asked by: Guest | Views: 103
Total answers/comments: 5
Guest [Entry]

"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."
Guest [Entry]

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.
Guest [Entry]

"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 virtualboxdotorg (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"
"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 virtualboxdotorg (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"
Guest [Entry]

"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.)"
Guest [Entry]

"For @FooF

Cygwin changes the home directory for VirtualBox.

You can fix this by creating a link in your Cygwin home. The links can be created through Windows command shell. These commands should be run as administrator:

cd C:\Windows\system32
mklink C:\bin\cygwin\home\russellcardullo\.VirtualBox C:\Users\russellcardullo\.VirtualBox
mklink ""C:\bin\cygwin\home\russellcardullo\VirtualBox VMs"" ""C:\Users\russellcardullo\VirtualBox VMs

Taken from http://russellcardullo.com/blog/2012/07/15/setting-up-chef-and-vagrant-on-windows-7-under-cygwin/"