How to connect snapshots to a VM (after reinstallation)?

This is for discussing general topics about how to use VirtualBox.
Locked
berndleutenecker
Posts: 13
Joined: 9. Jan 2010, 02:03
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Windows 7 (x64) / Ubuntu

How to connect snapshots to a VM (after reinstallation)?

Post by berndleutenecker »

(German version below ...)

Hello!

After reinstalling my PC I noticed that I seem to need some files from
older VMs I didn't save in the shared folder.
Well, no problem - I thought ... I still have these old VMs on a harddisk.
But now I have to realize that I can import these old virtual machines
but which are in there basic state. I still have all the snapshots I have
made - but it seems there is no way to connect them with their VM.
Or is there?

And how do I prevent such a problem in future? I use snapshots rather
often but this now does not seem to be the right way e. g. to move
my VMs to another or reinstalled PC.

Thank you!

Bernd Leutenecker


++++++++++++

Hallo!

Ich habe meinen Rechner neu installiert - und stelle nun fest, dass ich wohl doch
die ein oder andere Datei aus aelteren VMs noch benoetige, die ich leider nicht
im gemeinsamen Laufwerk gespeichert hatte.
Dummerweise dachte ich, dass ich ja die Maschinen noch habe und bei Bedarf
einbinden kann. Nun, dies klappte ja auch - aber im Urzustand ... Die dazu
gehoerenden Snapshots sind noch vorhanden - aber wie es scheint, gibt es
keine Moeglichkeit, diese wieder anzubinden - oder?

Und wie vermeide ich dieses Problem in Zukunft? Irgendwann wird der
Rechner durch ein leistungsstaerkeres Modell ersetzt werden, den ich dann
auch neu installiere - und gerne verschiedene vorhandene VMs auch dann
weiter nutzen moechte.

Danke!
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: How to connect snapshots to a VM (after reinstallation)?

Post by mpack »

It depends on what you backed up onto that external hard disk. If you backed up the entire contents of your .VirtualBox folder then you can easily restore it to the exact state it was in before, and everything should work - and the VMs should all be present.

If your backup was something less than that... well it depends what you actually saved. It should be possible to clone your VDI files to flatten/merge them (getting rid of the snapshots), then create new VMs around the clones, hopefully referencing the old machine xmls so that you get the settings exactly right.
berndleutenecker
Posts: 13
Joined: 9. Jan 2010, 02:03
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Windows 7 (x64) / Ubuntu

Re: How to connect snapshots to a VM (after reinstallation)?

Post by berndleutenecker »

Hello!

Well, I didn't backup anything - the VM, the snapshots etc. used to be on that
harddisk as they still are. I just added another harddrive on which I installed
Windows 7 Ultimate x64 and then VirtualBox.

In the end I 'just' need an access to the contents of the 'harddrives' of my older
machines. Maybe there is a way to get access to these VM-'Harddrives' if it is
not or not easily possible to regain complete access to these older VMs.

Thank you!

Bernd Leutenecker
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: How to connect snapshots to a VM (after reinstallation)?

Post by mpack »

As far as I know, all you need do is copy the .VirtualBox folder from the old drive to c:\Users\<YourWin7UserName>\.VirtualBox. That should restore everything to a working state. Naturally, no part of VirtualBox can be running at the time. Restoring individual VMs a piece at a time is not practical when snapshots have been used.
White_King
Posts: 3
Joined: 13. Feb 2013, 01:37

Re: How to connect snapshots to a VM (after reinstallation)?

Post by White_King »

This is an old post but there is not a lot of information about this in a simple google search.
so basically if you have all the files in the folders. (In the new version [Aug-2019] ) you just need to double click the .vbox file and the virtual machine will run and restore settings in VirtualBox automatically.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: How to connect snapshots to a VM (after reinstallation)?

Post by mpack »

Yes, it's an old post but more importantly it's from the v3 era when VirtualBox used a very different folder structure. I will lock this topic.

The modern answer is covered by a FAQ: Howto: Move a VM.
Locked