[Solved] wiping system, re-instating the VMs afterward, how?

Discussions related to using VirtualBox on Windows hosts.
Post Reply
JammyB
Posts: 9
Joined: 15. Jul 2019, 12:03

[Solved] wiping system, re-instating the VMs afterward, how?

Post by JammyB »

hi!

i run VitualBox on Windows 10 with 3 VMs [2x win10, 1x Ubuntu]. VMs are stored on a seaprate SSD to the OS SSD. i want to wipe the OS [i've broken something and get bluescreens] but i've never re-instated a VM before let alone 3. i just wondered what the process is after i've wiped the OS, installed VirtualBox, how i add back in my 3no existing VMs.

hardware isn't changing, only the software.

thank you!
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: wiping system, re-instating the VMs afterward, how?

Post by socratis »

See the FAQ "Moving a VM" and interpret it as "Backing up a VM" or "Copying a VM".

For a complete VirtualBox backup, you should also back up the "VirtualBox.xml" file. The location of that file depends on the host, see ch. 10.1. Where VirtualBox stores its files of the User Manual. It contains your registered VMs, your VirtualBox preferences.

The easiest way would be to unmount the extra SSD, reinstall your host, install VirtualBox and before even running it, restore the "C:\Users\<you>\.VirtualBox\" file. Just because the VirtualBox.xml file contains all your VMs and settings, you would simply launch VirtualBox and everything would be as you left it...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
JammyB
Posts: 9
Joined: 15. Jul 2019, 12:03

Re: wiping system, re-instating the VMs afterward, how?

Post by JammyB »

sounds perfect. certainly takes the worry out of the equation.

thanks for the advice. will look to do this when i get home this evening.

regards,

James
Rootman
Posts: 251
Joined: 1. Oct 2012, 18:29

Re: wiping system, re-instating the VMs afterward, how?

Post by Rootman »

I've done this many times and the linked docs make it easy.

I cam e to say this. I would highly suggest that you remove the SSD that your VMs are on before doing the OS reinstall. Windows occasionally will do something really stupid and screw up a secondary drive when doing a reinstall of the OS. I once had it goof up my second drive and had to restore my VMs from a backup that I take once a week. This was back in the Windows 7 days but I've always taken this precaution since then when redoing an OS with an attached second drive.
JammyB
Posts: 9
Joined: 15. Jul 2019, 12:03

Re: wiping system, re-instating the VMs afterward, how?

Post by JammyB »

Ok.

So currently my OS SSD won’t boot. Nor be recognised by bios.
I can access it via USB plugged into my laptop. But whilst everything is there folder wise. All folders are empty.
As it stands. I’ve lost all my user data where virtual box configs are stored.
If I format this drive and manage to get it working again. How do I then re-add in my VMs that are located on another drive when I have the config file only the VDI files etc.

Advice would be appreciated!
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: wiping system, re-instating the VMs afterward, how?

Post by scottgus1 »

OK, one step at a time:
JammyB wrote:I can access it via USB plugged into my laptop. But whilst everything is there folder wise. All folders are empty.
Is this laptop the computer you just reinstalled the main bare-metal OS on?
JammyB wrote:Nor be recognised by bios.
Which bios?

If your Virtualbox guests are still on that drive, then this:
JammyB wrote:If I format this drive and manage to get it working again.
Will definitely toast them.
You may not be dead in the water, but thrashing about has a high probablilty of getting you there. Take it nice and slow...
JammyB
Posts: 9
Joined: 15. Jul 2019, 12:03

Re: wiping system, re-instating the VMs afterward, how?

Post by JammyB »

OS SSD - windows 10 (so main host)
^^^ can’t access files on it.
Virtual box installed on it.

VM SSD - D:\
^^^^ separate SSD where I kept the VMs.
This drive is unaffected.

I’ve wiped another SSD and installed windows 10.
If I install virtual box on to it.
How do I add my VMs from D:\ back into it when I don’t have the user files (xml) (mentioned above). I only have what the VM made.
For a complete VirtualBox backup, you should also back up the "VirtualBox.xml" file. The location of that file depends on the host, see ch. 10.1. Where VirtualBox stores its files of the User Manual. It contains your registered VMs, your VirtualBox preferences.

The easiest way would be to unmount the extra SSD, reinstall your host, install VirtualBox and before even running it, restore the "C:\Users\<you>\.VirtualBox\" file. Just because the VirtualBox.xml file contains all your VMs and settings, you would simply launch VirtualBox and everything would be as you left it...
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: wiping system, re-instating the VMs afterward, how?

Post by scottgus1 »

Each guest folder contains a .vbox file (You will need to make the host OS show all extensions, google for how.) You can double-click this .vbox file, and all of the guest's settings will automatically populate back into the new installation of Virtualbox.

Losing the main Virtualbox.xml file isn't as devestating as it might sound, this file just keeps the settings you might make in the main Virtualbox window's File menu Preferences. Your guests will come back by doubleclicking the .vbox's. Any fancy network settings and host-key combinations you may have made will have to be re-made, that's all.
JammyB
Posts: 9
Joined: 15. Jul 2019, 12:03

Re: wiping system, re-instating the VMs afterward, how?

Post by JammyB »

That did it.

Phew. :)

Didn’t want to click anything before seeing answers.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: wiping system, re-instating the VMs afterward, how?

Post by scottgus1 »

Good! Glad you're running well again.
Post Reply