Create and Boot from VHD for Windows 7, “Server 8”, Windows Server 2008 R2

Note: I have no idea what the next version of Windows Server will be called – I am just using “Server 8” as a short version of the Developer Preview of Windows Server from the Build conference – downloadable from MSDN

hard diskIt’s simple enough – people have been asking how to do this for a bit without having to use all sorts of extra tools like WAIK, WIM2VHD or even screwing around with BCEDIT.

Why would you WANT to boot from VHD anyways? It’s a file format supported and included as a mountable file instance since Windows 7.  I use it instead of partitioning my drives when I want to screw around with an OS directly on my hardware without having to reformat all the time. Great for evals, lab setups or custom configs of the OS when you want no barrier to performance on the hardware that comes with virtualization.

What is my configuration? I want Win7 as the main OS on my laptop. But I also need to boot it into “Server 8” to play around as well as demo things in Windows Server 2008 R2 SP1. Result – My C drive is formatted with Win7.  I have carved up my D drive (second physical drive in this laptop) into 2 dynamically expanding VHDs: d:vhdServer8.vhd AND d:vhdW2K8R2sp1.vhd.

How? Simple. After the Windows 7 install, I create the sub directory where I want my VHDs to be created. You will want to make note of the full path including drive letter AND label.  Next I rebooted using my trusty multiboot USB stick and at the first prompt to choose the region – I press SHIFT F10. At the command prompt type in the following:

  • DISKPART
  • LIST VOLUME
    • this displays all the volumes that the OS sees. Remember I asked you to make note of the drive label – booting from USB / DVD will screw with your assigned drive letters and you’ll need the info to ensure you are placing the new VHD in the right spot. In my case it was still D:vhd
  • CREATE VDISK file=d:vhdserver8.vhd type=expandable maximum=100000
    • this creates a dynamically expanding 100gb vhd called server8.vhd.
  • SELECT VDISK file=d:vhdserver8.vhd
  • ATTACH VDISK
    • this now mounts the disk and makes it visible as a drive for the install process.

Use a custom install to be able to select the drive and create a partition in the drive for installation of your new OS of choice.

Proceed as normal and complete the install.

Simple, eh?

About author View all posts

Rick


Warning: sizeof(): Parameter must be an array or an object that implements Countable in D:\home\site\wwwroot\wp-content\plugins\projectnami-blob-cache\project-nami-blob-cache.php on line 416

Fatal error: Uncaught WindowsAzure\Common\ServiceException: Fail: Code: 400 Value: The account being accessed does not support http. details (if any): <?xml version="1.0" encoding="utf-8"?><Error><Code>AccountRequiresHttps</Code><Message>The account being accessed does not support http. RequestId:5462b121-501e-004f-6f80-f50c57000000 Time:2021-01-28T14:15:29.1675849Z</Message><AccountName>ritgcache</AccountName></Error>. in D:\home\site\wwwroot\wp-content\plugins\projectnami-blob-cache\library\WindowsAzure\Common\Internal\Http\HttpClient.php:382 Stack trace: #0 D:\home\site\wwwroot\wp-content\plugins\projectnami-blob-cache\library\WindowsAzure\Common\Internal\Http\HttpClient.php(275): WindowsAzure\Common\Internal\Http\HttpClient::throwIfError(400, 'The account bei...', '\xEF\xBB\xBF<?xml versio...', Array) #1 D:\home\site\wwwroot\wp-content\plugins\projectnami-blob-cache\library\WindowsAzure\Common\Internal\RestProxy.php(141): WindowsAzure\Common\Internal\Http\HttpClient->send(Array, Object(WindowsAzure\Common\Internal\ in D:\home\site\wwwroot\wp-content\plugins\projectnami-blob-cache\library\WindowsAzure\Common\Internal\Http\HttpClient.php on line 382