Tag: Windows Server 2008 R2

Cisco UCS C200 M2 – Microsoft Hyper-V

Cisco UCS C200 M2 Hardware

For my Lab I could buy some Cisco UCS C200 M2 rack servers. Of course I am running Hyper-V on my lab servers to get the most out of it, and I am very happy with the performance of the Cisco UCS standalone servers.

C200 BIOS Settings

 

But still I did some changes in the BIOS settings to get some more performance.

Processor Configuration:

  • Intel Turbo Boost Technology: enabled
  • Enhanced Intel Speedstep Technology: enabled
  • Intel Hyper-Threading Technology: enabled
  • Number of Enabled Cores: All
  • Execute Disable: Enabled
  • Intel Virtualization Technology: enabled
  • Intel VT for Directed IO: enabled
  • Intel VT-d Interrupt Remapping: enabled
  • Intel VT-D Coherency Support: enabled
  • Intel VT-d Address Translation Services: enabled
  • Intel VT-d PassThrough DMA: enabled
  • Direct Cache Access: enabled
  • Processor C3 Report: disabled
  • Processor C6 Report: disabled
  • CPU Performance: High Throughput
  • Hardware Prefetcher: enabled

Memory Configuration:

  • NUMA Optimized: enabled


Windows Server 2012 NIC Naming

Windows Server 2012 RC Logo

Some weeks ago I wrote a blog post how you can configure Network Adapters on a Hyper-V host via PowerShell. I mentioned that the NICs in Windows Server 2008 R2 are always named differently. Now I have some great news in Windows Server 2012 Release Candidate this has changed.

Windows Server 2012 NICs Server Manager

Some hours ago I installed one of my Cisco UCS C200 servers with the Windows Server 2012 Release Candidate. And I realized the new naming of the network adapters.

Windows Server 2012 NICs

Now I run my Get-NICInformation.ps1 PowerShell script to get some more information about this.

Windows Server 2012 NICs PCI Slot order

It looks like the new naming is done by PCI slot order because I don’t think Cisco supports Consistent Device Naming yet. Anyway this is great news for all the Hyper-V guys out there.

If you wonder, the order in my case is Ethernet 1 Port 1 to Port 4 are the 4 Quadport Intel NIC and Ethernet 2 Port 1 and Port 2 are the build-in ports.

Two more things, first the PowerShell script which I used to configure the network adapters from a XML file stills works fine. To check this and make the screenshots for this blog post I had to install my Hyper-V Hosts twice, so please share this post ;-)

 



System Center 2012 Unified Installer – Step by Step – Part 2

Microsoft System Center Logo

In my first post about the System Center 2012 Unified Installer I wrote about the prerequisites you need, to do a System Center 2012 deployment with the Unified Installer. In the second part I will write how you have to prepare the Installer and the Target servers.

It’s still important: Neither the System Center Unified Installer nor this guide is made to deploy the System Center Suite in production. It is only for lab or demo environments.

In my case I created two OUs to deploy my small lab. One for the Installer Computer and one for all the System Center servers. And I created some GPOs to save some time.

SC2012 InstallerSC2012 ServersSC2012 Servers GPO

 

Preparing the Installer Computer for System Center 2012 – Unified Installer

  1. First I installed a Server with Windows Server 2008 R2 SP1 as the installer Computer and installed all the patches which came with Windows Updates.
  2. Now you have to do some configuration of WinRM. You can do this via Group Policy or CMD commands.
    Computer Configuration / Administrative Templates / System / Credential Delegation / Allow Delegating Fresh Credentials (Enabled with the value: “WSMAN/*” and Concatenate OS defaults with input above selected)
    Computer Configuration / Administrative Templates / System / Credential Delegation / Allow Delegating Fresh Credentials with NTLM-only Server Authentication (Enabled with the value: “WSMAN/*” and Concatenate OS defaults with input above selected)
    Computer Configuration / Administrative Templates / Windows Components / Windows Remote Management (WRM) / WinRm Client / Allow CredSSP authentication (Enabled)
    Computer Configuration / Administrative Templates / Windows Components / Windows Remote Management (WRM) / WinRm Client / Trusted Hosts (Enabled with a * in the TrustedHostsList option)
    SC2012 Installer GPO
  3. You could also run the following comands
    winrm set winrm/config/client/auth @{CredSSP="True"}
    winrm set winrm/config/client @{TrustedHosts="*"}
    winrm qc
  4. Now you you have to open some Firewall ports, you can do this also via Group Policy or in the local Windows Firewall settings.
    Create a new Inbound role for the following ports:
    TCP 81
    TCP 1433
    UDP 1434
    ICMP v4
    Because it is a demo or lab Environment you could also disable the Firewall

On the User’s Guide for System Center 2012 – Unified Installer you can get more Information how you can prepare the Installer Computer.

Preparing a Target Servers for System Center 2012 Components

  1. First I installed a Server with Windows Server 2008 R2 SP1 as the installer Computer and installed all the patches which came with Windows Updates.
  2. Like for the Installer Computer we also have to create some GPOs for the Target Servers.
    Computer Configuration / Administrative Templates / Windows Components / Windows Remote Management (WinRM) / WinRM Service / Allow automatic configuration of listeners (Enabled and the for the values of IPv4 filter and IPv6 filter type *)
    Computer Configuration / Administrative Templates / Windows Components / Windows Remote Management (WinRM) / WinRM Service / Allow CredSSP authentication (Enabled)
    Computer Configuration / Administrative Templates / Windows Components / Windows Remote Shell / Allow Remote Shell Access (Enabled)
    Computer Configuration / Administrative Templates / Windows Components / Windows Remote Shell / Specify maximum amount of memory in MB per Shell (Enabled and set MaxMemoryPerShellMB to 2048)
    SC2012 SC Servers GPOYou could also run the following commands on the target servers.

    winrm qc -q
    winrm set winrm/config/service/auth @{CredSSP="True"}
    winrm set winrm/config/winrs @{AllowRemoteShellAccess="True"}
    winrm set winrm/config/winrs @{MaxMemoryPerShellMB="2048"}

Create Installer User and Service Users

SC2012 Service Accounts

 

I also created a Service Users for every System Center product, you could also just use the same user account for all products.

  • svc-sc2012-scvmm
  • svc-sc2012-scac
  • svc-sc2012-sco
  • svc-sc2012-scom
  • svc-sc2012-sccm
  • svc-sc2012-scsm
  • svc-sc2012-scdpm

SC2012 Installer Account

 

And I created a Installer User which has local Administrator rights on every machine. You also have to login to your Installer Computer and run the System Center Unified Installer with this account.

  • sc2012-installer

This was the last preperation post, in the next post the “Fun” Begins and we can fire up the System Center 2012 – Unified Installer



Configure Hyper-V Host Network Adapters Like A Boss

Hyper-V R2 SP1

If you are working a lot with Hyper-V and Hyper-V Clustering you know that something that takes a lot of time is configure the Hyper-V Host Network Adapters. First because most of the time you have a lot of NICs build into your host for the different Hyper-V and Cluster networks and secondly Windows names the NICs in a random way and this makes it hard to find out which network card is the right one. Maybe your first NIC on your Hyper-V Host01 is called “Local Area Connection 2” and on your second Hyper-V Host with the same hardware configuration the “same” NIC is called “Local Area Connection 3”. One of the possibilities to find out which network card is the right one is to check the MAC address of the network adapter. But for this you still have to know which MAC address is on which network adapter port.

Another way to do it is to plug in the network cables one by one. So you can see which port is active and then you can rename the network adapter. Now some times this one is one of the only solutions, but it takes a lot of time to do this on every host. And if you build Clusters up to 16 Hosts you really don’t want to do that.

Now there is a solution, you can sort your NICs by PCI bus and PCI slot. Maarten Wijsman did a blog post how you can do this on the Hyper-V.nu blog. With this knowledge you can start to automate this very easy.

networkcable

I have created two Windows PowerShell scripts which make my life a lot easier.

First I configured the first Hyper-V host and renamed all the Network adapters. If you have a GUI server you could do that via GUI or if you have a Windows Server Core or Hyper-V Server you can do this via netsh.

netsh interface set interface "Local Area Connection 2" newname="Management"

If I have done that I use my  Windows PowerShell script called Get-NICInformation.ps1 to get the information about the network adapters.

get-nicinformation

This gives me a lot of information about the NICs in my first hosts. But the important part is the order of the NICs. In my example I know that the order is this:

  • Management
  • VMNet
  • CSV
  • LiveMigration
  • iSCSI01
  • iSCSI02

Since my other hosts have the same hardware they will have the same PCI Bus order.

# ---------------------------------------------------------------------------------------------- #
# Powershell Get-NICInformation $Rev: 748 $
# (c) 2011 Thomas Maurer. All rights reserved.
# created by Thomas Maurer
# www.thomasmaurer.ch
# www.itnetx.ch
# last Update by $Author: tmaurer $ on $Date: 2012-02-24 14:07:36 +0100 (Fr, 24 Feb 2012) $
# ---------------------------------------------------------------------------------------------- #
 
#region [INFO BLOCK]
# INFO
Write-Host " " -BackgroundColor Black -ForegroundColor White
Write-Host " PowerShell Get-NICInformation " -BackgroundColor Black -ForegroundColor White
Write-Host " " -BackgroundColor Black -ForegroundColor White
Write-Host " by Thomas Maurer " -BackgroundColor Black -ForegroundColor White
Write-Host " www.thomasmaurer.ch " -BackgroundColor Black -ForegroundColor White
Write-Host " " -BackgroundColor Black -ForegroundColor White
#endregion
 
$adapters = Get-WMIObject Win32_PNPSignedDriver | Where-Object { $_.DeviceClass -eq “NET” -and $_.HardWareID -like*PCI*} | Sort-Object location
 
foreach ($adapter in $adapters ) {
 
$adapterName = Get-WMIObject Win32_NetworkAdapter | Where-Object { $_.PNPDeviceID -eq $adapter.DeviceID }
$adapterConfiguration = Get-WmiObject Win32_NetworkAdapterConfiguration | Where-Object { $_.index -eq $adapterName.Index }
 
Write-Host ‘Adapter Name :’ $adapterName.NetConnectionID
Write-Host ‘PCI BUS :’ $adapter.Location
Write-Host ‘MAC Address :’ $adapterName.MACAddress
Write-Host ‘GUID :’ $adapterName.GUID
Write-Host ‘Adpater Index :’ $adapterName.Index
Write-Host ‘Hardwarename :’ $adapterName.Name
Write-Host ‘DHCP enabled :’ $adapterConfiguration.DHCPEnabled
Write-Host ‘IP Address :’ $adapterConfiguration.IPAddress
Write-Host ‘Subent :’ $adapterConfiguration.IPSubnet
Write-Host ‘Default Gateway :’ $adapterConfiguration.DefaultIPGateway
Write-Host
 
}

For the next step I go to my second host. There I have my other Windows PowerShell script (Set-IPAddressfromXML) and a XML file (networkconfig.xml).

dir

I edit the networkconfig.xml file with the correct network information. Important here are the id=”” parameters. They are showing the order of the NICs so with Get-NICInformation I can see the Management interface is the first one, so it gets id=”1″, VMNET is the second one it gets id=”2″ and so on. You also set the correct IP Address information for the second host. Most of the time you just have to change the last number.

You can also set non static IP Addresses (DHCP), in my case I did this for the VMNET adapter which will be used by the Hyper-V Virtual Switch and does not need a IP address.

networkconfigxml

<!--?xml version="1.0" encoding="utf-8"?-->

After you have done this, you can now simply run the Set-IPAddressfromXML script. This will use the Information from the networkconfig.xml file and will rename all network adapters and will set the correct IP addresses.

set-ipaddressfromxml

# ---------------------------------------------------------------------------------------------- #
# Powershell Set-IPAddressfromXML $Rev: 748 $
# (c) 2011 Thomas Maurer. All rights reserved.
# created by Thomas Maurer
# www.thomasmaurer.ch
# www.itnetx.ch
# last Update by $Author: tmaurer $ on $Date: 2012-02-24 14:07:36 +0100 (Fr, 24 Feb 2012) $
# ---------------------------------------------------------------------------------------------- #
 
#region [INFO BLOCK]
# INFO
Write-Host " " -BackgroundColor Black -ForegroundColor White
Write-Host " PowerShell Set-IPAddressfromXML " -BackgroundColor Black -ForegroundColor White
Write-Host " " -BackgroundColor Black -ForegroundColor White
Write-Host " done by Thomas Maurer " -BackgroundColor Black -ForegroundColor White
Write-Host " www.thomasmaurer.ch " -BackgroundColor Black -ForegroundColor White
Write-Host " " -BackgroundColor Black -ForegroundColor White
#endregion
 
#region [CONFIG BLOCK]
# Get XML Information
<pre lang="xml">$global:xmlData = Get-Content ".\networkconfig.xml"
# Set NIC number starting value
[int]$global:nicNumber = "1"
#endregion
 
#region [MAIN BLOCK]
#Get NIC list
$Adapters = Get-WMIObject Win32_PNPSignedDriver | where { $_.DeviceClass -eq “NET” -and $_.HardWareID -like*PCI*} | Sort-Object location
 
foreach ($Adapter in $Adapters ) {
# Get Adapter Info
$AdapterName = Get-WMIObject Win32_NetworkAdapter | where { $_.PNPDeviceID -eq $Adapter.DeviceID }
$nic = $xmlData.config.networkadapters.nic | Where-Object {$_.id -eq $nicNumber}
 
# Write NIC Info
Write-Host ‘Adapter Name :’ $AdapterName.NetConnectionID
Write-Host ‘PCI BUS :’ $Adapter.Location
Write-Host ‘MAC Address :’ $AdapterName.MACAddress
Write-Host ‘GUID :’ $AdapterName.GUID
Write-Host ‘New Name :’$nic.name
Write-Host
 
# Change NIC Name
Invoke-Expression ('netsh interface set interface `"' + $AdapterName.NetConnectionID + '`" newname=`"' + $nic.name + '`" | out-null')
Write-Host ('netsh interface set interface "' + $AdapterName.NetConnectionID + '" newname="' + $nic.name + '"') -BackgroundColor Green -ForegroundColor Black
 
# if true set IP Address
if ($nic.static -eq "true"){
Invoke-Expression ('netsh interface ipv4 set address `"' + $nic.name + '`" static ' + $nic.ip +' ' + $nic.subnet + ' ' + $nic.gateway + ' | out-null')
Write-Host ('netsh interface ipv4 set address "' + $nic.name + '" static ' + $nic.ip +' ' + $nic.subnet + ' ' + $nic.gateway) -BackgroundColor Green -ForegroundColor Black
}
else {
Write-Host "No IP set" -BackgroundColor Green -ForegroundColor Black
}
 
# Count +1 for next Adapter
$nicNumber++
}
#endregion

 

I can now copy the Set-IPAddressfromXML.ps1 and the networkconfig.xml to each Hyper-V hosts and edit the IP Addresses in the xml file, run the PowerShell file and I am done.

Lets recap:

  1. Rename the NICs of the first hosts
  2. Run the Get-NICInformation.ps1 on the first host and check the NIC order
  3. Edit the networkconfig.xml on the second hosts with the right order of the NICs
  4. Run the Set-IPAddressfromXML.ps1
  5. Do this for all Hyper-V Hosts.

I hope this will make life easier :)

You can download the Scripts from my Skydrive

Some other things:

  • I have tested this with Windows Server 2008 R2, Hyper-V Server R2, Windows Server 8 beta, Hyper-V Server 8 beta
  • It works for both because it’s not done with PowerShell v3, maybe I will update it to get it even better.
  • I do not support this script, and you are running it on your own risk.


Microsoft Case Study: HCI Solutions

logo_itnetx

Just a quick link to a Private Cloud Case Study done by Microsoft about one of our partners.

Microsoft Case Study: HCI Solutions

http://www.microsoft.com/casestudies/Microsoft-System-Center-2012/HCI-Solutions/Healthcare-Firm-Gains-More-Efficiency-Cuts-Costs-with-Private-Cloud-Environment/710000000186

 



Install Ubuntu 12.04 on Hyper-V

Some months ago I made a blog entry about “Install CentOS on Windows 8 Hyper-V“. Now with the new Linux kernel 3.0 the Hyper-V Integration Components are integrated in the kernel. Now Ubuntu 12.04 will be based on the new Linux kernel and this is why it should run perfectly on Microsoft Hyper-V.

  1. Download Ubuntu on Ubuntu.com. Until 12.04 is released you can download the daily builds from here.
  2. Start the Hyper-V Manager and create a new Virtual Machine
  3. Install Ubuntu 12.04
    Hyper-V Ubuntu 12.04
  4. after the Installation everything should work fine :)
    Hyper-V Ubuntu 12.04

 



Windows Server 2008 R2 Blackscreen after enabling Hyper-V Role on Cisco UCS

Hyper-V R2 SP1

Today I had a strange problem on a Cisco UCS installation. After you enabled Hyper-V on a Windows Server 2008 R2 with SP1, you will get a black screen.

Cisco fixed this in the UCS Firmware version 2.0.1(t).

“After enabling Hyper-V in Windows 2008 R2 SP1 then rebooting, the server no longer shows a black KVM screen and a failure of windows startup and login.”

Release Notes for Cisco UCS Software, Release 2.0