Page 1 of 1

Proper way to clone and re-setup Win7 machine

Posted: 20. Mar 2014, 00:10
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?

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

Posted: 20. Mar 2014, 00:46
by socratis
What have you tried so far?

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

Posted: 20. Mar 2014, 03:27
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.

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

Posted: 20. Mar 2014, 08:29
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.

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

Posted: 20. Mar 2014, 12:53
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.

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

Posted: 20. Mar 2014, 16:42
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.

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

Posted: 20. Mar 2014, 17:07
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.

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

Posted: 20. Mar 2014, 19:28
by socratis
How about a system backup/restore with the Windows 7 native tools? Would that work?

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

Posted: 20. Mar 2014, 20:32
by mpack
Pass: I've never used Windows backup - I always use my preferred third party whole disk backup tools. Possibly worth a try.

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

Posted: 21. Mar 2014, 16:33
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.