Page 1 of 1

Saving virtual files to external drives

Posted: 22. Dec 2008, 03:55
by Blizz
Hi all,

Have just installed VB 2.1.0 in Intrepid (Virtual OS is XP) mainly for website testing in IE and a few other bits and pieces. It all looks really good.

My question:

How do I save a created file from Virtual Box to an external drive? That is, how do I save my current Windows XP virtual file as a backup to an external drive?

Cheers all.

Posted: 22. Dec 2008, 21:56
by Sasquatch
You can find the VB files of your VMs in your home folder in the hidden directory .VirtualBox. You can then copy the VDI to your external drive.

Posted: 23. Dec 2008, 01:42
by Blizz
Thanks mate. So, do I just copy the Machines and HardDisks folders or just the .vdi files in the Machines folder?

How would I restore these files?

Posted: 23. Dec 2008, 12:52
by stefan.becker
If you have no Snapshots of your Guests, only the vdi Files must be saved.

For restore copy vdi-Files in the same Directory Structure (~/.VirtualBox/) and create a new guest with this vdi as Image.

Posted: 23. Dec 2008, 16:29
by Sasquatch
stefan.becker wrote:If you have no Snapshots of your Guests, only the vdi Files must be saved.

For restore copy vdi-Files in the same Directory Structure (~/.VirtualBox/) and create a new guest with this vdi as Image.
This is only if the VM itself is no longer available (due to a system reinstall for example). If the Guest OS crashed, or is trashed in such a way that it won't boot, just overwrite the existing file.

Posted: 27. Dec 2008, 10:14
by Blizz
Okay, I'm pretty new to this but trying to get my head around it. If I'm starting from scratch with a system OS rebuild or re-imaging my Ubuntu OS:

1/ Install Virtual Box again.

2/ Create a new XP VM

3/ Locate my backed up .vdi file

4/ Put it into the .VDI hidden folder

5/ Then do I select Add in Virtual Box>CD/DVD ROM>tick Mount CD/DVD Drive>then tick iso image.

Is that it?

I thought I had to clone the vdi file rather than just copy it to another source?

Posted: 27. Dec 2008, 21:37
by Sasquatch
Blizz wrote:Okay, I'm pretty new to this but trying to get my head around it. If I'm starting from scratch with a system OS rebuild or re-imaging my Ubuntu OS:

1/ Install Virtual Box again.

2/ Create a new XP VM

3/ Locate my backed up .vdi file

4/ Put it into the .VDI hidden folder

5/ Then do I select Add in Virtual Box>CD/DVD ROM>tick Mount CD/DVD Drive>then tick iso image.

Is that it?

I thought I had to clone the vdi file rather than just copy it to another source?
You only have to use the clone command if you wish to run the same Guest install more than once at a time. The way you describe it, all you have to do is set everything up how you had it, add the VDI to the disk manager and mount it in the VM as the primary hard disk. Don't mount it as CD/DVD, as that is for your physical drive and ISO files only.

Posted: 27. Dec 2008, 22:58
by Blizz
Ah, okay, that makes sense then. Thanks for clarifying things and giving me your time.

cheers :)

Posted: 28. Dec 2008, 01:01
by Blizz
Okay, so I've imaged back to a clean Ubuntu state (Intrepid) without VB 2.10 and then re-installed it, created a new XP VM, then installed XP that is currently not activated. At present, I only have an 'XPcd.vdi' in my HardDisks folder in .VirtualBox as I have no Snapshots just the current state that exists.

If I backup this 'XPcd.vdi' file after I've activated XP, will this then be the file I can put into a new install of VB and still have an image of XP activated?

I think if I take snapshots I will then have .vdi files in the machines folder that I can backup too. Is that correct?

Sorry for the questions, it just takes a bit of getting used to and I can't keep activating XP in VB if I install the next version of Ubuntu etc. I need to make sure I have an activated file backed up.

Posted: 30. Dec 2008, 23:19
by Sasquatch
Hmm, if you activate XP, create a ghost image of it and restore it, would you need to activate XP again? No, because the activation is in that file.

The snapshot idea is a bit more tricky. You have to backup more than just the VDI and the snapshot files. You need to backup the entire VB tree, as the snapshots have to be registered and placed in the proper order too.