Boot using Microsoft Windows 7 VHD


Guys, finally I am back with another interesting post on a topic which is very near and dear to my heart. Yes, I am talking about “Virtualization”…. I have been reading a lot of blogs about this topic and I must say that Microsoft has done a huge job in getting it out of its door. With the release of Windows Server 2008 R2, Hyper-V has shown a lot of improvements. This post does not cover the improvements of Hyper-V and features of Virtualization in Microsoft Windows 7 and Microsoft Windows Server 2008.

Objective of this post is to highlight the process through which you can boot using a pre-built Windows 7 VHD file and make it work like a real environment which means you can boot from this VHD file and it will utilize the full capacity of your machine (Full processor, Full RAM and all hardware). In short a virtual machine (VHD) will be used as a complete OS (dual boot)

Prerequisites:

  1. You have a VHD file with Windows 7 or Windows Server 2008 installed on it.
  2. You have enough space in the hard disk as per the size of the VHD. If VHD is 127GB, you must have 127GB available space in your hard drive.
  3. Preferably SSD with good read/write speed as IO will be compromised a lot here. Although this is not required but if you have it then its good otherwise, you will experience decline in the performance.

Scenario:

I have Windows Server 2008 R2 installed on my machine and I have Windows 7 installed in my virtual environment so I have a VHD file with Windows 7 installed in it and I want to have a dual boot menu which will show up two options.

  1. Microsoft Windows Server 2008 R2 <– This will boot from the real environment
  2. Microsoft Windows 7 <– This will boot from the VHD file

Steps:

  1. Boot your Windows Sever 2008 R2
  2. Run your VHD file using Hyper-V manger
  3. Once the virtual environment is booted you can press CTRL + ALT + BREAK to view in full screen.
  4. In your virtual OS (in my case it is Windows 7). Go to command prompt.
  5. Go to c:\Windows\System32\sysprep
  6. Type sysprep /shutdown /generalize
  7. This will open a dialogue box.
    1. Check the generalize check box
    2. In System clean-up action: Select Enter System Out of box Experience
    3. In Shutdown option, select shutdown.
    4. Click OK
  8. Wait for this operation to complete. See some details about SysPrep at the end of this blog.
  9. Once the process is complete, it will shutdown the virtual machine. DO NOT run the virtual machine again.
  10. It’s time to update the boot menu options. For this process, use a utility BCD which comes with Windows. However, you can download any wrapper utility with an easy user interface to do it. In my case, I download easyBCD. Download it, install it and run it.
  11. Add one boot option using easyBCD. Refer to the 3rd snapshot.
  12. Reboot your machine and you will see a boot menu with two entries. In my case, they are
    1. Microsoft Windows Server 2008 R2
    2. Microsoft Windows 7
  13. Select Microsoft Windows 7 (which was on my VHD) and let it boot. Once booted it will install new drivers and will open up Windows setup again. The setup will guide through the process. NOTE: You are NOT required to re-install windows. It is just the reconfiguration which Windows will take care of.
  14. Once the process is done it will reboot. Now you are good to go. Reboot Windows 7 and check the process and RAM – You will be surprised…
sysprep

sysprep

sysprepUI

sysprepUI

easyBCD

easyBCD

More Information about sysprep:
Desktop deployment is typically performed via disk cloning applications. Sysprep can be used to prepare an operating system for disk cloning and restoration via a disk image. Windows operating system installations include many unique elements per installation that need to be “generalized” before capturing and deploying a disk image to multiple computers. Some of these elements include:

  • Computer name
  • Security Identifier (SID)
  • Driver Cache

Sysprep seeks to solve these issues by allowing for the generation of new computer names, unique SIDs, and custom driver cache databases during the Sysprep process.

GOOD JOB Microsoft :-)

Advertisements

3 Comments

  1. Nice!!! thanks for this article – very informative and to the point. Incredibly helpful!

  2. Waqas Ahmad

    great post dear………. may be now its the end of using VMWare type applications….. will research over VHD and see how it all does the work ..

  3. Thanks for sharing this, precise steps to configure things. I agree that Sysprep is good, handy tool for deploying windows on multiple machines. I had quite an experience using it.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: