VHD Native Boot: Part 2 – Windows 8.1 & 10
In part one of this series we talked about booting a Windows 7 VHD and how to do it. In this part, we will talk about how to do it with Windows 8.1 and Windows 10. The real difference is that with Windows 7, we booted using legacy BIOS. In this part, we will boot a UEFI-based computer. The process is similar, but there are some differences that I wanted to talk about.
The requirements are the same as they were in part one, expect for the fact we will be doing UEFI instead of BIOS. Windows 8.1 and Windows 10 can boot using BIOS, as long as your base image was created on that type of hardware.
You will still create your base image using a VM or physical machine. If you are using VMware to create your base, make sure to select EFI on the firmware page. If you are using Hyper-V, make sure that it is a generation two virtual machine. If you are using a physical machine, be sure to set it to UEFI in the BIOS before installing Windows.
With UEFI-based machines, you can use the VHDX file format instead of VHD. This format allows for larger volumes (up to 64TB), as well as other performance-based improvements.
The rest of the process is the same as stated in part one. If you use Hyper-V, you can sysprep the VM and then copy the VHD to your other machines. If you take a checkpoint of your VM, you may have to merge the disks back together. Take a backup before doing this. To merge disks, open Hyper-V manager and select Edit Disk in the right column.
Browse to the AVHDX file (the checkpoint file) and click OK. Select “Merge”:
Then, press OK, keep “To the parent virtual hard disk” selected and click Finish.
If you are using VMware or a physical machine, you will need to capture a WIM and then apply the WIM to a VHD using the directions in part one.
Once you have your VHD, copy it to a USB drive or to a network share.
Now we will apply the VHD to our machine. Remember, this will wipe the current drive.
Boot to WinPE (for instructions, see part one). If the USB drive is recognized, it may be because the drive is formatted for BIOS and UEFI. Once booted to WinPE, we need to launch diskpart and format the drive. Use these commands:
select disk 0
create partition efi size=100
format quick fs=fat32
create partition msr size=128
create partition primary
format quick fs=ntfs
Now we need to copy our VHDX to the computer. If you are using a network drive, you should use the net use command to map the drive first. If you are using a USB device, you can ignore line one of these commands. Be sure to input the proper path in the copy command:
net use z:\ \\server01\share01 /user:contoso\user1
copy z:\win10.vhdx c:
Now we need to launch diskpart again and mount the VHD. For the list volume line, you must locate the volume number of your mounted VHDX.
select vdisk file=c:\win10.vhdx
select volume <VHDX volume number>
Finally, we need to copy the boot files to our system partition:
bcdboot v:\windows /s s: /f UEFI
Now you should be able to reboot your computer and boot into your VHD. It will run through the OOBE the first boot.
All content provided on this blog is for information purposes only. Windows Management Experts, Inc makes no representation as to accuracy or completeness of any information on this site. Windows Management Experts, Inc will not be liable for any errors or omission in this information nor for the availability of this information. It is highly recommended that you consult one of our technical consultants, should you need any further assistance.