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.
We start off from the Fabric wunderbar in the Virtual Machine Manager 2012 Console and then choose Add Resources from the Ribbon. As you can see all three major hypervisors are selectable. SCVMM 2012 supports Hyper-V RTM, Hyper-V R2, Hyper-V R2 SP1, ESX 3.x, ESX 4.1 and XenServer. Virtual Server is no longer supported so you are advised to migrate those servers to Hyper-V with the current version of Virtual Machine Manager (2008 R2 SP1).
An important requirement for Bare Metal Deployment is PXE (Pre-boot Execution Environment). In the past I have worked with Altiris Deployment Server or specialized versions of Altiris such as HP’s Rapid Deployment Pack which were equipped with their own PXE server. Like Operating System Deployment (OSD) in System Center Configuration Manager, SCVMM 2012 requires Windows Deployment Server (WDS) installed somewhere in your infrastructure (Windows Server 2008 R2 only). If setting up a WDS server is new to you the following TechNet chapter will guide you: http://go.microsoft.com/fwlink/?LinkId=203272. While adding the Windows Deployment Services role to an R2 server you should install both the Deployment Server and Transport Server Role Services.
Adding the PXE Server to SCVMM 2012
This can be accomplished from the same Add Resources button on the Ribbon as shown in the picture above. For Bare Metal Deployment purposes, you don’t have to add any images to the PXE Server because a VHD file is used that is located in the SCVMM 2012 Library. If there is no VMM Agent on the WDS server it will install one for you. After a while you’ll see that the machine account for the WDS server is added to VMM and its agent status should say responding.
Preparations for Bare Metal Deployment
Let’s assume you have compiled a list of IP addresses of the BMC (iLOs) and MAC addresses for the NIC that will boot from PXE. This type of work is really easy if you can work with an HP BladeSystem or equivalent server infrastructure. The configuration of iLO is part of the basic configuration and offers you all the information that is required in a very presentable fashion.
The Device Bay Summary will show all iLO IP addresses.
And the primary NIC with corresponding MAC address can be found in the Port Mapping overview per server blade.
Starting the Bare Metal Deployment
With all the details in front of us, we can now start the Bare Metal Deployment by running the following steps:
Change context to Fabric and select Servers
Click on Add Resources from the Ribbon
Select Hyper-V Servers and Clusters
Choose Physical computer to be provisioned into Hyper-V hosts
Select the correct Run As Account (see previous blogs)
Because in this example an HP BladeSystem infrastructure and the HP iLO 2 Out of Band management protocol has been added earlier (see previous blogs), it is possible to select HP Integrated Lights-Out (iLO 2). Click Next to continue
Select an IP subnet (including offset) or select an IP range where the iLOs can be reached. Click Next.
Select all the servers that you want to be used in this deployment of Hyper-V servers and click Next
If you have multiple host groups defined, choose the correct one
Select the Host Profile and click Next
All input that is required is the computer name of the new Hyper-V host and the MAC address that will be used for PXE boot.
Please note that also a logical network can be set. The new Hyper-V host will automatically receive a static IP address which is going to be checked out of the IP Address pool connected to the logical network.
If you fail to enter any of these two fields the following message pops up
As a final step a summary is given for all choices. Click Finish to kick off the deployment
A popular feature in SCVMM is the View Script button which will compile a PowerShell script for this Bare Metal Deployment job. If you add some Q&A in this script and change the constants to variables, this could make you job a lot easier the next time you have to roll out a bunch of Hyper-V servers.
Meanwhile the job has started and can be monitored under Jobs
If the server has never been installed before, it will automatically boot from the network adapter. If it doesn’t check the BIOS settings. Again HP BladeSystem Onboard Administrator makes controlling the bare metal very convenient. Just select the blade’s boot options and force it to temporarily boot from PXE NIC.
It is best to start with a switched off server as the SCVMM job will switch on the server by means of OOB.
The rest is just a matter of drinking coffee ….
Boots from PXE server, receives IP address from DHCP server and boots into WinPE.
Wpeinit is a command-line tool that initializes Windows PE each time it boots. When Windows PE starts, Winpeshl.exe executes Startnet.cmd, which launches Wpeinit. Wpinit is responsible for installing PnP devices, processes Unattend.xml settings and loads network resources.
The new server is registered in the database
The physical disk is configured (partitioned and formatted) according to the host profile configured in an earlier step.
When the disk is prepared, a VHD disk with a Sysprepped image of Windows Server 2008 R2 is transferred from the SCVMM 2012 Library to the bare metal server’s boot disk.
All steps can be followed in detail so you can see where you are within the deployment process.
In this step the boot configuration is set so that the server will boot from VHD.
Customizations are run
The Hyper-V role is enabled
And as a well brought up System Center family member is supposed to do: Cleaning up
As you can see all steps have been completed successfully. From start to finish it took just over 20 minutes to install the bare metal. You could have finished an entire enclosure of 16 blades within half an hour.
Just to check that the operating system is working
And that the Hyper-V host is registered in SCVMM 2012 in the correct Host Group
And if you are curious … here is the the boot configuration as shown by the bcdedit /v command. As you can see Windows Server 2008 R2 or Hyper-V Server now boots from a VHD.
Now that this mission is completed and we have several Hyper-V servers, in the next blog I will look at how to create a cluster from this, all from SCVMM 2012.
Update April 24, 2011
Greg Crusanza, Program Manager from the SCVMM product group, published a great troubleshooting workflow to help you identify problems with deployment: