Hi everyone.
I searched the forum but I didn't find any example of this situation.
Windows Vista sp1 host, Debian 5 guest. Virtual Box 2.1.4
My disk has crashed but I can save all the data.
I can see every .vdi file, every .sav, the directory, the Logs and the Snapshots.
how do I reinstall Virtual Box as before?
Installed Latest virtualbox, added my virtual disk to the vm list, added the snapshot directory to the one in the "settings" tab, but i can't see the snapshots.
I would like to see them because I have different data on different snapshot and, even if I crashed the disk, I did lost just the installation of Virtualbox which I thought was easily substituted. Instead, I'm having troubled making VirtualBox recognize the snapshots in the snapshots directory.
And, if there's a way, can the .sav files be recovered? I saved the session before closing windows and experimenting the disk failure. Before the crash, Virtualbox saved my virtual machine state and and closed correctly.
Can I recover that? Am i missing something in my explanation? Please tell me and I will try to explain better.
Thank you in advance.
Need to recover a virtual machine with snapshots
-
Perryg
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: Need to recover a virtual machine with snapshots
What you want might be doable but you would need the original version of VBox installed and the original XML files that held the data for the machines.
If you have the original XML files you will need to copy them to a safe place and once the previous version is installed you can shut down VBox and copy the files back to their original locations. I recovered from a crash like this myself but it was touchy. Thank goodness I had backed up my .Virtual directory.
If you have the original XML files you will need to copy them to a safe place and once the previous version is installed you can shut down VBox and copy the files back to their original locations. I recovered from a crash like this myself but it was touchy. Thank goodness I had backed up my .Virtual directory.
Re: Need to recover a virtual machine with snapshots
Ok I've got them all, i've got my xml files, it is called debian.xml and i've got my virtualbox.xml file, and everything else.
Can you, or anyone with good patience, guide me through? I'm getting all kind of mismatching UUID errors....
thank you.
Can you, or anyone with good patience, guide me through? I'm getting all kind of mismatching UUID errors....
thank you.
-
Perryg
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: Need to recover a virtual machine with snapshots
Save the files that you have to a different place.
Totally uninstall VBox 2.2.
Go to the .Virtualbox directory and delete it (after you have copied all of the contents to a different place)
Reboot.
Install VBox 2.14
Do not start it.
Put all of the files you saved back where they were.
Open VBox and see if all of the files are there.
This will only work if you install back to the same place it was to start with.
EDIT: You will more than likey need to convert you xml files back before they will work. The previous XML (VBox 2.14) will have a .BAK at the end. Only copy that one back and take the .BAK off the end
Totally uninstall VBox 2.2.
Go to the .Virtualbox directory and delete it (after you have copied all of the contents to a different place)
Reboot.
Install VBox 2.14
Do not start it.
Put all of the files you saved back where they were.
Open VBox and see if all of the files are there.
This will only work if you install back to the same place it was to start with.
EDIT: You will more than likey need to convert you xml files back before they will work. The previous XML (VBox 2.14) will have a .BAK at the end. Only copy that one back and take the .BAK off the end
Re: Need to recover a virtual machine with snapshots
ok, as always I think I've explained myslef very very poorly...
Ok, sorry for my language.
here I come again:
Same machine:
yesterday win vista disk 1 (hitachi btw) virtual box 2.1.4 with debian guest everything fine.
three snapshots, one child -parenting with another.
session saved.
disk crash, means I cannot boo into that hard disk anymore but i can retrieve any given file I want.
I thought "not so bad, i saved the session, closed correctly virtualbox, the machine state should be on the disk"
today: same machine, win vista sp1 , new disk, (western digital FYI) virtual box 2.2 created debian guest, replaced xml and vdi and snapshots files i've got all kind of mismatching errors. Now I can see the snapshots, but the media manager tells me invalid uuid....everywhere!
thank you.
Ok, sorry for my language.
here I come again:
Same machine:
yesterday win vista disk 1 (hitachi btw) virtual box 2.1.4 with debian guest everything fine.
three snapshots, one child -parenting with another.
session saved.
disk crash, means I cannot boo into that hard disk anymore but i can retrieve any given file I want.
I thought "not so bad, i saved the session, closed correctly virtualbox, the machine state should be on the disk"
today: same machine, win vista sp1 , new disk, (western digital FYI) virtual box 2.2 created debian guest, replaced xml and vdi and snapshots files i've got all kind of mismatching errors. Now I can see the snapshots, but the media manager tells me invalid uuid....everywhere!
thank you.
-
Perryg
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: Need to recover a virtual machine with snapshots
You should have a file called VirtualBox.xml in your personal folder under the subfolder .virtualbox.
This is the file that you need to get this all put together. Do you have this file?
This is the file that you need to get this all put together. Do you have this file?
Re: Need to recover a virtual machine with snapshots
Yes. I've got it, and i've already overwritten the new one with the old one, caring enough to match the new paths (i've changed some paths, but they look quite innocent, no errors till now)
How should I match the UUIDS?
Thanks (probably going to bed now, see you in 6 to 8 hours ok? No rush, thank you very very much)
How should I match the UUIDS?
Thanks (probably going to bed now, see you in 6 to 8 hours ok? No rush, thank you very very much)
-
Perryg
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: Need to recover a virtual machine with snapshots
That's fine we can finish this tomorrow. I am tired as well 
Re: Need to recover a virtual machine with snapshots
Ok, I'm online and working.
I fully recovered from my hard disk crash.
now my Vista machine is running at full steam.
My virtualbox has recovered fully.
Here's what I did:
recovered my *.vdi files, its subdirectories "Snapshots" and "Logs", last but not least the *.xml file describing every virtual machine you created.
Example: got two different virtual machine, one with xp called "winxp" and one with ubuntu 8.04 called "ubuntu".
You need to recover two vdi's, winxp.vdi and ubuntu.vdi (which are the virtual hard disks).
two directories, everyone containing other two subdirectories.
one dir called "ubuntu" containing "Snapshots" and "Logs"
one dir called "winxp" containing "Snapshots" and "Logs"
then two files called winxp.xml and ubuntu.xml
Without any of this elements you lose the virtual machine, only things you can afford to lose: Snapshots directory (you get the first version of your Virtual Machine) and the Log directory (you lose the logs)
then you need to recover the file called: "VirtualBox.xml"
This file contains the virtual box you have setup, where they are located, which virtual hard disk they use...etc etc.
This file, under Vista, is in C:\Users\[Username]\.VirtualBox\VirtualBox.xml
Under other OSes, I don't know! Probably it's something similar, didn't look around too much!
Anyway, to recover:
- reinstall the exact version you had running before the crash (my case 2.1.4)
Why? Because VirtualBox.xml and other config files change very much from one version to another. Not something to worry, installer does all the trobule for you, but we are doing something under the hood, here...
-Launch VirtualBox. After you launch it, close it immediately.
Why launch it? At the first launch, VirtualBox creates the current directory for storing "VirtualBox.xml" at the right place and with the right permissions...
-Substitute your old "VirtualBox.xml" file over the new (and empty) one.
-Put your *.vdi files and "Snapshots" and "Logs" directories where you want them.
Two cases here:
- you can put your files to the exact same position as before. example: old files were in C:\virtualboxfiles\ubuntu.vdi new ones are in the same positions. Right now you don't have to do anything
-you can't put your files to the same position as before (why? Don't know, space constraint, new disk partitioning....) . Here you need to repoint the VirtualBox.xml entries referring to the old path. After you do that, you are ok. How to do it?
Open VirtualBox.xml file with notepad (I advice you to open it with Notepad++ o vi under Linux) and look for every reference to the old path, change it to the new one. Save and relaunch VirtualBox. You should be able to work with it.
I did it and i even restored the saved session.
thank you VirtualBox and thank you very much PerryG.
I fully recovered from my hard disk crash.
now my Vista machine is running at full steam.
My virtualbox has recovered fully.
Here's what I did:
recovered my *.vdi files, its subdirectories "Snapshots" and "Logs", last but not least the *.xml file describing every virtual machine you created.
Example: got two different virtual machine, one with xp called "winxp" and one with ubuntu 8.04 called "ubuntu".
You need to recover two vdi's, winxp.vdi and ubuntu.vdi (which are the virtual hard disks).
two directories, everyone containing other two subdirectories.
one dir called "ubuntu" containing "Snapshots" and "Logs"
one dir called "winxp" containing "Snapshots" and "Logs"
then two files called winxp.xml and ubuntu.xml
Without any of this elements you lose the virtual machine, only things you can afford to lose: Snapshots directory (you get the first version of your Virtual Machine) and the Log directory (you lose the logs)
then you need to recover the file called: "VirtualBox.xml"
This file contains the virtual box you have setup, where they are located, which virtual hard disk they use...etc etc.
This file, under Vista, is in C:\Users\[Username]\.VirtualBox\VirtualBox.xml
Under other OSes, I don't know! Probably it's something similar, didn't look around too much!
Anyway, to recover:
- reinstall the exact version you had running before the crash (my case 2.1.4)
Why? Because VirtualBox.xml and other config files change very much from one version to another. Not something to worry, installer does all the trobule for you, but we are doing something under the hood, here...
-Launch VirtualBox. After you launch it, close it immediately.
Why launch it? At the first launch, VirtualBox creates the current directory for storing "VirtualBox.xml" at the right place and with the right permissions...
-Substitute your old "VirtualBox.xml" file over the new (and empty) one.
-Put your *.vdi files and "Snapshots" and "Logs" directories where you want them.
Two cases here:
- you can put your files to the exact same position as before. example: old files were in C:\virtualboxfiles\ubuntu.vdi new ones are in the same positions. Right now you don't have to do anything
-you can't put your files to the same position as before (why? Don't know, space constraint, new disk partitioning....) . Here you need to repoint the VirtualBox.xml entries referring to the old path. After you do that, you are ok. How to do it?
Open VirtualBox.xml file with notepad (I advice you to open it with Notepad++ o vi under Linux) and look for every reference to the old path, change it to the new one. Save and relaunch VirtualBox. You should be able to work with it.
I did it and i even restored the saved session.
thank you VirtualBox and thank you very much PerryG.