Tag Archives: Quick Start

Building a Hyper-V Cluster – Using SCVMM to Deploy Host Clusters – Part 4/6

SCVMM Deploying Clusters

In this video we demonstrate how quick and easy it is to create a cluster in SCVMM.

Prerequisites

Identify Cluster Name & IP Address To Use

  • If using DHCP address will automatically be assigned
  • Can source from SCVMM IP Pool

Plan LUN usage

  • Witness
  • CSVs

Steps to deploy cluster with SCVMM

1. Verify networks are in place

Verify networks are in place

Verify networks are in place

2. Verify storage is in place

Verify storage is in place

Verify storage is in place

3. Create Cluster Wizard

  • Cluster Name (this is the name you will use for managing the cluster)
  • -Select a runas account that has administrator privileges on the hosts and the ability to create computer account in AD
Create Cluster Wizard

Create Cluster Wizard

4. Select nodes you would like to be included in the cluster

Select nodes you would like to be included in the cluster

Select nodes you would like to be included in the cluster

5. Set cluster IP address from IP Pool, manually define an IP, or leverag DHCP

Set cluster IP address from IP Pool, manually defining an IP, or leveraging DHCP

Set cluster IP address from IP Pool, manually defining an IP, or leveraging DHCP

6. Configure storage LUN uses, format, label and create CSVs

Configure storage LUN uses, format, label and create CSVs

Configure storage LUN uses, format, label and create CSVs

7. Configure virtual switches if appropriate

8. Monitor SCVMM job to verify success

Monitor SCVMM job to verify success

Monitor SCVMM job to verify success

Click ‘View Script’ to see a sample script for deploying cluster programmatically in PowerShell

Script the process

Script the process

Resources

TechNet – How to Create a Hyper-V Host Cluster in VMM

Check out the other videos in this series!

Building a Hyper-V Cluster – SCVMM Configuring Networks and Logical Switches – Part 2/6

Configuring Networks and Logical Switches

In part two of the video series we go over how to implement logical networking in System Center Virtual Machine Manager 2012R2 (SCVMM). First we provide an overview of logical networking and why it is a good idea. We then talk about each of the fabric components necessary to implement logical networking. Finally, we implement logical networking in the SCVMM GUI then show the process for implementation with PowerShell.

Logic Networking Overview

Logical networks provide a way for administrators to represent the physical network configuration in the virtual environment. This enables many features such as delegating access to network segments to specific user roles. It also eases the deployment of converged networking and can help ensure all of your Hyper-V hosts have identical network configuration. If someone makes a change to the network configuration in Hyper-V manager or Failover Cluster manager the host will be flagged as not compliant in SCVMM. The network configuration deployed via logical networking resides on the Hyper-V hosts and is not dependent on SCVMM to stay online. This configuration survives reboots even if SCVMM is offline.

When deploying logical networks the management IP must be available the entire time the switches are deployed. This can be challenging when a system only has two NICs as the management VLAN must be available as both tagged and untagged (native). Systems using more than two adapters are easier to configure as the management interface can be can be deployed locally before the system is imported into SCVMM.

Some of the logical networking features can be used when importing Hyper-V hosts with an existing virtual switch. SCVMM will detect existing configurations as ‘Standard Switches’. The administrator must manually select the logical networks in the properties of the host hardware to use virtual networks.

Networking Concepts

This diagram shows how all of the fabric components in SCVMM relate to one another.
Logical Network Components

VM Network

This component allows you to assign a network segment (VLAN) to a virtual adapter. It is created under ‘VMs and Services’ rather than Fabric-Networking. One VM network will typically be associated with one network segment. This gives the network segment a friendly name that can be used so that users do not need to know subnets or VLANIDs. It also can have permissions assigned so that only certain users can select the network segment in their virtual machines.

Logical Network

Logical networks represent a group of network segments. Logical networks may group network segments in many ways:

  • Single segments or VLAN
  • All Production segments in all sites
  • All segments in a single site

Logical Network – Network Site

Logical network have a subcomponent called a network site. A network site can be used to associate network segments with host groups. Multiple sites can exist in a single logical network. Network sites are primarily used to represent geographies or unique areas such as a DMZ.

Logical Network – Network Site – Subnet / VLAN

Subnets and VLANs can be defined within the network site. Subnets/VLANs are used to associate one or more network segments within a site. You do not have to populate the subnet field in all cases.

IP Pool

This component is used to associate a range of IP Address with a network segment. VMM can then assign these addresses statically to VMs or Hyper-V hosts.

Port Profile

Two types of port profiles exist, ‘Uplink’ and ‘Virtual Adapter’. Uplink port profiles are used to represent the network segments (VLANs) in the configuration of a physical switch port to which a Hyper-V host is connected. It is also used to define the teaming and load balancing mode for a host.

Virtual Adapter port profiles provide a way to create a collection of setting pertaining to virtual adapters. These profiles can define settings such a network optimization, security and QoS. Virtual adapter port profiles are assigned to virtual adapters in VMs and Hyper-V hosts.

Logical Switch

The logical switch component is a vSwitch deployed by SCVMM employing a network topology and configuration defined by the components listed above. It is not possible to import existing Hyper-V network configurations into SCVMM as logical switches. Both the LBFO Team and the vSwitch must be created by SCVMM. By forcing deployment with SCVMM this ensures configuration uniformity among the hosts where it is deployed.

A logical switch will have an association with one or more virtual adapter port profiles. It will also have at least one uplink port profile. When deploying a logical switch one uplink port profile is selected and this will determine the teaming and load balance modes for the vSwitch. Logical networks are the last network fabric component deployed as they depend on the other fabric components.

Example Configuration

Example Logical Network
In the video we deploy a sample configuration with two data center sites. These sites have several network segments each. The segments are grouped into 3 logical networks: Dev, Backup and Prod. Dev is only in Las Vegas while Prod is in both datacenters. Prod uses a different VLAN ID in each data center. Backup is a single stretched VLAN. Two uplink port profiles are created to describe the two possible switch port configuration for the Hyper-V hosts. In this case the switch ports are uniformly configured within a site, so one port profile is required for the Seattle datacenter and a second for the Las Vegas datacenter. These port profiles can be used to create two possible logical switches: Host and Virtual Machine. In our example we use separate physical adapters for the host traffic and the VM traffic.

References

TechNet – Configuring Logical Networking in VMM Overview
TechNet – Configuring VM Networks in VMM Illustrated Overview
MSDN Blog – Building a teamed virtual switch for Hyper-V from SCVMM

Check out the other videos in this series!

Building a Hyper-V Cluster – SCVMM Installation and Introduction – Part 1/6

SCVMM Installation and Introduction

In this video the focus is on the installation of SCVMM and an introduction to the console. Viewers of this video will learn the installation scenarios for SCVMM, software requirements, hardware requirements, and the requirements for installing SCVMM into a virtual machine. Installation considerations will be discussed, including the use of service accounts in AD and the distributed key management store in AD. Finally, the video ends in a complete demo of installation, and a walk-through of the console.

Installation Scenarios

For small environments with less than 500 VMs, fewer than 20 hosts and fewer than 5 administrators it is possible to install VMM in an all in one virtual machine running the library and database locally. Larger environments will experience performance benefits from splitting out database components. For very large environments, it may be better to dedicate physical resources to both the database and also the SCVMM server. It may be advantageous to split the library role onto another system if you expect to be storing many VMs or templates in the library. When using a VM, it is best practice to dedicate a VHDX file for the library. This will make it easier to deal with growth of the library data long term.

Another consideration to make is running SCVMM in a highly available configuration. If SCVMM is running inside a virtual machine on a cluster, then the service is already protected from hardware failures. If the VM experiences a software issue, such failed software maintenance, the physical cluster will not protect against this kind of outage. To protect against guest OS issues the SCVMM installation itself can also be clustered.

Software Requirements

Before beginning the installation of SCVMM the following software prerequisites exist for the computer you install SCVMM on:

    • Operating System must be at least Windows Server 2012 or 2012R2
    • Operating System can be Standard or Datacenter edition
    • Operating System can run Server with a GUI or Server Core
    • The system must be a member of an Active Directory Domain
    • The name of the computer must not exceed 15 characters and must not contain ‘-SCVMM’
    • WinRM3.0 (or greater) service set to start automatically (this is included in the Windows install)
    • Microsoft .NET Framework 4 or 4.5 (this is included in the Windows install)
    • Windows ADK for Windows 8 – Available from Microsoft Download Center
  • Supported version of SQL Standard/Enterprise (MSSQL 2008R2 or MSSQL 2012)
  • SQL Native Client and SQL Server Command Line Utilities matching SQL version used
    SQL Server 2008 R2 Feature Pack (look in installation instructions for the actual file download
    SQL Server 2012 Feature Pack (look in installation instructions for the actual file download)-

Hardware Requirements

The following requirements exist for the system you are installing VMM on:

  • 4 cores @ 3.6Ghz (2 cores for environments with less than 150 hosts)
  • 8GB RAM (Install will fail below 2GB and give a warning with less than 4GB)
  • 10GB Free Hard disk space for remote SQL and library, at least 150GB for local library and SQL install

Can SCVMM run on a VM?

Running SCVMM in a Virtual Machine is fully supported and a common practice. VMM can manage the same host where the SCVMM VM is running. If this is the scenario you plan to deploy simple be cognizant that changes you make to the cluster SCVMM is hosted on my have an impact on your ability to reach the SCVMM server. Avoid performing ‘Quick Migration’ on the VM and instead opt for Live Migrations.

If you are using a Virtual Machine with Dynamic Memory enable to run SCVMM it is recommended to set the startup memory to 4GBs. This will prevent the installer from generating a low memory warning and will ensure the VM has the baseline amount of memory for acceptable performance.

Installation Considerations

Here are a few additional details you should keep in mind when performing the SCVMM installation:

  • You must be an Administrator on the server where VMM will be installed
  • It is recommended you prepare a service account in Active Directory for SCVMM (required for HA VMM installs)
  • Prepare a DKM store in AD for DB Encryption Key Storage (Required for HA VMM Installs)

Distributed Key Management Store

By default, without DKM storage SVMM will store the database encryption keys in the registry. This complicates recovery if the VM should be lost and also is not supported for HA installations of VMM. By enabling DKM storage during the SCVMM install the encryption keys are stored in Active Directory. Before you begin the SCVMM installation, you should ensure you have created a container in the AD DS. You can use ADSI to create this container as demonstrated in the video. Ensure that the service account for VMM has the ‘Full Control’ permission on the container. Creating and assigning permissions to this container will require an account with Domain Admin privileges.

Resources

TechNet – System Requirements: VMM Management Server in System Center 2012 and in System Center 2012 SP1
TechNet – How to Install a VMM Management Server
MSDN – Installing the Windows ADK
TechNet – Virtual Machine Manager
TechNet – Configuring Distributed Key Management in VMM

Check out the other videos in this series!

Deploying and Using SCVMM – Part 0/6

In this Quick Start Series we will show you how quickly and easily you can set up your own SCVMM and Hyper-V cluster.  In this series we are using Server 2012R2, iSCSI Target Server for shared storage and SCVMM as a single management interface for the virtual infrastructure.  In each video we will show you how to install and configure the various components to set up a Microsoft virtualization solution leveraging SCVMM.  We will show how to perform these configuration operations in GUI and then again in PowerShell.
To reproduce the environment in this video series you need:
  • 2 physical computers for Hyper-V hosts
  • 1 VM/Physical server for iSCSI target software (Running Windows 2012R2)
  • 1 VM/Physical server for SCVMM (Running Windows 2012R2)
  • Install any Windows Server 2012R2 SKU Core/Full
  • Network connectivity with at least 1 NIC between all the systems

Video 1 – SCVMM Installation & Introduction
Video 2 – Configuring Networks & Logical Switches
Video 3 – Configuring SMI-S  and SMB3 Storage
Video 4 – Deploy Clusters In VMM
Video 5 – SCVMM Patch Management
Video 6 – SCVMM VM Management

Building a Hyper-V Cluster – Creating Virtual Machines – Part 5/5

Creating and Managing VMs

In this video we will create highly available VMs.  First we create the virtual machines in the GUI then in PowerShell.

When creating a VM, ensure that you always check the box to store the virtual machine in a different location.  If you don’t do this, then the VM’s configuration file and VHD files will be put in the Hyper-V default location.  This is bad because it will be hard to tell what VHDs are associated configuration files.  If you check the store virtual machine in a different location check box all of the VM’s components will be stored in a single folder.  This will make your management life much easier!  Also, if the VM will be part of the cluster, be sure to create and manage the VM in failover cluster manager rather than Hyper-V manager.

Store the virtual machine in a different location

PowerShell PowerShell Code

#Create a new VM
New-VM -Name JasonVM -Path c:\ClusterStorage\CSV1

#Add the VM to the cluster so it becomes highly available
Add-ClusterVirtualMachineRole -VMName JasonVM

#Start the VM and live migrate it to another cluster node
Start-ClusterGroup -Name JasonVM
Move-ClusterVirtualMachineRole -Name JasonVM

#Create and remove VM Snapshot/Checkpoints
Checkpoint-VM -Name JasonVM
Get-VM -Name JasonVM| Get-VMSnapshot
Get-VM -Name JasonVM| Get-VMSnapshot| Remove-VMSnapshot

#Shut down the VM
Stop-VM -Name JasonVM

#List the Hyper-V and Failover Clustering commands
Get-Command -Module hyper-v, failoverclusters

Resources

MSDN: Virtual Machine Live Migration Overview
TechNet:Windows PowerShell: Create Hyper-V virtual machines

Check out the other post in this series!

Building a Hyper-V Cluster – iSCSI Storage – Part 3/5

Configuring iSCSI storage for a Hyper-V Cluster

In this video we use iSCSI target server built in to Server 2012R2 to present shared storage to our cluster nodes.

Install and Configure iSCSI Target

We must first install the FS-iSCSITarget-Server feature. Once this is installed we will create a target on our storage server. Next we will create virtual disks for the witness disk and CSV. These virtual disks will be attached to the target and presented to our cluster nodes as LUNs. Finally, we will configure the target to allow access from the IQNs of our hyper-v host nodes.  We can discover the IQN of the hyper-v hosts by running the command: (Get-InitiatorPort).NodeAddress on the cluster nodes.

 PowerShell Commands

#Install target server
Install-WindowsFeature -Name FS-iSCSITarget-Server, iSCSITarget-VSS-VDS -IncludeManagementTools -Restart
#create target
New-IscsiServerTarget -TargetName HyperVCluster
New-IscsiVirtualDisk -Path c:\HVC1-W.vhdx -SizeBytes 1GB
New-IscsiVirtualDisk -Path c:\HVC1-CSV.vhdx -SizeBytes 50GB
Add-IscsiVirtualDiskTargetMapping -TargetName HyperVCluster -Path C:\HVC1-W.vhdx
Add-IscsiVirtualDiskTargetMapping -TargetName HyperVCluster -Path C:\HVC1-CSV.vhdx
#(Get-InitiatorPort).NodeAddress
#Allow nodes to access target LUNs
Set-IscsiServerTarget -TargetName HyperVCluster -InitiatorId @("IQN:iqn.1991-05.com.microsoft:2012r2-node1.demo.lcl","IQN:iqn.1991-05.com.microsoft:2012r2-node2.demo.lcl")

Connect Nodes to iSCSI Target

Once the target is created and configured, we need to attach the iSCSI initiator in each node to the storage. We will use MPIO to ensure best performance and availability of storage.  When we enable the MS DSM to claim all iSCSI LUNs we must reboot the node for the setting to take affect. MPIO is utilized by creating a persistent connection to the target for each data NIC on the target server and from all iSCSI initiator NICs on our hyper-v server.  Because our hyper-v servers are using converged networking, we only have 1 iSCSI NIC.  In our example resiliency is provided by the LBFO team we created in the last video.

PowerShell Commands

Set-Service -Name msiscsi -StartupType Automatic
Start-Service msiscsi
#reboot requres after claim
Enable-MSDSMAutomaticClaim -BusType iSCSI
Set-MSDSMGlobalDefaultLoadBalancePolicy -Policy RR
New-IscsiTargetPortal –TargetPortalAddress 192.168.1.107
$target = Get-IscsiTarget -NodeAddress *HyperVCluster*
$target| Connect-IscsiTarget -IsPersistent $true -IsMultipathEnabled $true -InitiatorPortalAddress 192.168.1.21 -TargetPortalAddress 10.0.1.10
$target| Connect-IscsiTarget -IsPersistent $true -IsMultipathEnabled $true -InitiatorPortalAddress 192.168.1.21 -TargetPortalAddress 10.0.1.11

Prepare the LUNs for use in the Cluster

Finally, once storage is available from both nodes, we must online, initialize and format the LUNs so that they will be ready for import into the cluster. This is only done from one node in the cluster as cluster disks must only ever be online on one node at a time.

 PowerShell Commands

#Prep Drives from one node
$Disk = get-disk|?{($_.size -eq 1GB) -or ($_.size -eq 50GB)}
$disk|Initialize-Disk -PartitionStyle GPT
$disk|New-Partition -UseMaximumSize -AssignDriveLetter| Format-Volume -Confirm:$false

Resources

What’s New for iSCSI Target Server in Windows Server 2012 R2
Storage Team Blog – iSCSI Target Server in Windows Server 2012 R2
Storage Team Blog – iSCSI Target Storage (VDS/VSS) Provider
iSCSI Target Cmdlets in Windows PowerShell
MultiPath I/O (MPIO) Cmdlets in Windows PowerShell
Bruce Langworthy – MSFT: Managing iSCSI Initiator connections with Windows PowerShell on Windows Server 2012

Check out the other post in this series!

Building a Hyper-V Cluster – Installing Roles & Features – Part 1/5

 PowerShell Commands

Install-WindowsFeature -Name Hyper-V, Multipath-IO, Failover-Clustering -IncludeManagementTools -Restart
Get-WindowsFeature|?{$_.Installed -eq $true}

Hardware Requirements

Hyper-V requires a 64-bit processor that includes the following:

  • Hardware-assisted virtualization. This is available in processors that include a virtualization option—specifically processors with Intel Virtualization Technology (Intel VT) or AMD Virtualization (AMD-V) technology.
  • Hardware-enforced Data Execution Prevention (DEP) must be available and enabled. Specifically, you must enable Intel XD bit (execute disable bit) or AMD NX bit (no execute bit).
  • SLAT (Second Level Address Translation) is recommended for performance improvements and required for RemoteFX vGPUs.

Windows Server Editions Supporting Hyper-V

VM Licenses Included
2012R2 Hyper-V Server 0
2012R2 Standard 2
2012R2 Datacenter Unlimited

Check out the other post in this series!

Building a Hyper-V Cluster – Part 0/5

In this Quick Start Series we will show you how quickly and easily you can set up your own Hyper-V Cluster using server 2012R2 and iSCSI target server for shared storage.  In each video we show you how to configure the server using the GUI and then we show how to do the same configuration steps in PowerShell.
To reproduce the environment in this video series you need:
  • 2 physical computers for Hyper-V hosts
  • 1 VM/Physical server for iSCSI target software
  • Install any Windows Server 2012R2 SKU Core/Full
  • Network connectivity with at least 1 NIC between all the systems