Windows 8 VHD - Create at Boot to Dual Boot with

How to Create a Windows 8 VHD at Boot to Dual Boot with Windows 7 or Vista


information   Information
This will show you how to create a Windows 8 VHD file at boot and be able to natively dual boot with your current Windows 7 or Vista installation with the created Windows 8 VHD.

Note   Note
Some Advantages of Using a VHD to Dual Boot with:

Using a VHD to dual boot with will act just as if the operating system was installed directly to a partition when ran at startup, but you will not have to have the VHD on a separate HDD or partition to do so like you would if you installed the OS. You could run the VHD as a dual boot say directly from within your Vista or Windows 7 partition. I think the biggest advantage of this would be for those that have a OEM computer where the OEM had setup 4 primary partitions on the HDD where you cannot create a new partition on the HDD to be able to install a second OS. Using this VHD method, they will be able to.

You will also be able to attach the VHD say in Windows 7 as a virtual drive, use the VHD as a virtual machine, is a lot easier to remove from a multi-boot installation, and a VHD will not mess with any of your current partitions or drives.

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: "Choose an operating system" Screen at Boot
NOTE: This is what you will see now at boot or restart instead of the Windows 7 Windows Boot Manager screen to be able to select to start either Windows 7 or the Windows 8 from the VHD file.

Example.jpg







OPTION ONE

To Create and Add the Windows 8 VHD to Boot From


1. If you would like to create a backup of your Boot Configuration Data (BCD) to be safe, then from within your Windows 7 or Vista, open an elevated command prompt, type the command below, and press Enter. This will save your BCD backup as the MyBCDBackup.bak file in the C:\Windows\System32 folder.​
bcdedit /export MyBCDBackup.bak
2. Boot or restart the computer from your Windows 8 Pro or Enterprise installation DVD or USB thumb drive.​
NOTE: To have Windows 7 on VHD, see instead: How to Create a Windows 7 VHD at Boot to Start with from Boot
3. At the Install Windows 8 screen, press the Shift + F10 keys to open a command prompt. (see screenshot below)​
WARNING: If you are using a language other than English, then see this post first.​
Step1.jpg
4. In the command prompt, type diskpart and press Enter, then type list volume and press Enter. Make note of the drive letter for the volume that you want to create the Windows 8 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.​
Step2.jpg
5. Do either step 6 or 7 below for what type (fixed or dynamic expanding) of VHD file you would like to create.​
6. To Create a Fixed VHD File
NOTE: A fixed VHD file will allocate the entire maximum size that you set (ex: 30GB) below on the HDD to be used by the VHD file. The VHD will only use a fixed amount of space (ex: 30GB) regardless of the amount of data stored on it.
A) In the command prompt, type the command below, press Enter, and go to step 8 below.​
NOTE: Substitute the D drive letter in the command below for what volume (step 3) you would like to create the VHD on. You can substitute the Windows8 name with any name you would like within quotes for the VHD file instead. You can also substitute the maximum size of 30720 MB for the VHD to the maximum size you want instead in MB (1GB = 1024MB).​
create vdisk file="D:\Windows8.vhd" maximum=30720
Step3A.jpg
Step3B.jpg

7. To Create an Dynamically Expanding VHD File
NOTE: A dynamically expanding VHD file will only be as large on the HDD as the amount of data that is saved in the VHD file, but is able to get as large as the maximium size that you set below (ex: 30GB). The HDD space used by the VHD does not shrink (compact) automatically when data is deleted in the VHD though.
A) In the command prompt, type the command below, press Enter, and go to step 8 below.​
NOTE: Substitute the D drive letter in the command below for what volume (step 3) you would like to create the VHD on. You can substitute the Windows8 name with any name you would like within quotes for the VHD file instead. You can also substitute the maximum size of 30720 MB for the VHD to the maximum size you want instead in MB (1GB = 1024MB).​
create vdisk file="D:\Windows8.vhd" maximum=30720 type=expandable
8. In the command prompt, type the command below and press Enter. (see screenshot below)​
NOTE: Substitute the D drive letter and Windows8 VHD file name in the command below to the same one that you used in step 5 or 6 above.​
select vdisk file="D:\Windows8.vhd"
Step4.jpg
9. In the command prompt, type attach vdisk and press Enter. (see screenshot below)​
Step5.jpg
10. In the command prompt, type exit and press Enter, then close the command prompt window. (see screenshot below)​
Step6.jpg
11. You can now finish doing a clean install of Windows 8, and select the unallocated space (ex: 30GB) that you created in step 6 or 7 above. (see screenshot below)​
Step9.jpg
12. When finished, you will be in Windows 8 with Windows 8 set as the default OS to start automatically after the wait time. Restarting Windows 8 will allow you to be able to select what OS you would like to start with like in the example at the top of the tutorial.​








OPTION TWO

To Remove the Windows 8 VHD from Boot


NOTE: This option will remove Windows 8, and leave you with only Windows 7 or Vista as an option to start.
1. Start or restart your PC, and boot into Windows 7 or Vista instead of Windows 8. (see screenshot below)​
delete-1.jpg
2. In Windows Explorer, navigate to the location of the Windows 8 VHD file that you created in step 6 or 7 in OPTION ONE above, then either delete or rename the VHD file.​
3. If you used step 1 in OPTION ONE and would like to restore your BCD back to how it was when the backup was created to be safe, then open an elevated command prompt, type the command below, and press Enter.​
bcdedit /import MyBCDBackup.bak
4. Restart the computer, and you will no longer have Windows 8.​




That's it,
Shawn




 

Attachments

  • Virtual_Machines.png
    Virtual_Machines.png
    13.3 KB · Views: 407
Last edited by a moderator:
Brink, there is an another way to install the OS on the VHD, without shutting down the primary OS and it doesn't even need a installation media. Just mount the iso, download imagex.exe from Google, then use the apply command in imagex.
 

My Computer

System One

  • OS
    Windows 8.1 Pro with Media Center x64
    Computer type
    Laptop
    System Manufacturer/Model
    Self Built
    CPU
    Intel Core i7-5820K Haswell-E 6Core 3.3Ghz
    Motherboard
    ASUS P8B75-M LGA 1115
    Memory
    16GB DDR3
    Graphics Card(s)
    Sapphire Radeon VAPOR-X R9
    Sound Card
    SoundBlaster Z
    Monitor(s) Displays
    HP Pavillon 27xi
    Screen Resolution
    1920x1080
    Hard Drives
    Seagate 3TB Desktop HDD SATA 6Gb/s 64MB Cache 3.5-Inch Internal Bare Drive (ST3000DM001)
    PSU
    EVGA 500W 80PLUS Certified ATX12V/EPS12V Power Supply 100-W1-0500-KR
    Case
    Sentey Bx1-4237 Plus Gaming
    Keyboard
    Logitech Wireless Keyboard K360
    Mouse
    Logitech Wireless Mouse M325 with Designed-For-Web Scrolling
    Internet Speed
    10MB/ps Download , 2MB/ps Upload
    Browser
    Google Chrome, IE 11
    Antivirus
    Windows Defender
Back
Top