Natively boot Windows with a virtual HDD
A few days ago Microsoft released a new build for Windows 10 and I wanted to give it a try. However, I didn’t want to resize my partitions or overwrite my Windows 8.1 partition.
Well, then install it in a VM!
Then I wouldn’t have access to all of my RAM and CPU, so that wasn’t a solution either. However, I found the ideal solution.
Apparently you can install Windows in a virtual hard drive. Let me guide you through:
- Create a new VHD-file and remember the path to it. You can use Disk Management (run
diskmgmt.msc) and click Action and Create VHD. I made it about 70 GB big with a dynamic size.
- Boot into the Windows installation (use Rufus or something similar to create a bootable USB stick).
- Select Custom: Install Windows only (Advanced), not an Upgrade.
- Now you have to select the partition on which you want to install Windows. Press SHIFT+F10 to open a command prompt instead.
diskpartto open the DiskPart utility.
- In DiskPart enter
select vdisk file=C:\Windows10.vhdwith the correct path to your VHD to select the VHD.
- Now enter
attach vdiskand close the command prompt.
- If you now press Refresh you will see unallocated space on a newly added disk station, that is your virtual hard drive. Select it.
- You can now continue installing Windows as usual.
I was surprised to find out about this possibility. This way you can try the new Windows in full without compromising your production environment.
About the author
Sam is a C# developer who builds mobile (cross platform) apps with Xamarin. Sam is a certified Xamarin mobile developer since 2016. He likes to experiment with all kinds of programming languages and software frameworks. More info