Welcome to TQ CMS knowledge base. Here you will find useful information for all sorts of things.

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.
 
Note   Note
This tutorial uses an example that will create a C:\(file name).vhd file on the C: drive/partition at boot that is used to natively boot from at startup.

You will be able to create the VHD file on any partition or drive letter that you like though.
 
warning   Warning
All Vista, Windows 7, and Windows 8 (except Windows 8 RT) editions support booting from a VHD.

You must have either Windows 7 Ultimate, Windows 7 Enterprise, Windows 8 Pro, or Windows 8 Enterprise installed on the VHD to be able to boot from the VHD natively.
 


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. Boot from your retail copy Windows 7 Ultimate or Enterprise installation DVD/USB, and do step 2 or 3 below for what you would like to do.
NOTE: To have Windows 8 on VHD, see instead: How to Create a Windows 8 VHD at Boot to Dual Boot with Windows 7 or Vista

2. When you are at the start of the Windows 7 installation screen, press the Shift+F10 keys, and go to step 4 below. (See screenshot below)
Virtual Hard Drive VHD File - Create and Start with at Boot-setup.jpg
3. Boot into the command prompt from the Startup Recovery Options screen, and go to step 4 below. (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. In the elevated command prompt, type list volume and press Enter. Make note of the drive letter for the volume that you want to create the VHD file on. (See screenshot below)
NOTE: This will allow you to see what the drive letters are for each volume. They are not always the same at boot as they are in Windows.
Name:  list-disk.jpg
Views: 3034
Size:  106.1 KB
6. Do either step 7 or 8 below for what type of VHD file you would like to create.

7. 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.
NOTE: Substitute the C drive letter in the command below for what volume (step 5) you would like to create the VHD on.
 
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 9.
8. 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.
NOTE: Substitute the C drive letter in the command below for what volume (step 5) you would like to create the VHD on.
 
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).
9. In the command prompt, type the command below and press Enter. (See screenshot below)
NOTE: If you subsituted the VHD-Windows7 name in step 7 or 8, then you will need to use it here as well. Substitute the C drive letter in the command below for what volume (step 5) you would like to create the VHD on.
 
Code:
select vdisk file=C:\VHD-Windows7.vhd
Virtual Hard Drive VHD File - Create and Start with at Boot-step4.jpg
9. 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
10. 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
11. Close the command prompt window. (See screenshot above)
A) If you used step 2 above, then click on Next, and go to step 13 below.

B) If you used step 3 above, then continue on to step 12 below.
12. 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
13. Click on the Install now button. (See screenshot below)
Virtual Hard Drive VHD File - Create and Start with at Boot-step8.jpg
14. 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
15. Click on the Custom (advanced) option. (See screenshot below)
Virtual Hard Drive VHD File - Create and Start with at Boot-step10.jpg
16. Select the available option with the unallocated space that is the same maximum VHD size (ex: 40GB = 40960MB) that you specified in step 7 or 8 above, and click on the Next button. (See screenshot below)
NOTE: If you see the Windows cannot be installed to this disk warning, then you can ignore it. Windows 7 will still install on the VHD file.
Virtual Hard Drive VHD File - Create and Start with at Boot-step11.jpg
17. 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.

18. 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.)
There is 56 guides in the database.

More news

Bootstrap
25 February, 2014

Bootstrap

I have implemented bootstrap into the project and changed all code in the administration to use this new framework and I really love the result that I see after a couple of hours of coding. To make things look so good has never been so easy as with
Guides
20 February, 2014

Guides

I have added some of my guides for different things when it comes to the different areas in the computer, I will continue to add guides and especially when it comes to things that I am using every now and then in my own work.
First phase completed
17 February, 2014

First phase completed

Then I had time to finish the dirty work with the page and now it only remains little touches here and there and I need to upload information about what I'm doing and my progress on the project as well.
Time for a change
16 February, 2014

Time for a change

Today I've decided to update my own personal website with the latest version of my project called TQ CMS and with a completely new design that is responsive. My goal with this project is to make it as easy as possible for the end user while

Spotlight

The next step

The next step

I have now resumed my programming after a couple of months of vacation which was very much needed. I got a call one day from a friend that needed a system which can handle peoples reports on various problems like kitchen problems, water problems etc and I decided to make a system for it. Little did I know that it would totally revolutionise my own project and that it would teach me much needed jquery skills to further enhance the CMS. I also