make VHD of Win7 using disk2vhd and new vm does not boot

18 Sep

found that the boot partition is missing when mounting VHD you get a raw partition… format as NTFS and follow the following to get it to boot

Note: you should see the OS listing under the recovery options after doing thise

http://blogs.technet.com/b/jonjor/archive/2011/10/04/vm-does-not-boot-following-p2v-or-disk2vhd.aspx

We’re going to fix the entire boot path, despite what part of it is broken. Go find an ISO or DVD of any of the operating systems just listed in the title. Prepare to boot your VM from this media. We’re going to use the recovery console. We’ll assume you are using Windows 7 media.

  1. Attach the Windows 7 installation disc to the virtual machine disc drive, and then start the computer.
  2. Press a key when you are prompted.
  3. Select a language, a time, a currency, a keyboard or an input method, and then click Next.
  4. Click Repair your computer.
  5. Click the operating system that you want to repair, and then click Next.
  6. In the System Recovery Options dialog box, click Command Prompt.
    1. If an operating system is not found simply continue anyway
  7. Type the following command in this order to set your system straight:
    1. bootrec /fixmbr    (Fixes MBR)
    2. bootrec /fixboot   (Fixes Boot Sector)
    3. bootrec /scanos    (Scans for Windows installations to add)
    4. Reboot! (Type Exit)
  8. If you still do not boot into Windows, or do not have a boot menu, or something is still wrong, follow steps 1 – 6 again. For step 7 type this instead
    1. bootrec /rebuildbcd    (Rebuilds entire BCD… not a really big deal)
    2. Reboot! (type Exit)

if you still do not boot run the recovery from win7 install disk pick fix Startup

 

if it still does not work, mount the VHD and delete the first partition

boot pick repair, dos prompt use diskpart to format the first partition,  now follow the above steps

if working you should get bootmgr missing,  then do a startup and repair from DVD  d: drive should show up as the OS at this point and it should now boot after the startup and repair