Using DD command to create a copy of a set up.

This is for discussing general topics about how to use VirtualBox.
Post Reply
Guido
Posts: 2
Joined: 1. Jan 2010, 15:25
Primary OS: Mac OS X Leopard
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: WindowsXP

Using DD command to create a copy of a set up.

Post by Guido »

Hello,
I have a WindowsXP set u quite specific using two partitions. I'd like to run using virtualBox on a Mac (intel of course).
I have a few way I'd like to explore :
My first idea would be to take the HDD holding the two partitions used by WinXP and plug it through either firewire or USB2. Can VirtualBox handle a HDD an use it as it's image ?
If, as I think, it's not possible, I though about 'cloning' of the HDD using the 'dd' command line. I already did it to have a perfect back before doing any hack that may disrupt my set up. But would it be possible to create an image holding 2 partitions and running a Linux LiveCD to clone the HDD to these partitions ? Or even simplier creat an empty disk image, run a liveCD and clone the entire HDD (including the MBR thus the partitions).
Thank you for your advises.
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: Using DD command to create a copy of a set up.

Post by mpack »

Guido wrote:My first idea would be to take the HDD holding the two partitions used by WinXP and plug it through either firewire or USB2. Can VirtualBox handle a HDD an use it as it's image ?
That is possible - VBox can do raw access to physical drives. But, I personally would not recommend it, as mobile drives are slow and prone to error e.g. if you accidentally unplug the drive while the VM is running.
Guido wrote:I though about 'cloning' of the HDD using the 'dd' command line.
If you have a working physical Windows machine then IMHO the easiest way to virtualize it is to download the free SysInternals "disk2vhd.exe" tool, and use that to create a VHD version of the host physical disk (this will include all of its partitions). You can then use the VHD as-is (not recommended, VHD is not a good format), or you can use my CloneVDI tool to convert it to a VDI. Then you simply create a new VM as close as possible to the old host and mount the new VDI in it.

Read up on migration issues first: physical Windows PCs usually have to be prepared properly (e.g. by running MergeIDE) before you image it, otherwise the guest is unlikely to boot as a VM. You will also have to reactivate the Windows guest as the hardware will have changed significantly. This applies regardless of which imaging tool you use.
Guido
Posts: 2
Joined: 1. Jan 2010, 15:25
Primary OS: Mac OS X Leopard
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: WindowsXP

Re: Using DD command to create a copy of a set up.

Post by Guido »

Thanks for this quick reply mPack. I'm going to take a try at your suggestion.
Post Reply