All fiery Monday, colleagues and enthusiasts!
Today, April 29, Monday - just a little is left before the holidays - and why not add a little bit of knowledge to a long-awaited vacation (well, in light format - without hard and abstruse moral teachings). This time I would like to talk a little bit about how the Bare-Metal function of deploying hypervisors to servers is arranged - or, in other words, how to ensure the automation of the elasticity of your private cloud based on
System Center 2012 SP1 .

')
In more detail under the cut.
Something about the cloud, about elasticity
Before you tell in detail and in detail about the process of "bare-iron deployment", it is worth paying a little attention to that characteristic, the particular cloud model that this process covers.
Let's recall the main characteristics of the cloud model according to NIST (National Institute of Standards and Technology). In order not to make me sad, I will list all the main distinguishing features of the cloud from the traditional IT consumption model.

1)
Measurable services . It is understood that any service that is provided through the cloud must be measurable, which ultimately leads to the fact that the service has a cost - as a result, measurability serves as a tool for billing IT services.
2)
Instant elasticity . This component implies that the cloud, regardless of the level of the service model (IaaS, PaaS or SaaS), must be capable of an instant (relative to the moment) increase or decrease in the volume of its resources. It is about the increase in resources in terms of elasticity, today we will talk with you in the context of SCVMM 2012 SP1. After all, automating the process of deploying hypervisors and including them in host groups and the cloud is nothing but ensuring elasticity in the direction of increasing resources.
3)
Resource pool . A very important feature of the cloud is the abstraction from physical hosts, as resources, to the level of their computing power. In other words, now for receiving a service or a service, you do not take into account the number of servers, but the volume of their resources, which are grouped into categories — CPU, RAM, Disk resources and data networks — all the main objects of virtualization that we have long known.
4)
Broadband access . The thing is quite natural, since we are talking about a “very client-server”, or even more correct to say service-oriented architecture (SOA) - then the load and requirements for the data transmission channel greatly increase - and this is true for the provider (he needs to ensure a lot of high-quality connections), and from the client (the volume of traffic for exchange increases greatly with this model).
5)
Self-service on demand . This postulate implies the availability of a tool for either an automated or fully automatic process of providing a service or service to an end user. Typically, this tool is a web portal that serves as an interface between the end user and the orchestration processes (workflow automation) involved in the provision and deployment of a particular service or service.
Bare-Metal or Golozhelezyak
Now that we have remembered the main characteristics of the cloud, we also understood what place in the cloud characteristics is the BMD process (Bare-Metal Deployment), it's time to consider it in more detail.
What is possible and what is not?
Before
analyzing the process of deploying a hypervisor on bare metal,
it would be hard for you to become familiar with the requirements for this process .
In short, we need servers with a BMC controller (for example,
iLO ,
iDRAC ,
SMASH ,
IPMI , etc.), as well as credentials for accessing the server through this controller itself.
A PXE server based on Windows Server 2008 R2 or
Windows Server 2012 will also be far from superfluous, but a necessary component.
Also, we will really need the installed WAIK package - Windows Automation and Installation Toolkit.
We also need a generalized image of the hypervisor (Windows Server 2008 R2 or Windows Server 2012 - Hyper-V Server is also suitable) in the format of a virtual hard disk VHD.
You should not forget that you have to enable the virtualization functions on the processors of your server, activate the BMC controller and know its access credentials, and also configure the server to boot via the network using PXE.
If you look at the process consistently, the picture will be like this.
1) The VMM server requires a WAIK component with the prepared WInPE image.
2) Next, we, as I said, need a deployed WDS server (Windows Deployment Services).
3) We also need a DHCP server to issue IP addresses.
4) Next, you need to add our above-mentioned WDS server to the VMM server using the wizard (Add Resources -> PXE Server Wizard).
5) Next, VMM will install its agent on the WDS server.
6) Next, the folder% WDS_Image_Source% \ RemoteInstall will be created on the WDS server (i.e., in the directory where your images are stored on the WDS server, the RemoteInstall subdirectory will be created for service purposes).
7) Further, the customized WInPE image from the VMM server is published on the WDS server (the publishing process is the implementation of the VMM agent image and security certificate).
At this point in time, we have reviewed the configuration process with you.
Process itself
1) Reboot via OOB (Out-of-Band Management). Here, the VMM server uses its native communication capabilities with external BMC controllers of servers — specifically, it sends a signal to restart the server.
2) Next, the target server is loaded via PXE and wants to download from our WDS server.
3) Before allowing the target server through PXE, the WDS server authorizes the download in the VMM server.
4) After that, the target server receives a customized WinPE image from the WDS server.
5) After that, the target server runs scripts to execute general-purpose commands (GCE-scripts - General Command Execution). This moment is very important, as it includes updating your server’s firmware in automatic mode, managing your server’s RAID controller to create hard disk partitions and so on. All these parameters are set in the host profile in the VMM server.
6) Next, the VHD-image is loaded with the necessary hypervisor from the VMM library.
7) After the drivers necessary for a specific model of equipment are added.
8) Next comes the process of installing the server, setting it up and including it in the domain.
9) Install the VMM agent and enable the Hyper-V role.
10) Execution of additional post-installation scripts. Examples of such scripts are mechanisms for integrating network adapters into aggregates, setting up iSCSI connections. Such examples can serve any commands for remote execution.
I mentioned these words, host profiles or host profiles, as well as a VHD disk, which is required for deployment.
Let's take a closer look at how to set up a host profile and link it to a VHD disk.
1) To start in VMM, go to the
Library section
-> Profiles -> Host Profiles -> right click and Create Host profile .
2) Enter the profile name.

3) Select the required VHD image with the Hyper-V hypervisor of the required version (by the way, for deployment on bare hardware, VMM can only boast of Hyper-V support — it cannot deploy other hypervisors).

4) In the hardware configuration area, go to the Driver filtering item and specify the driver label for your servers.

5) In the OS settings tab, enter all the necessary information.

6) In the settings field of the host, you can not touch anything and press the Next key and on the Summary tab - press the Fininsh key to complete the process of creating a host profile.

Now let's look at the process of deploying a host to a piece of hardware in this case on a Dell R710.
1) First go to the menu
Fabric -> Home -> Add Resources -> Hyper-V Hosts and Clusters .

2) At the resource location, select
“Physical computer to be provisioned into Hyper-V” and click Next.

3) Next, enter the data to get the administrative level of access to your BMC-controller (I recommend even creating a “Run As” account in order not to do it all the time - I’m talking about the production environment).

In this case, I choose the
IPMI protocol.

4) In the Discovery Scope, enter the
IP address configured on the BMC controller .

5) On Target Resources (Target Resources) VMM should say “server detected!”

6) After this, in the deployment options (Deployment Options) specify the name that you entered or you have it set for the BMC adapter.
7) After that, check all the data for validity and click Finish in order to begin the server deployment process - you can go and drink coffee!
Small total
So, colleagues, we have examined how the Hyper-V Hyper-V automatic deployment function works on bare metal using SC VMM tools and Windows Server components. We also discussed what important task from the point of view of the cloud model of providing and consuming services is solved by this mechanism. It remains to be hoped that in future versions, side hypervisors will also be flooded with iron - this is in case of heterogeneous scenarios. But, impossible things do not happen - today you can solve this problem with the help of System Center Configuration Manager, but that's another story ...
Respectfully,
fireman
George A. Gadzhiev
Information Infrastructure Expert
Microsoft Corporation.