5

I have an old hdd from my notebook that carries WindowsXP. I would like to run this WindowsXP installation under Virtual box under Windows7. I am able to connect the disk to my Windows7 via usb.

So far I didn't find any free working solution to that. Would you have an idea?

Regarding

  • disk manager from Windows7 the system partition ( drive H from below picture) is Healty - active and primary)
  • gparted from ubuntu the partition got boot flag but I wasn't able to boot from this usb hdd

What I found/tried so far that didn't work for me

  • VirtualBox from an existing partition (VMWare convertor requires the machine must be running at the time of conversion - https://www.vmware.com/pdf/convsa_51_guide.pdf)
  • Create Virtualbox image of a physical partition (linux solution I got only Windows7 available and the official Virtual Box page have step one: "Run the MergeIDE utility as mentioned above on existing windows machine. " I cannot run the XP any more or can I?)
  • I tried to use Disk2vhd and the vhd file was created but when used as virtual hdd in Virtual box it won't boot. I tried to play with different settings of this virtual machine but it didn't help. I tried two versions of Disk2vhd and Virtual Box. Once yesterday and once 3 years ago :-)

The physical drive got two partitions that are mapped as drives H and I. The H drive is the system bootable partition. And that is what I ticked.

How I used Dist2vhd

Update1

I tried to use Disk2vhd and selected both partitions (H & I) and again played with the settings like Enable IO APIC and Enable PAE/NX but the virtual machine didn't boot up.

20
  • OK. Let's try ... ;-)
    – Radek
    Sep 29, 2013 at 1:54
  • @Radek what have you tried opening the vhd with?
    – Cole Busby
    Sep 29, 2013 at 4:15
  • @ColeBusby: I didn't try to open it. I used it as hdd for Virtual Box virtual machine.
    – Radek
    Sep 29, 2013 at 4:18
  • 1
    I can't verify if this will work, but look into vmware.com/products/converter. If its possible to P2V and capture the image w/o a vmware cluster, you will be able to use it with vmware.com/products/player. Free solution if you can get the converter to work. Link for free VMware Player-my.vmware.com/web/vmware/free#desktop_end_user_computing/… Sep 29, 2013 at 5:09
  • 1
    Did you try disk2vhd while ticking everything, to try and create an exact copy of the disk?
    – harrymc
    Sep 29, 2013 at 11:25

3 Answers 3

6
+200

Your problem is that you are converting partition(s), not the whole hard drive.

You cannot boot your OS because in the newly created virtual disk you have no MBR record - to simplify, original MBR is part of the disk, not part of the partition (it is outside of the scope of the partitions).

To make your OS boot properly, create a virtual HDD image of your partition using any working method from the list you've tried, and then restore the MBR:

  1. Create your VM, connect the virtual drive.
  2. Boot the VM from Windows XP CD. Note, that you need to boot the VM, not the physical computer as @MariusMatutiae suggested in his post.
  3. Launch Recovery Console
  4. Use the fixmbr tool to recover MBR
  5. You may also use fixboot tool to recover partition boot sector, though it shouldn't need fixing.

Once done, your virtualised system should be bootable again.

Note though, that Windows XP might not launch due to change of hardware.

0
1

Here is a procedure based on the article Linux P2V With DD and VHDTool :

  1. Download and install the Windows version of DD and VHD tool.

  2. Use DD with the --list parameter to find the name of the disk in question

  3. Create a raw image of the disk via a command such as:
    dd if=\\?\Device\Harddisk1\DR2 of=C:\Hanna.img bs=1M --progress

  4. Use VHD tool to converts the raw disk image file to a fixed-format VHD:
    VHDTool /convert c:\Hanna.img

  5. Rename the converted image file from .img to .vhd

  6. Define the VM using the .vhd file

15
  • Even if the recovered image works, there is no guarantee that Windows in the VM will stay activated. You should (if possible) try to find out the MAC address of the old computer to set in the VM.
    – harrymc
    Sep 29, 2013 at 12:55
  • 1
    How is MAC address related to the fact that it won't boot? I can boot the old computer from usb. Ubuntu from usb flash works ok but this hdd won't boot from usb. I am not able to use this hdd internally anymore.
    – Radek
    Sep 29, 2013 at 13:05
  • Can your old notebook boot from this HDD? Sep 29, 2013 at 13:14
  • @Radek: What I'm saying is that if you do manage to construct and boot the VM successfully, XP might still decide that reactivation is required because the emulated hardware is too different from the original. The biggest factors in activation are the network card (MAC) and the motherboard, so you should try to keep them both (or at least one of them, and the easiest is the MAC). The above procedure will at least keep the same disk serial number.
    – harrymc
    Sep 29, 2013 at 13:31
  • @harrymc: what kind of activation? I can get the mac when I boot up ubuntu.
    – Radek
    Sep 29, 2013 at 13:46
1

I think your first problem, even before the one solved by harrymc, is a corrupted boot sector in your disk. Easiest solution is: get yourself a live Ubuntu USB stick, and use boot-repair to restore your Master Boot Record (MBR). Though using a Ubuntu live stick is a bit of a nuisance at first, it helps you solve serious issues in the future. So go to www.ubuntu.com, download a copy of the OS, and install it on USB stick.

Boot your pc from the stick, and now install boot-repair. This very clear Web page has all the info on how to install it on the stick, and how to run it. It is trivial.

EDIT: just be careful to repair the MBR of the HDD, not of the pc disk, that's all.

This will fix your MBR. At this point the HDD will become once more correctly bootable, and harrymc's instructions will apply.

However, since you do have Ubuntu, you may as well give it try and follow harry's solution with proper Linux utilities. There are guides everywhere, but should you wish any guidance just ask (I bet there are thousands of people in this forum who know hot to do that, LOL).

@harry: about the registration, as the French say, glissez, glissez, n'appuyez pas.

1
  • I got the message about going slowly. Merci beaucoup. Just to note that all and any manipulation on the physical disk can equally be done on the virtual one from the VM (and much more safely if the physical disk is old).
    – harrymc
    Sep 29, 2013 at 14:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .