I usually take the upgrade path in ubuntu, rather than fresh install, but I'd like to try the latter route for 12.04.
However, one of the most thoroughly configured and critical tools on my system is the virtualbox windows virtual machine that I run for some key tasks I have not yet been able to move entirely to Linux.
How can I ensure that I completely back this up when I wipe and install for 12.04? Will it be in exactly the current state? Which files will I need to back up to guarantee all settings and content transfer correctly?
Also, a major part of my motivation in doing a fresh install is that I intend to go from a 32-bit 11.10 to a 64-bit 12.04 setup. Will this affect/break my virtual machine?
You can use the "Appliance Export Wizard" in VirtualBox to export your VM and then import it again on your reinstalled system. I'm using VirtualBox 4.1.8, but this feature has been around for at least a couple of versions.
Exporting a VM
Open VirtualBox
Go to the
File
menu and selectExport Appliance
Select the virtual machine (VM) you want to export and click
Next
Choose where you will save the exported VM and click
Next
Review settings and click
Export
Copy the exported VM to an external hardrive (or put it on a partition that will survive the reinstall). Once you've reinstalled, you can import the VM.
Importing a VM
Open Virtualbox
Go to the
File
menu and selectImport Appliance
Choose the file to import and follow the rest of the prompts.
Before wiping your drive it is always a good idea to backup your personal data in your home directory.
Therefore I am sure you already have plans to do so. In case your virtual disk images are stored there (usually in the hidden
~/.VirtualBox
directory) your virtual disks will also be included in your backup of your HOME directory and they will be restored fully functional and untouched with your backup later.However performing an upgrade from 32-bit Ubuntu to 64-bit Ubuntu can be done without deleting your data in your HOME. In case you keep your HOME you will just reinstall the virtual box application in your fresh Ubuntu installation to keep all your virtual machines (including snapshots) untouched.
Having said so, there may of course be cases where a backup of a virtual machine may be necessary (e.g. in case you want to build up a new home directory, you need to change your user name, or the virtual machines are not stored in HOME).
You then have the choice to export and import your machines in the Open Virtualization Format (OVF) either from the virtual box manager GUI or from the command line
Due to limitations from the OVF format this will not save the current state or snapshots of a given machine. You may clone a virtual machine and register it in a new installation but this may be more work than performing a conventional backup of
~/.Virtualbox
and possible other locations you may have defined for storing the virtual hard disks.I recommend reading the Virtual Box online manual to get an idea on options, procedures and limitations.