Building a new Hyper-V Private Cloud Lab

Two years ago I created my first real IT Lab with some HP ProLiant ML110 G5. I used this in the past years to test new products and projects. The Lab at this time was very limited, no storage, no cluster, not much RAM and weak CPU performance. Not much help if you work a lot with Hyper-V Clusters and System Center products.

I was looking around for some time now to find a cheap offer for new servers. In the last week I found a offer from Cisco with c200 M2 servers and I couldn’t resist to buy two of the for my Hyper-V Cluster nodes. The offer was a special deal which was even cheaper than building the servers by my own, at this point thanks to my former employer Atlantis Informatik AG.

Now what I will do is creating a new Hyper-V Cluster friendly environment with two Cisco C200 M2 Hyper-V nodes, one HP ML110 G5 as Storage Server and one of my old HP ML110 G5 servers as Hyper-V Server which all my Management servers and Active Directory will run on.

Lab Overview

If you want to know more about Hardware you can use for a Hyper-V Lab I recommend the posts of Carsten Rachfahl on hyper-v-server.de (german).

Hardware Configuration

Hyper-V nodes:

cisco c200 m2

2x Cisco C200 M2 - Intel Xeon 5620 2.4GHz Quad Core, 16GB RAM, Remote Management, IPMI, 6 Networkports

Storage Server:

ml110g5

1x HP ProLiant ML110 G5 – Intel Xeon E3110 3.0 GHz Dual Core, 8GB RAM, 4x 500GB Raid 10, 3 Networkports

Management Hyper-V node:

ml110g5

1x HP ProLiant ML110 G5 – Intel Xeon E3110 3.0 GHz Dual Core, 8GB RAM

Commands for Windows Server Core & Hyper-V Core Server

For some KTSI projects I have been working a lot with Windows Server Core or Hyper-V Server. Now I had to do a lot of automation, so I made this little connection of commands. If you configure the server manually you can do the most important things with the sconfig utility.

Windows Server Core

Networking

Set Hostname

netdom renamecomputer %COMPUTERNAME% /NewName:<NewComputerName> 

Join Domain

netdom join %COMPUTERNAME% /domain:<DomainName> /userd:<UserName> /passwordd:*

Remove Domain

netdom remove

Rename Network Interface

netsh interface set interface name=”old name” newname=”new name”

Configure IP Address

netsh interface ipv4 set address name=”<Interface Name>” source=static address=<IPAddress> mask=<SubnetMask> gateway=<DefaultGateway>

Configure DNS Servers

netsh interface ipv4 add dnsserver name=”<Interface Name>” address=<DNS Server IP> index=1

Disable Firewall (not recommended)

netsh advfirewall set allprofiles state off

 

Remoting

Enable PowerShell Remoting

Enable-PSRemoting

Enable Remotedesktop

netsh advfirewall firewall set rule group=”remote desktop” new enable=yes

Enable Remote Administration

advfirewall firewall set rule group=”Remote Administration” new enable=yes

Enable Remote Firewall Administration

netsh advfirewall firewall set rule group=”Windows Firewall Remote Management” new enable=yes

Enable ICMP (Ping)

netsh firewall set icmpsetting 8

Enable Remote Disk Management

netsh advfirewall firewall set rule group=”Remote Volume Management” new enable=yes

 

Licensing

Enter License key

slmgr.vbs -ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

Activate Windows

slmgr.vbs -ato

 

Windows Update

Enable automatic updates

cscript C:'Windows'System32'Scregedit.wsf /au 4

Disable automatic updates

cscript C:'Windows'System32'Scregedit.wsf /au 1

 

Roles & Features

Get availibale features & roles

Dism /online /get-features /format:table

Enable feature & roles

Dism /online /enable-feature /featurename:<featurename>

 

Basics

Change Administrator password

net user administrator *

Restart Computer

shutdown /r /t 0

Logoff

logoff

More information about Server Core: TechNet

How to add Disk Cleanup tool in Windows Server 2008 R2

Cleanmgr

Disk Cleanup option on drive’s general properties and  cleanmgr.exe is not present in Windows Server 2008 or Windows Server 2008 R2 by default.So in order to use cleanmgr.exe you’ll need to copy two files that are already present on the server, cleanmgr.exe and cleanmgr.exe.mui.

  1. Copy “C:\Windows\winsxs\amd64_microsoft-windows-cleanmgr_31bf3856ad364e35_6.1.7600.16385_none_c9392808773cd7da\cleanmgr.exe” to “%systemroot%\System32″
  2. Copy “C:\Windows\winsxs\amd64_microsoft-windows-cleanmgr.resources_31bf3856ad364e35_6.1.7600.16385_en-us_b9cb6194b257cc63\cleanmgr.exe.mui” to “%systemroot%\System32\en-US”

Now you can launch the Disk cleanup tool (cleanmgr.exe) from the command prompt.

You could also install the “Desktop Experience” feature this would also work, but why install something if you don’t need it, specially on a server.

More on this on TechNet

 

Install SNMP on Hyper-V R2 Core Server

Hyper-V

If your running Microsoft Hyper-V R2 or any Windows Server 2008 R2 Core Server you can install the SNMP Feature on the command line with the command line tool dism.

First you can list all Windows Features

Dism /online /get-features /format:table  

Now you can install for the SNMP Service:

Dism /online /enable-feature /featurename:SNMP-SC

SNMP Feature Core Server

After you have done this you and you have enabled Remote Management you can mange and configure smtp via remote MMC.

SNMP Service

Important: If you need to configure the SNMP Service on a remote machine you have to install the SNMP feature on the local administrative computer. Otherwise you will not see the SNMP specific tabs.

SNMP Service

More Information on installing Windows Features on a server running a Server Core installation of Windows Server 2008 R2: http://technet.microsoft.com/en-us/library/ee441253(WS.10).aspx

Windows Management Framework 3.0 Community Technology Preview

 

Powershell

Some days ago the Microsoft Powershell Team released the Community Technology Preview of the Windows Management Framework 3.0 which includes Windows PowerShell v3. You can download the the CTP1 here and it requires Windows 7 SP1 or Windows Server 2008 R2 with SP1.

You can use very easy both PowerShell versions sie by site.

powershell.exe -Version 3.0

powershell.exe -Version 2.0

But the Windows Management Framework 3.0 CTP1 does not only includes PowerShell 3, it also contains new versions of WMI, WinRM and the new Windows PowerShell Webservice.

Windows PowerShell 3.0

  • Workflows
    Workflows that run long-running activities (in sequence or in parallel) to perform complex, larger management tasks, such as multi-machine application provisioning. Using the Windows Workflow Foundation at the command line, Windows PowerShell workflows are repeatable, parallelizable, interruptible, and recoverable.
  • Robust Sessions
    Robust sessions that automatically recover from network failures and interruptions and allow you to disconnect from the session, shut down the computer, and reconnect from a different computer without interrupting the task.
  • Scheduled Jobs
    Scheduled jobs that run regularly or in response to an event.
  • Delegated Administration
    Commands that can be executed with a delegated set of credentials so users with limited permissions can run critical jobs
  • Simplified Language Syntax
    Simplified language syntax that make commands and scripts look a lot less like code and a lot more like natural language.
  • Cmdlet Discovery
    Improved cmdlet discovery and automatic module loading that make it easier to find and run any of the cmdlets installed on your computer.
  • Show-Command
    Show-Command, a cmdlet and ISE Add-On that helps users find the right cmdlet, view its parameters in a dialog box, and run it.

WMI

  • A new provider development model
    This new model brings down the cost of provider development and removes the dependency on COM.
  • A new MI Client API to perform standard CIM operations.
    The API can be used to interact with any standard WsMan + CIMOM implementation, allowing management applications on Windows to manage non-Windows computers.
  • The ability to write Windows PowerShell cmdlets in native code
    The new WMI Provider APIs supports an extended Windows PowerShell semantics API allowing you to provide rich Windows PowerShell semantics. e.g., Verbose, Error, Warning, WhatIf, Confirm, Progress

WinRM

  • Connections are more robust
    Session disconnect and reconnect, with or without client session reconstruction, allows long-running tasks to continue even when the session in which they were started is closed and the client computer is shut down. This feature also allows administrators to reconnect from different computers to check the status of remote running tasks and get results.
  • Connections are more resilient
    In Windows PowerShell 3.0 CTP1, connections can survive short-term network failures; the client-server connection is not severed at the first sign of trouble. If network problems persist, the client is safely disconnected and can reconnect by using the Connect-PSSession or Receive-PSSession cmdlets.

Windows PowerShell Web Service

Windows PowerShell Web Service enables an administrator to expose a set of PowerShell cmdlets as a RESTful web endpoint accessible via the Open Data Protocol (OData). This provides remote access to invoke cmdlets from both Windows and non-Windows clients.

You can get more Information about the Windows Management Framework 3.0 Community Technology Preview on the Windows PowerShell Team Blog.

Microsoft System Center Virtual Machine Manager 2012 RC released

SCVMM 2012 RC

Two days ago Microsoft released the Release Candidate of System Center Virtual Machine Manager 2012. First thing, you can now Upgrade from SCVMM 2008 R2 SP1 to the Release Candidate and you will be able to upgrade to the RTM version from SCVMM 2012 RC or SCVMM 2008 R2 SP1.

Download: EXE
Download: VHD

The Release Candidate brings a lot of changes and new features.

Feature Summary:

  • Fabric Management
    • Setup Upgrade
      • *New in RC -Upgrade- Setup will support the following upgrade paths:
        • VMM 2008 R2 SP1 –SC VMM 2012 RC — SC VMM 2012 RTM
        • SC VMM 2012 RC — SC VMM 2012 RTM
    • Hyper-V and Cluster Lifecycle Management – Deploy Hyper-V to bare metal
      server, create Hyper-V clusters, orchestrate patching of a Hyper-V Cluster

      • *New in RC:
        • ISO or CD-based OSD for environments with DHCP without WDS
        • OSD will now convert dynamic to fixed type of VHD destination
        • All network adapters on host can be configured during
          provisioning
      • *New in RC:
        • Ability to bypass cluster validation during cluster creation
        • Run cluster validation reports on-demand
        • New Cluster status tab to view an aggregated status and a cluster validation
          report
        • Ability to see current CSV owner in the properties of the
          cluster
    • Third Party Virtualization Platforms – Add and Manage Citrix XenServer and
      VMware ESX Hosts and Clusters
    • Network Management – Manage IP Address Pools, MAC Address Pools and Load
      Balancers

      • *New in RC:
        • Simplification of the logical networks in the Fabric workspace
        • Ability to see IP addresses that are in use from a IP pool
        • Added support for Microsoft Network Load Balancer
        • Gateway and DNS are no longer mandatory fields for logical networks
        • Load balancer can now support affinity to logical
          networks
    • Storage Management – Classify Storage, Manage Storage Pools and LUNs
      • *New in RC
        • Create persistent sessions to iSCSI array and logon initiator to array
        • Better scalability of storage operations – LUN create, snapshot, clone,
          masking, and unmasking
        • Option to create storage groups per cluster (BETA only supported creation of
          storage group per node in a cluster)
        • Enablement of MPIO feature when provisioning a new Hyper-V server
        • Automatic MPIO device claim
        • Support for arrays that implement OnePortPerView
    • Update Management- Keep your VMM Fabric Servers (VMM roles, hosts, and
      clusters) up-to-date with patches.

      • *New in RC:
        • Share a WSUS root server between System Center Configuration Manager 2007
          R2/ System Center Configuration Manager 2012 Beta
        • Hyper-V Cluster Orchestration- Nodes put into VMM Maintenance Mode can be
          set to trigger Maintenance Mode in Operations Manager.
    • Resource Optimization
      • Dynamic Optimization – proactively balance the load of VMs across a
        cluster
      • Power Optimization – schedule power savings to use the right number of hosts
        to run your workloads – power the rest off until they are needed.

        • *New in RC:
          • Set Operations Manager Mode for powered down hosts
      • PRO – integrate with System Center Operations Manager to respond to
        application-level performance monitors.

        • *New in RC:
          • Support added for System Center Operations Manager 2012 Beta
          • VMM will ship two sample PRO Packs: Cluster scale out and Service scale out
            MPs
  • Cloud Management
    • Abstract server, network and storage resources into private clouds
    • Delegate access to private clouds with control of capacity, capabilities and
      user quotas
    • Enable self-service usage for application administrator to author, deploy,
      manage and decommission applications in the private cloud
  • Service Lifecycle Management
    • Define service templates to create sets of connected virtual machines, OS
      images and application packages

      • *New in RC:
        • Service Designer and Specialization UI enhancements
        • Added ability to use Service Template Patterns
    • Compose operating system images and applications during service deployment
      • *New in RC:
        • IP-based provisioning
        • New application instance view
    • Scale out the number of virtual machines in a service
    • Service performance and health monitoring integrated with System Center
      Operations Manager
    • Decouple OS image and application updates through image-based servicing
      • *New in RC:
        • Streamlined ability to enable OS VHD updates to a Service Template
        • Publish updated Service Templates in order to update Service
          Instances
    • Leverage powerful application virtualization technologies such as Server
      App-V