OS Backup

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Choatech
Posts: 3
Joined: 14. Jul 2015, 14:57
Primary OS: MS Windows 8
VBox Version: OSE other
Guest OSses: Windows 2012 R2

OS Backup

Post by Choatech »

I am using VirtualBox to test a Windows 2012 lab. I need to setup 3 computers. The problem is, each time I setup a computer I have to activate Windows and I've used up the limited number of activations for my product key.

Isn't there anyway for me to make a backup/image of the OS once I've installed it, and then just use that same backup to create 2 new virtual machines? I don't want to continue wasting activation keys on a virtual machine.

I've found a couple methods online, but they were both programming hacks which I didn't want to get into.

Thanks.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: OS Backup

Post by scottgus1 »

You can back up a guest quite easily, without using up an activation when you restore the backup. The guest would have to be activated already. See "Moving a VM": viewtopic.php?f=35&t=55003 and re-think it as "Backing Up a VM".

Making copies of a guest is also easy. It's called Cloning (see the Virtualbox manual). The copies will have new identification codes (called UUIDs) and this will very likely cause a need for reactivation.

If you already have three guests that are happily activated, just back them up per the Moving link, and restore them as needed when you decide a particular guest needs a reinstall of the OS.

Do make sure that you have your backups labeled, though, since you can't have the same backup restored to run more than one instance in Virtualbox. So say you have guests A, B, C. You make backups. C dies. You can't, for example, bring backup B back and run A B B. The two B's will conflict in Virtualbox due to the UUID thingies (in fact you wouldn't be able to restore a second B while the first B is registered, due to the UUID conflict). One of the two B's will need new UUIDs, causing a reactivation. You'd have to restore the backup of C, or kill the present B as well to use the backup of B.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: OS Backup

Post by mpack »

I would however add the following :-

You use the word backup, but it sounds more like you are setting up three different computers.

If you run Windows simultaneously on three computers then you probably need three licenses, each separately activated. Microsoft can give you a definitive answer on that.

If you copy a VM to three different hosts, and the hosts are not identical, then in many cases the activation check can detect the difference: e.g. because they have different CPUs, different MAC addresses, different VM UUIDs etc.
Choatech
Posts: 3
Joined: 14. Jul 2015, 14:57
Primary OS: MS Windows 8
VBox Version: OSE other
Guest OSses: Windows 2012 R2

Re: OS Backup

Post by Choatech »

I wanted to run 3 cipes of Windows 2012 on my same host computer. I am learning how to do networking in school and I have another book "Learn Windows IIS in a Month of Lunches". The book tells me to setup 3 virtual machines "Win2012", "Web1", and "Web2", so that I can practice some things that are covered in the book, like load balancing.

I created the first virtual machine, and had to activate it, and then when I created Web1, and Web2, I also had to activate them. Then I am getting an error saying that I've used my activation key too many times.

Since this is a test environment, I want to install Win2012, and then I can just make 2 copies of it, Web1, and Web2, without having to use up all of my activation keys on fake computers.

I can run 3 copies of Windows 2012 on the same host computer because it's just simple tests I'm doing from the book to see how things work. The book author says there is no reason to setup on 3 separate computers because the primary goal is only learning to setup the machines to work together, so when I get into a real IT department, I have an understanding of how the live servers are connected.

I copied the folder: C:\Users\Kenneth\VirtualBox VMs\Win2012, which had "Logs", "Win2012.vbox", "Win2012.vbox-prev", and "Win2012.vdi" and I saved it to another location. I'm hoping that if I mess up the test server, I can simply copy these files back and the computer will be returned to initial state without having to activate it again.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: OS Backup

Post by mpack »

In Windows XP (and Win2k3) the solution would have been to activate prior to cloning, however the activation functions in Win7 and later (incl. Win2k12) behave differently - cloning a VM changes the VM UUID, which for recent Windows versions triggers reactivation - unless you override the DMI data prior to cloning.
Choatech
Posts: 3
Joined: 14. Jul 2015, 14:57
Primary OS: MS Windows 8
VBox Version: OSE other
Guest OSses: Windows 2012 R2

Re: OS Backup

Post by Choatech »

Someone gave me this link: techblog.tv/virtualbox-clone-windows-activation/

Do you know if this is something that will work? I do not want to mess something up. It looks to be pretty old and the images don't even load.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: OS Backup

Post by mpack »

Uh, I have no time to proof read any ancient blogs! The information given in this thread is current and accurate.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: OS Backup

Post by scottgus1 »

I copied the folder: C:\Users\Kenneth\VirtualBox VMs\Win2012, which had "Logs", "Win2012.vbox", "Win2012.vbox-prev", and "Win2012.vdi" and I saved it to another location.
As long as you did that while the guest was completely shut down, not save-stated, and you didn't do anything like adding a vdi stored in another folder, then that's the method recommended by the "Moving a VM" link. Copy the folder and all files somewhere else (I'd verify the copies with fc or equivalent). Also, be sure there's no ISO loaded in the virtual CD drive when you make the backup - that's caused a glitch or two when restoring in the past, I think (by the chosen ISO not existing when the restored guest restarts).

Recommendation: Use regular backups, like this process, as a rollback system; don't try to include snapshots in your learning process. Snapshot functions are very often misinterpreted by users (myself included) and folks lose their guests rather too easily.
Post Reply