Page 1 of 2

Trouble when upgrading to VBox 3

Posted: 4. Jul 2009, 00:48
by ReyJavikVI
After installing, I tried to open a VM, but I got an error. The machine was in a saved state, and apparently the new version can't read old saved states. So it told me to discard it and then start the VM, but I don't remember the last time I turned it off, so if I delete the saved state I might lose data. What should I do? Can I install an older version, shut down the VM properly, and then reinstall 3.0.0?

Re: Trouble when upgrading to VBox 3

Posted: 4. Jul 2009, 02:24
by Perryg
You should revert back to the version that you were using and then shutdown the guest properly. You may need to change the virtualbox.xml.XXX.BAK to virtualbox.xml to get it back to the previous version. Keep backups of these files so you will not hose your VirtualBox and loose the data.

Re: Trouble when upgrading to VBox 3

Posted: 4. Jul 2009, 20:15
by ReyJavikVI
I tried installing 2.2.4, but near the end of the installation an error happens and it rolls back to 3.0.0. Is there a log file I can check for details on the error?

Re: Trouble when upgrading to VBox 3

Posted: 5. Jul 2009, 10:57
by alukin
Easiest way to solve such problems is delete virtual machines but keep hard disk image. Then you just create new VM and attach old hard disk. Everything must work because VB keeps state of VM outside of it's hard disk image. One potential danger is improper disk unmount of guest OS that may cause small problems similar to suddenly pressed "reset" button in real life.

Re: Trouble when upgrading to VBox 3

Posted: 5. Jul 2009, 14:41
by Perryg
@alukin
Well that has always been an option, but it will lose all the work he has not saved.

@ ReyJavikVI
You need to uninstall the new version and then install the version that you had previously. Then look in the machine folder of the Guest OS at the *.xml as well as the virtualbox.xml that is in your home folder/ .virtualbox. When you do an upgrade the install creates a backup of the previous *.xml and renames to **.bak. Almost all of the time you can revert back and it will work properly because the new file does not change that much. In your case it might though because you installed in in a saved state. Look at the files and you will see the saved state section. That is the one that you need to change to be the new default (no .bak) it should be the one with the highest number and next to the newest file date. Other than that you will need to just accept the discard saved state and lose the work that was not saved by properly shutting down before upgrading.

Re: Trouble when upgrading to VBox 3

Posted: 5. Jul 2009, 15:20
by Sasquatch
You can safely discard the saved state. All changes are already written to disk, the only thing you loose is if you had a document open and you didn't save it yet. Saved State is nothing more than putting the system in standby or hibernate and resume from there. Discarding the state is simply pulling the plug or boot the system normally, instead of restoring from hibernate.

Re: Trouble when upgrading to VBox 3

Posted: 5. Jul 2009, 15:52
by ReyJavikVI
So if I copy the hard drive and then make a new machine with it, the only stuff I'll lose is what hasn't been saved to disk?

Anyway, I think I messed something up. Neither 2.2.4 nor 3.0.0 will install.

Re: Trouble when upgrading to VBox 3

Posted: 5. Jul 2009, 22:16
by alukin
Only thing you may do is to remove all VB stuff by means of your OS, clean ".virtualbox" dirs in your home and do other usual things you usually doing removing every trace of installed program in your OS. Then do clean install of VB. Only thing you must care of is your hard disk image of guest OS. It will work even if you move this HD image to another computer or another universe where VirualBox exists :)

Re: Trouble when upgrading to VBox 3

Posted: 5. Jul 2009, 22:22
by Sasquatch
ReyJavikVI wrote:So if I copy the hard drive and then make a new machine with it, the only stuff I'll lose is what hasn't been saved to disk?

Anyway, I think I messed something up. Neither 2.2.4 nor 3.0.0 will install.
As long as you don't use snapshots.

Re: Trouble when upgrading to VBox 3

Posted: 6. Jul 2009, 00:08
by ReyJavikVI
alukin wrote:Only thing you may do is to remove all VB stuff by means of your OS, clean ".virtualbox" dirs in your home and do other usual things you usually doing removing every trace of installed program in your OS. Then do clean install of VB. Only thing you must care of is your hard disk image of guest OS. It will work even if you move this HD image to another computer or another universe where VirualBox exists :)
Already did that, no luck. I'll try downloading the installer for 2.2.2.

Re: Trouble when upgrading to VBox 3

Posted: 7. Jul 2009, 23:16
by ReyJavikVI
I managed to install it. The VMs settings folders are still there (I saved them in a different place), so how do I tell VirtualBox to import them automatically?

Re: Trouble when upgrading to VBox 3

Posted: 7. Jul 2009, 23:23
by Sasquatch
If you copied the whole .VirtualBox folder from your profile, then restoring that folder to it's original location will be enough.

Re: Trouble when upgrading to VBox 3

Posted: 7. Jul 2009, 23:36
by ReyJavikVI
Actually, what I did is simply to change the location for disks and machines before installing 3.0.0, in the Preferences window. I assume that's not enough?

Re: Trouble when upgrading to VBox 3

Posted: 8. Jul 2009, 00:14
by Sasquatch
No, because the files still need to be registered. You can register VMs using their XML file using the VBoxManager command, but you have to make sure that no media is attached to it, so you have to manually edit the XML files of the VMs and remove the hard disks and ISO/floppy. You can add them again after the registration. Hard drives and ISO's are done through the Media Manager.

Re: Trouble when upgrading to VBox 3

Posted: 8. Jul 2009, 01:25
by ReyJavikVI
Well, it seems that I run into obstacle after obstacle. What do I do with a machine that has many snapshots? Will attaching the hard drive file to the machine make all the snapshots work?