How do I convert a physical (non-windows) disk to a VHD?

3

2

I have a physical disk from a dead machine which used to run Linux. I am trying to recover files I had there (shared with Samba). I want to convert the disk to a VHD and run it in a VM so that I can copy the files from the shares.

There are two partitions on the disk an nither gets assigned a drive letter. I planned to use disk2vhd but unfortunately this utility works on volumes not on disks and requires drive letters.

I also tried using virtual PC 2007 which supports assigning a physical disk Virtual PC.exe crasehs when I try to start a VM when such a disk is attached to the VM.

John

Posted 2011-12-31T00:23:29.697

Reputation: 233

What is the file system on each partition? – dnbrv – 2011-12-31T00:26:39.277

I'm not sure. It's a Debian installation and I used the defaults. – John – 2011-12-31T00:48:59.213

Answers

1

Not a direct answer, but:

If you only want to recover files from the physical disk, it's much easier to just mount the disk as an external disk and copy off the files. If it's a default Debian install, it uses ext3, which any halfway modern Linux distro will read.

Just boot Linux (e.g. by using a rescue CD), mount the disk, and copy off what you need. You can either mount your internal main disk to copy the data to, or use an external drive.

sleske

Posted 2011-12-31T00:23:29.697

Reputation: 19 887

1

DISCLAIMER

I know you asked for a VHD converter tool, however you are flirting with much pain and suffering unless you have paid-for Hyper-V tools at your disposal. In my estimation, the free tools that are available for P2V conversions in the VHD world are not worth your effort.

If you can flex a little bit on your requirements, read on.

Enter: VMware

I would suggest that you consider the use of VMware vCenter Converter to P2V your disk and then use VMware Player to play the virtual machine. If you must have a VHD, you could then take the working VMware virtual machine and convert it to a VHD. A bit of a Texas Three-Step, however, oddly, it would likely work better than trying to go straight from physical disk to VHD... unless you want to pay for SCVMM.

Wesley

Posted 2011-12-31T00:23:29.697

Reputation: 4 359

I prefer solution based on Virtual PC or VirtualBox since I have these products installed on machines. – John – 2011-12-31T01:16:05.773

1I tried the vCenter Converter and it has the same limitation as disk2vhd - it only converts volumes with drive letters. – John – 2011-12-31T01:28:46.240