Today’s installment of our “Build Your Private Cloud in a Month” series is the first of a 5-part mini-series we’re calling “Deploying Private Cloud Workloads”. This week we (Tommy Patterson, Blain Barton and I) are going to detail and demonstrate some of the key areas in System Center 2012 SP1 Virtual Machine Manager that support the foundational concepts and objects in your Private Cloud arsenal:
- Hardware Profiles (Monday) <—Today!
- Guest OS Profiles (Tuesday)
- Application Profiles (Wednesday)
- VM Templates (Thursday)
- Service Templates (Friday)
To follow along, make sure you have installed a test lab with Windows Server 2012 and the Virtual Machine Manager component of System Center 2012 SP1. (Click the links and download the evaluations, please.)
Today’s topic is Hardware Profiles in System Center 2012 SP1 Virtual Machine Manager.
What is a Hardware Profile?
According to TechNet, “..a hardware profile is a library resource containing hardware specifications that can be applied to a new virtual machine or a virtual machine template. A hardware profile can contain specifications for CPU, memory, network adapters, a video adapter, a DVD drive, a floppy drive, COM ports, and the priority given the virtual machine when allocating resources on a virtual machine host.” So, like any template, it’s a starting point. It’s a named definition that represents some desired configuration that can be applied to a new virtual machine or virtual machine template.
Why are Hardware Profiles Useful?
As you’re creating many new virtual machines, you probably have a pretty good idea of what the hardware should look like. Particularly with items like the network adapter or video configuration, you’re likely going to be defining them in a consistent way among many different machines. Doing this once in a named configuration (a profile) and then using it over and over again is certainly much more efficient than having to re-specify those configurations each and every time you build a new virtual machine.
How do I create a Hardware Profile?
Hardware Profiles are found in the Virtual Machine Manager Library section under Profiles.
Create a new Hardware Profile by using the “Create” tool, or by right-clicking Hardware Profiles and selecting Create Hardware Profile.
When you first create it, you’re really only required to give your new Hardware Profile a name.
Other than that, you could just leave the default hardware configuration as it is.
“But what would that be good for?”
Exactly. You’ll want to click on Hardware Profile on the left, and then modify the definitions found there. (NOTE: I’ve collapsed the five sections in the list so that you can see all of them before we dive into each one.)
Notice that at any time we can create new hardware objects such as virtual SCSI adapters, DVD drives, or Network Adapters to include in our profile. And we can also click View Script to view the current contents of the actual PowerShell Script that will be launched to create the hardware profile when we click OK.
Click on and expand Compatibility, and click on Cloud Capability Profiles. I’m going to select HYper-V. (and you should, too)
Cloud Capability Profiles are used to help limit the options when rolling out a new virtual machine. For example, if I say that a machine based on this profile is only meant to run on vSphere, then those hosts are the only ones that have the capability to run this “hardware”. Note that you aren’t limited to just those three. Like Hardware Profiles, you can add your own custom Capability Profiles and use them to specifically allow or limit how or where machines can be deployed. (See Capability Profiles just two up the list from Hardware Profiles?)
Now let’s click on and expand General.
Under General we have options for pre-defining how many virtual processors and how much memory (with startup memory and the range of dynamic memory) this virtual machine requires, plus options for other virtualized hardware. It’s important to remember here that, not only are we defining what machines based on this profile will have, but we’re also helping to determine to which virtualization hosts the machine is able to be created on or later migrated to. For example, if this VM requires 8 virtual CPUs, then I’m not going to be able to run it on a host with only 4 logical processors; and that host won’t be a valid candidate when looking at the intelligent placement results.
In my example, I’m going to say that this machine needs 2 processors, will be able to migrate between different processor versions (my lab laptops are all Intel-based, but have different processors), and I’m going to enable and configure Dynamic Memory. I’m going to leave the other hardware as it is.
Now click on and expand Bus Configuration.
This is where you can add or remove hardware that supports storage devices. By default this profile says that I’ll have a virtual DVD drive in machines based on this profile, but there is no media associated with it. You can add as many as four IDE DVD Drives and four SCSI Adapters by clicking either option above next to “New”. And as this silly screenshot example shows, you can use this to be more specific about the the SCSI adapter type, also. (Remember, this isn’t actually only limiting you to 4 iSCSI disks. Each SCSI adapter can have as many as 64 disks, giving you a maximum of 256 drives!)
You can use this area to pre-define associations with physical DVD drives or mounted .ISO files, but you can’t use this for pre-creating or connecting to hard disks.
For my Hardware Profile I’m going to leave these settings as they are by default.
Now let’s click on and expand Network Adapters.
Here is where you can specify the number of NICs your VMs based on this profile will have. Notice in my example that I have one adapter, and that I’m specifying that these machines will connect to a previously defined “Contoso” network, getting their IP addresses from a static pool of addresses associated with that network.
“Hey Kevin.. What’s a ‘Port Profile’?”
That’s a good question, and is a bit beyond the scope of this article. “A native port profile for virtual network adapters specifies capabilities for those adapters, and makes it possible for you to control how bandwidth is used on the adapters. The capabilities include offload settings and security settings. ” I recommend you look at THIS ARTICLEunder “Native port profile for virtual network adapters” for more details.
Now let’s click on and expand the Advanced area.
The settings under Advanced have to do with various performance and reliability requirements for machines based on this profile. In the screenshot above, you see that not only can I require that this machine only be deployed to clusters (because it must be “highly available”), but I can also give it a priority relative to other VMs on the same host as far as how quickly this machine should restart.
…we have the ability to choose the startup order of virtual bootable devices or methods, plus determine whether or not the all-important Num Lock is enabled.
I was being sarcastic.
Under CPU Priority…
…we can specify relative priority for CPU resources for these machines. So, if the host hardware is being heavily utilized, machines with a higher relative priority will get earlier access to resources than those of a lower priority. And using the choices under Resource Control will further specify a minimum and maximum percent of CPU cycles these machines should have.
Clicking on Virtual NUMA…
…reveals the choice to either allow Hyper-V to optimize (and allow the OS and applications to optimize) thread allocations based on NUMA topology on the hardware, or to be more specific about processors and virtual NUMA nodes for these machines.
Check out this TECHNET MAGAZINE ARTICLE – Virtualization: Optimizing Hyper-V Memory Usage for a good description of NUMA (Non-Uniform Memory Access) and how it is used to improve a virtual machine’s performance.
And finally, when we click on Memory Weight…
…we see that we can further prioritize the memory that these machines will need to run. When memory resources on a virtualization host are running low, this is a good way to help ensure that your most important machines are able to run; even at the potential exclusion of other less important machines.
So that’s it! I click OK, and now you can see my new hardware profile in the list.
Right-Click on the profile, and select Properties…
…you see that there are some additional options that you can configure now that weren’t a part of the original creation of the profile.
I can, for example, see if there are any detected dependencies. For example, if I had decided to attach a library-based .ISO file as disk in the virtual DVD drive, we would have seen it in this list of dependencies.
If we click on Access…
…we can add self-service users or roles here to grant use-rights for this profile.
(For more information about Self-Service Users and Roles, CHECK OUT THIS ARTICLE on Configuring Self-Service in VMM)
And finally, we can click on Validation Errors…
…to see if there are any, um, validation errors. If something in the configuration is not quite right, or something that this profile depended upon has been removed or is otherwise unavailable, you might be able to troubleshoot it by looking here.
And that’s it!
To use my new profile, I’ll create a new virtual machine called Contoso-SQL-01.
Notice that when I get to the Configure Hardware portion of the wizard, I’ve selected my Contoso SQL Server Profile profile from the drop-down selection.
This is where I now have the ability to add and define virtual hard disks to my IDE and SCSI bus adapters, or add additional devices.
In any of these areas I can also change my choices. That’s important. The Hardware Profile is just a starting point, but it doesn’t mean I can’t make individual tweaks and changes for the sake of the virtual machine or the VM template that I’m creating with it.
I complete the wizard, watch the job complete, and presto!..
For More Information
- System Center 2012 SP1 Infrastructure Management
- Virtual Machine Manager
- Virtual Machine Manager Datasheet (PDF download)
- “How to Create a Hardware Profile”
- System Center 2012 SP1 Evaluation