I have a lot of VirtualBox machines on my workstation. The workstation is openSUSE 12.1 and I want to change to 13.1, but I want to be sure I don’t lose any of the VB setups (each of them has been configured with a lot of different settings and applications). Some are Windows (XP, 7, 8) and some are Ubuntu, openSUSE, CentOS and Fedora. How do I copy these properly to an external drive and then back on to my new 13.1 install (same host hardware) without losing anything?
Copy these two directories from your home directory to a safe place:
VirtualBox VMs
.VirtualBox
(You may need quite a lot of space, depending on the number and sizes of virtual machines you have installed.)
… and copy them back when openSUSE 13.1 and VirtualBox have been installed.
You may need to install Oracle_VM_VirtualBox_Extension_Pack and VBoxGuestAdditions in your new setup.
Vbox likes to put the vm’s in your home but that is just the default. You may have put them some where else???
If you have / and /home in separate partitions, then you don’t have to do anything special – you just install the new openSUSE 13.1 in / (formatting / but not formatting /home) and the VMs will be usable with the latest VirtualBox.
I’d prefer a completely fresh install, but is there a way to delete everything in home but those folders?
As root you could:
- Move (‘mv’) those two folders somewhere out of your user directory
- Remove (‘rm -rf’) everything in your user directory, and then
- Move (‘mv’) those two folders back into your user directory
which will be very fast as no file contents will be copied anywhere, but don’t try it if you’re not comfortable executing shell commands and specifying pathnames with wildcards.
On 2014-01-03 23:46, BlueDev wrote:
>
> If you have / and /home in separate partitions, then you don’t have to
> do anything special – you just install the new openSUSE 13.1 in /
> (formatting / but not formatting /home) and the VMs will be usable
> with the latest VirtualBox.
I use a dedicated partition for virtual machines.
–
Cheers / Saludos,
Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)
Me too. Can be useful to isolate something that may be hammering the disk a lot, and it gives the opportunity to choose a filesystem that might be better suited to the VM guests’ access patterns.