Pages

Monday, December 7, 2009

Bootable VHD in Windows 7 using Pre-Built Hyper-V VHD file

Overview

On my lap top currently I run Windows 7 x64  and MOSS 2007 and I am very happy with it (no more VPC, VMWare  or carry that heavy external Hard Drive). See Current Specs below.

I tried to install SPS 2010 on the same base install where I had MOSS 2007 already installed( see my other post before you try…)

This time I am trying to create new multi bootable  partition from a VHD that is attached on my base Windows 7 install.  While there are many good references to get started, I wanted to share my experience of how I got my build done.

My goal is to load create a new VHD where I can load all the next generation Beta products. This to include SPS 2010 Beta, VS2010 and all other supporting/necessary components.

Current Specs

Dell Latitude D630  (x64)
4GB RAM
Windows 7 x64 Ultimate
SQL Server 2008 SP1
VS.net 2008 SP1
MOSS 2007 SP2 Oct CU
Office 2010 Beta
SPD 2007

References
  1. http://www.hanselman.com/blog/LessVirtualMoreMachineWindows7AndTheMagicOfBootToVHD.aspx
  2. VHD-Extender toolkit
    1. http://vmtoolkit.com/blogs/announcements/archive/2007/01/17/vhd-expander-available.aspx
Solution

To start with I am repurposing Microsoft provided Windows 2008 R2 VHD pre built Hyper-V Virtual machine but has 180 day evaluation license, which is good enough at the movement  as SPS2010 and VS2010 are still in beta for at least next few months (3-6months).

  • So I downloaded the image, extracted and repurposed only the base VHD file.
  • The base VHD is only about 6.7GB.
  • Next attached the VHD in Windows 7 and I was able to see the content of the drive.
  • Following the bcdedit scripts I finished the dual bootable configuration.
  • Upon booting, the boot failed with the green screen error message says that the size of the drive is too small.
  • So next I utilized the VHD-Extender tool to extend the file, the version of the VHDExtender game an option extend only to minimum of 127GB. Which I did and this will be extended to a new file.
Steps
  1. Download the Windows 2008 VHD (Reference link 2)
    1. clip_image001 
  2. Run the xxx-part01.exe and let the extract complete.
    1.  clip_image002
    2. clip_image003
  3. The extract process will create a folder structure, which is a pre configured Hyper-V virtual machine.

    1. image

  4. From all of this all I am interested is the VHD file. So navigate to the following folder to find VHD file.

    1. image

    2. image

  5. Extending the original 6.7GB VHD to 127GB file using the VHDExtender

    1. image

    2. clip_image016

  6. Now from the Windows 7, from the Computer Manager, navigate to Storage>Disk Management, right click and choose Attach VHD
    1. clip_image005
    2. clip_image006
    3. clip_image007
    4. clip_image008
    5. clip_image009
    6. clip_image010
    7. clip_image011
  7. Using BCDEdit, create new Boot entry
    1. clip_image012
  8. Copy the new GUID  from above command
    1. clip_image013
  9. Now follow next steps of BCDedit commands as below
    1. clip_image014
  10. Validate the registration
    1. clip_image015
  11. Reboot and choose the new Windows 2008 partition to boot.
    1. image

  12. After choosing to boot from the new partition, I got below error with status code ”0xc000000e”
    1. image
  13. Reboot with Windows 2008 R2 DVD
  14. Choose Repair Windows
    1. photo
  15. Now notice that on the Windows 2008 partition, the drive size seems to be displayed as 0MB and the location is unknown.
    1. photo
  16. When I rebooted with the base Windows 7,  I noticed that the Attached VHD drive is no more in the list of drive under my storage management (Computer Management console).
  17. Now I tried attaching the drive and trying to reboot, it seems that the VHD from the Hyper-V is not quite recognizable under this Windows 7 VHD attach process.
  18. Further search led me to confirm that there might be an issue with this process with some one who had tried similar approach (http://blog.frankovic.net/2009/05/boot-win-2008-r2-rc-from-vhd/)
  19. After further through I realized why the System Recovery Option was not displaying the partition size and the location.
    1. The drive where I stored the VHD is on an external drive that is connected to my lap top via ESATA connection.
    2. When the lap top was rebooted, the BIOS does not know or have the ESATA drivers and hence the VHD was not at all identified.
  20. Next Steps
    1. So my next steps are to really create a new VHD from scratch, install OS and go from there.
      1. OR
    2. Try with the base prebuilt Win 2008 R2 VHD which is 6.7GB by copying the VHD to my local lap top drive.
      1. This option just did not work at all. When rebooted the windows never came up, always received BDOS.
  21. See my next post for my results.
  22. To clean up current configure simply ran bcdedit /delete as below:
    1. image 
Final Update

When I created the VHD as fixed disk, the install and booting went well. Finally when everything started working, I felt that I been missing my productivity tools where were on my base Windows 7 install.

So finally I am ended up going back to my VMware Workstation option, and here are couple of reasons.

Microsoft VPC 2007 did not support x64 bit OS.

VMWare Workstation 7 supported Windows 2008 x64 bit.

No comments: