Thursday, June 16, 2011

How to Create a Windows 7 VHD at Boot to Start with from Boot...

0 comments
 




Virtual Hard Drive VHD File - Create and Start with at Boot

How to Create a Windows 7 VHD at Boot to Start with from Boot
Published by AHAD SARKAR
Default Virtual Hard Drive VHD File - Create and Start with at Boot

How to Create a Windows 7 VHD at Boot to Start with from Boot

information   Information
This will show you how to create a Windows 7 VHD file at boot on an existing installed OS's (ex: Vista or Windows 7) C: hard disk or partition to be able to natively boot from the Windows 7 VHD at startup in the Windows Boot Manager.
Windows Boot Manager.This will show you how to change the amount of time in Windows 7 to display the Windows Boot Managerlist of operating systems at boot and wait for you to select a OS to start before the default OS starts automatically.
EXAMPLE: Windows Boot Manager
NOTE: This is the boot screen where you select what operating system that you would like to start. By default, you have 30 seconds to choose another operating system before the default operating system will start automatically.
Operating System to Start - Change Display List Time-boot_manager.jpg 
Note   Note
This will create a C:\(file name).vhd file on the C: drive or partition at
boot that is used to natively boot from at startup.
warning   Warning
While all Windows 7 editions can create and attach a VHD, only the Windows 7 Ultimate and Enterprise editions support booting from a VHD.

EXAMPLE: Windows Boot Manager 
NOTE: You will be able to either select your currently installed OS (ex: Vista) or the VHD file (ex: Windows 7) in the Windows Boot Manager to start your computer with.
Virtual Hard Drive VHD File - Create and Start with at Boot-boot_manager.jpg 
EXAMPLE: VHD file in your Current OS (ex: Vista)
NOTE: This is where the VHD file will be stored at on your currently installed OS (ex: Vista) to be used to boot from.
Virtual Hard Drive VHD File - Create and Start with at Boot-example.jpg



OPTION ONE

To Create and Add the VHD to Boot From
1. Insert your retail copy Windows 7 installation disk into the CD/DVD drive, and restart the computer.

2. When you are at the start of the Windows 7 installation screen, press the Shift+F10 keys. (See screenshot below)
Virtual Hard Drive VHD File - Create and Start with at Boot-setup.jpg

A) Go to step 4. 
OR

3. Boot into the command prompt from the Start Recovery Options screen. (See screenshot below)
NOTE: You will use OPTION TWO at that link.
Virtual Hard Drive VHD File - Create and Start with at Boot-step1.jpg 
4. In the command prompt, type diskpart and press Enter. (See screenshot below)
Virtual Hard Drive VHD File - Create and Start with at Boot-step2.jpg 
5. To Create a Fixed VHD File
NOTE: A fixed VHD file will allocate the entire maximum size (ex: 40GB) that you set below for the VHD file size.
A) In the command prompt, type the command below and press Enter.

Code:
create vdisk file=C:\VHD-Windows7.vhd maximum=40960
NOTE: You can substitute the VHD-Windows7 name with any name you would like for the VHD file instead. You can also substitute the maximum size of 40960 MB for the VHD to the maximum size you want instead in MB (1GB = 1024MB).
Virtual Hard Drive VHD File - Create and Start with at Boot-step3.jpg 
B) Go to step 7.
6. To Create an Expandable VHD File
NOTE: An expandable VHD file will only be as large as the amount of data that is saved in the VHD file, but still can get as large as the maximium size (ex: 40GB) that you set below. For example, using this option, the VHD file showed only 7GB instead of the full 40GB. Even though the VHD file is expandable, you may need to install Windows Virtual PC to have a program associated with VHD files to actual see only the smaller size instead of the larger size for the VHD file.
A) In the command prompt, type the command below and press Enter.

Code:
create vdisk file=C:\VHD-Windows7.vhd maximum=40960 type=expandable
NOTE: You can substitute the VHD-Windows7 name with any name you would like for the VHD file instead. You can also substitute the maximum size of 40960 MB for the VHD to the maximum size you want instead in MB (1GB = 1024MB)
7. In the command prompt, type the command below and press Enter. (See screenshot below)
NOTE: If you subsituted the VHD-Windows7 name in step 5 or 6, then you will need to use it here as well.

Code:
select vdisk file=C:\VHD-Windows7.vhd
Virtual Hard Drive VHD File - Create and Start with at Boot-step4.jpg 
8. In the command prompt, type attach vdisk and press Enter. (See screenshot below)
Virtual Hard Drive VHD File - Create and Start with at Boot-step5.jpg 
9. In the command prompt, type exit and press Enter. (See screenshot below)
Virtual Hard Drive VHD File - Create and Start with at Boot-step6.jpg 
10. Close the command prompt window. (See screenshot above)

11. Close the System Recovery Options window. (See screenshot below)
WARNING: You must close it only. Do not click on the Shut Down or Restart button.
Virtual Hard Drive VHD File - Create and Start with at Boot-step7.jpg 
12. Click on the Install now button. (See screenshot below)
Virtual Hard Drive VHD File - Create and Start with at Boot-step8.jpg 
13. Check the I accept the license terms box and click on Next. (See screenshot below)
Virtual Hard Drive VHD File - Create and Start with at Boot-step9.jpg 
14. Click on the Custom (advanced) option. (See screenshot below)
Virtual Hard Drive VHD File - Create and Start with at Boot-step10.jpg 
15. Select the available option with the unallocated space that is the same maximum VHD size (ex: 40GB = 40960MB) that you specified in step 5 or 6 above, and click on the Next button. (See screenshot below)
NOTE: If you see the Windows cannot be install to this disk warning, then you can ignore it. Windows 7 will install on the VHD file.
Virtual Hard Drive VHD File - Create and Start with at Boot-step11.jpg 
16. Finish doing a clean install of Windows 7.
NOTE: You will pick up at step 10 at that link to finish installing Windows 7 on the VHD file.

17. When you restart or start the computer, you will now have Windows 7 to select from at boot to start natively from the VHD file. (See the first example at top of the tutorial.)




OPTION TWO

To Delete the VHD and Remove from Boot List
1. To Remove OS VHD from Windows Boot Manager List
A) Delete the listed OS VHD from the Windows Boot Manager in msconfig.
2. To Delete the VHD File
A) In Windows Explorer, navigate to C: and right click on the VHD file that you have created in step 5 or 6 OPTION ONE above (ex: C:\VHD-Windows7.vhd) and click on Delete.

B) Click on Yes to approve deletion.
That's it,
                             iHACK

Leave a Reply