0

My mom's windows XP machine finally died. The disk drive is still working and in great shape and I can read files from it just fine. I would like to be able to use the drive in a virtual machine on a new Linux box. I have a retail version of Windows XP installed so not concerned about licensing.

From my prior research I have learned that a powered off machine is significantly hard to do physical to virtual conversion.

I've read the following sites: https://communities.vmware.com/thread/472384 this did not work for me. I read this post: How to convert laptop drive for use as VMware image? and cannot find the system recovery server edition software mentioned in the top post to try. Using virtual box command line to image the drive and mount as VM doesn't work because the drivers for virtual hardware are not installed in the Windows hard drive.

If it matters the hard drive is a SATA model not IDE.

Any help would be appreciated.

1 Answers1

2

I've just spent a few days working on this to bring back a dead Windows 7 workstation as a VMWare VM. I'm replying to this old question to share what I've learnt.

  1. Use Disk2VHD to create a VHDX image of the disk - this allows you to really mess with it without screwing up the source disk.

  2. Double click on the VHDX image, which mounts it in windows. At this point you can use the windows Disk Management app to shrink the volume if there's free space.

  3. In an Admin CMD console use diskpart to offline the disk.Commands: 'select disk x' and then 'offline disk' . You need to do this to allow the VM to connect to it.

  4. Create a custom VM. Select the correct OS but skip the installation, choose a physical disk of type SATA (not SCSI - this took me ages to realise) and select the physical disk using 'Disk Management' information.

  5. Start the VM and see what happens.

I had a lot of issues with the partition type, I had a MBR disk that had been half converted to GPT. MBR disks use BIOS firmware, GPT disks use EUFI firmware. I had to boot using a gparted iso and remove the GPT tables to make the disk only MBR ('gdisk /dev/sda' select MBR and then 'r' to enter into 'recovery and transformation options', 'g' to convert to MBR and 'w' to write the the partition table), then boot with a Windows 7 iso to rebuild the 100Mb System boot partition.

You can use diskpart in the Windows recovery to determine where you boot partition is with 'detail disk'. Format the partition (in this example R: is the boot partition and C: is the Windows install) and rebuild the boot information 'bootsect /nt60 R:/mbr' and 'bcdboot C:\Windows /s R:'

gparted also allowed me to add the 'boot' flag to the System partition.

You can't clone or snapshot a VM with a physical disk so you need then to convert it.

Now you can add a VMWare SATA virtual disk of the same size and use clonezilla to create a image of the VHDX disk, detach the VHDX disk and reboot using the new VMWare virutal disk.

Or you can install VMware vCenter Converter and create a new VM of the VM.

Hope this helps someone.