Set Up Previous VirtualBox Machines in Minutes



VirtualBox logo

Problem: After a fresh install of VirtualBox, perhaps in a new Linux installation, how can you seamlessly restore previous virtual operating systems, working as before?

Here's how ..

This works for VirtualBox installed in Linux (Debian such as Ubuntu) and should work equally well for other systems such as Windows because the principle is the same. I have only tried for Ubuntu so, if you use VirtualBox as a programme on another operating system, you will have to reapply the logic.

Setup Unmanaged VPS (4 Noobs!) ... with vpsBible
Secure WordPress. Properly. ... with wpCop, the platform's dedicated security website
Olly 'the_guv' Connelly's vpsBible.com site and 'WordPress 3 Ultimate Security' book.

For Ubuntu Linux at least, say if you are upgrading from Jaunty 9.04 to Karmic 9.10, and want to re-implement your old VirtualBox virtual operating systems, this process is wonderfully simple, resulting in you having your old VirtualBox systems, identical to before.

Reinstate VirtualBox Machines in Ubuntu

If you already know your way around Linux, here's the truncated method:-

  • backup .VirtualBox directory from /home/USERNAME
  • install VirtualBox in new OS, don't run it yet
  • pull across backed up .VirtualBox folder to new /home/USERNAME directory
  • run VirtualBox and start up virtual OS'es in the regular way

Or if you're not sure about that, read on for the detail ..

Where Do VirtualBox Virtual Operating Systems Live?

You can't restore a previous virtual system state if you haven't backed it up, right?, so the first thing to do is to save it.

You can find it (or them), on Debian Linux at least, in:-

NB: the dot before VirtualBox denotes that this is a hidden file. If you can't see the folder, you'll have to enable viewing hidden files. To do that in Ubuntu's Nautilus:-

Rather than restoring just the emulated operating systems, let's restore our VirtualBox settings as well, so just copy the entire .VirtualBox directory, which includes the Machines folder. So backup:-

Reinstalling VirtualBox

In your shiny new operating system, install VirtualBox in the normal way. Here's my guide with a few cute tips:-

Emulate Virtual OSes with VirtualBox

But don't start the program just yet.

Restoring Former Virtual Operating Systems in Ubuntu

Open up your /home/USERNAME directory and simply copy to it your old /home/USERNAME/.VirtualBox folder, in its entirety.

Running Old Virtual Operating Systems in Ubuntu

Now start VirtualBox and access your saved virtual systems in the usual way.

How simple is that?! Way easier than reinstalling those virtual systems, complete with service packs and software, from scratch, huh?!

For more great guides into getting the most of Linux Ubuntu, why not check out this lot:-

2


About the Author:

Olly Connelly (yeah, that's me) blogs at guvnr.com, polices WordPress security at wpCop.com and helps noobs build web servers at vpsBible.com, so if you've got sleeping problems you know where to come.

Discussion

  1. the_guv  November 27, 2009

    @tomas .. I say, what a perceptible kind of a chap you are 😛 Thank you, Sir.

  2. tomas  November 27, 2009

    wow olly… you’re really THE guvnr… great work… great advice… this is THE site to get it!

Add a Comment