Friday, April 3, 2020

Using a virtual hard disk to boot computer.

Booting from Virtual hard Disk image Natively in windows.

There are many types of virtualization software. But what we are referring here is the OS virtualization. These include

  • Virtual Box - The open source solution from Oracle Inc. (uses VDI image)
  • VMware Workstation player - Virtualization software from  VMware, Inc. This is the free version. for more advanced version see VMware Workstation Pro (uses VMDK image)
  • Microsoft Hyper-V - virtualization software built into 64 bit Windows 8 and above. (uses VHD and VHDX image)
  • Microsoft Virtual PC - virtualization software for 32 bit windows. (uses VHD image)

When using a virtualization software such as Virtual Box, there comes a situation many times that we want to boot our computer natively from virtual hard disk.
             Currently we will see how we can boot windows from VHDX image. Other images I will discuss in next post.
First of all we need a VHDX image with windows preinstalled. Installation will be discussed in another post.

Attach a VHD or VHDX to Disk Management.
Open Disk Management, and select Action > Create VHD. Browse to the location where you want have saved the VHD or VHDX file.






After that a new Disk will be shown in Disk Management with a new Drive Letter. Note this Drive letter.
Now we have to add this Disk to windows BCD store (database used to boot windows / just as GRUB in Linux).
open an elevated Command Prompt window. Enter the following command:

  • bcdboot W:\Windows
  • bcdedit /set {default} description "W10 PRO (VHD)"

where "W" is the drive letter noted in previous step.


In this case, the Windows OS on the VHD image is the default OS in the boot menu. When a multiboot PC starts up, the boot menu appears, and the default OS automatically boots if the user does not make a selection within a specific time limit -- the default limit is 30 seconds.

Now Restart the PC and All Done.
Enjoy Your Newly installed Os from virtual Hard Disk image..

No comments:

Post a Comment