Powered by System Center
Posts tagged Boot from VHD
Updated June 7, 2012
I have already blogged several times about how to create a Boot from VHD installation for the Developer and Beta versions of Windows 8 and Windows Server 8 Beta.
Now that the Release Preview version of Windows 8 and the Release Candidate version of Windows Server 2012 have been released, it is a good occasion to revisit this very flexible boot method.
My first assumption this time is that you already have a system running PowerShell 3.0 which is the case if your machine runs an earlier version of Windows (Server) 8. This blog you will learn how to configure Native VHD without touching diskpart for preparing the VHD file. In fact we are going to create a VHDX file which is recognized by Windows 8 and Windows Server 2012 machines.
A second assumption is that you have the Hyper-V role installed. This is required because we need the Hyper-V PowerShell module which comes with the Hyper-V role.
To fully understand what is going on, I suggest you first run the classical route and then be surprised by the simplest of deployment methods which has much less requirements [See update and comments Mike Kolitz below) compared to the Classical Route. More on this later on in the blog!
The Classical Route
Let’s start creating a 60GB dynamic VHDX file named ws2012rc.vhdx in a directory we shall name D:\VHDX. A downloaded ISO image file of Windows Server 2012 should be copied to D:\Download.
New-VHD -Path d:\vhdx\ws2012rc.vhdx -Dynamic -SizeBytes 60GB
Once the VHDX file is created, it can be mounted as follows:
Mount-VHD -Path D:\vhdx\ws2012rc.vhdx –verbose
As you can see in the next screen, the newly mounted VHDX has a RAW partition style, so we need to find a way to only initialize the mounted virtual hard disk.
[Update: I have verified this procedure to also work with Windows 8 Consumer Preview]
Back in September I wrote a quick guide explaining how to boot from VHD from Windows 8 Developer Preview. This turned out to be a very popular blog that attracted thousands of viewers.
Today we can expect Windows 8 Consumer Preview and although I have not yet been able to test the procedure with this build, I am pretty confident that the following guide will work as well. As soon as I have the ISO I will proof these steps and change my blog if necessary.
I received a tweet from Jeffery Hicks that many of you want to know how I did the boot from VHD with Windows (Server/Client 8. Here we go!
Instead of one big article, I decided to split the Bare Metal Deployment blog in a number of smaller pieces to reach the final goal: automating the creation of a Hyper-V cluster. If you go back a few articles you’ll see several other blogs about SCVMM 2012. Although only recently in beta, it is a remarkable piece of software with a great number of new and astounding features aimed at creating and managing what we have come to call the private cloud.
Let me first point out that although SCVMM 2012 is well equipped to manage Hyper-V, VMware and XenServer hosts, some features are currently focusing on Hyper-V as its primary citizen. In the current version Bare Metal Deployment and Cluster Creation can only be done with Hyper-V R2. The primary reason for this is the technology used: boot from VHD which is an R2 feature not seen in VMware or XenServer.
In my previous blogs I explained the concept of Run As Accounts/Profiles, Out of Band Management, adding HP iLO2 to OOB and Host Profiles in SCVMM 2012.
In the previous blogs I have explained how to create Run As Accounts & Profiles. I also discussed Out of Band Management and specifically how to Add the HP iLO2 OOB provider to SCVMM 2012. In this blog I focus on another preparatory step before we can start our Bare Metal Deployment and Cluster Creation: Preparing the Host Profile.
The Host Profile is like a combination of the Hardware Profile and OS Profile in SCVMM 2008 R2 but intended for defining the physical server rather than the virtual machine. Again a wizard is available to define such a Host Profile which is relatively straightforward:
- General: Host Profile Name & Description plus location of the VHD file to be used as the base image for the operating system
- Hardware Configuration: Selection of the Management NIC with a choice of DHCP or static IP address; Partition and Disk Configuration and Driver Options (for injection of a specific set of (filter) drivers
- OS Configuration: similar to the OS Profile in SCVMM 2008 R2 describing OS name, Run As Profile, Admin Password, Identity Information, Product Key, Time Zone and Scripts
- Host Settings: for adding the virtual machine placement paths
The preparation of the Host Profile starts off by clicking on the Library wunderbar, expanding Profiles and right-clicking Host Profiles: Create Host Profile.