Proper way to clone and re-setup Win7 machine

Discussions about using Windows guests in VirtualBox.
Post Reply
rjo98
Posts: 59
Joined: 6. Jul 2009, 17:32
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: XP, CentOS, Fedora

Proper way to clone and re-setup Win7 machine

Post by rjo98 »

Hi all. I'm currently running Windows 7 in BootCamp on a MacBook Pro, and I need to make an image of my existing machine, as this old machine is failing. What are the proper steps I need to take to do that? and are there special settings I need to do based on what my hardware is now when I setup that VM on a new machine in VirtualBox?
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Proper way to clone and re-setup Win7 machine

Post by socratis »

What have you tried so far?
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.
rjo98
Posts: 59
Joined: 6. Jul 2009, 17:32
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: XP, CentOS, Fedora

Re: Proper way to clone and re-setup Win7 machine

Post by rjo98 »

I haven't tried anything yet, have never actually cloned a machine before. the total space is pushing 120GB so imagining it will take a while, so figured I'd see if there were certain steps to follow during the cloning or when setting it up after cloning.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Proper way to clone and re-setup Win7 machine

Post by socratis »

DISCLAIMER: I HAVE NOT TRIED THIS MYSELF
First of all you need Disk2VHD. Image the Bootcamp partition to an external HD. Optionally (but highly recommended) convert the VHD to VDI (look in the manual for the proper instructions). Build a VM with as close to the actual hardware as possible. Try it out. I would start in safe mode because there will be differences in the hardware. Expect to be asked to activate Windows.

Edit: I have not tried myself a Bootcamp partition. I have tried it and made it with an old NT4 system of mine.
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.
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: Proper way to clone and re-setup Win7 machine

Post by mpack »

I expect you might run into problems because of the unusual - and non Microsoft - dual boot arrangement on the disk. It'll be an interesting experiment however, so do remember to report back.
rjo98
Posts: 59
Joined: 6. Jul 2009, 17:32
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: XP, CentOS, Fedora

Re: Proper way to clone and re-setup Win7 machine

Post by rjo98 »

Thanks guys. Yeah, I figured at least since it's bootcamp my partition numbering will be wrong that first time I try to boot it in VirtualBox. So let me see if I have this down,

*Use Disk2VHD to image my BootCamp partition. Can I use my machine while it clones or do I need to let it sit idle?
*Convert the VHD to a VDI (after I find the instructions on how to do that)
*Build a VM with the same specs that will use this VDI as it's drive. But which options do I need to make the same? Just # of processors and RAM? Usually when I make a virtual machine from scratch, I just leave the settings at their defaults because there's so many I'm not sure on.
*The first time I try to start the VDI in VirtualBox, start it in safe mode to scan for hardware changes and let Windows fix them up.
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: Proper way to clone and re-setup Win7 machine

Post by mpack »

A bootable disk image consists of more than just the OS partition. You need the boot sector (MBR) as well, and you possibly need a boot manager.

I don't know about bootcamp, but a typical Win7 partition map will look like [MBR]..[Boot Mgr Partition 100MB]...[Win7 partition XXGB]. The "..." represents optional padding which aligns partitions on handy boundaries, e.g. 1MB. The Win7 partition on its own is not bootable, but I don't know what happens to the Win7 boot manager on a Mac. If you were P2Ving a standard Win7 installation you would use Disk2VHD to image the entire disk.

To convert VHD to VDI the command is :-

Code: Select all

VBoxManage clonehd <srcfilename>.vhd <dstfilename>.vdi --format VDI

Assuming the lack of a boot manager is a problem, one possible approach I've been thinking of - and I don't know if it would work - is to install Win7 into the VM from a setup DVD, making sure that the Win7 partition is the same size as your bootcamp one (might take experimentation), then once installed, use dd or CloneZilla etc to overwrite the new Win7 partition with your Win7. The idea is to get the boot manager in place but overwrite the Win7 partition. This won't work if Win7 stores a signature in the OS partition.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Proper way to clone and re-setup Win7 machine

Post by socratis »

How about a system backup/restore with the Windows 7 native tools? Would that work?
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.
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: Proper way to clone and re-setup Win7 machine

Post by mpack »

Pass: I've never used Windows backup - I always use my preferred third party whole disk backup tools. Possibly worth a try.
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: Proper way to clone and re-setup Win7 machine

Post by scottgus1 »

I have tried Windows 7's native backup & restore on my work computer and it worked fine. Should work just as well in a guest.
Post Reply